📄 tsensor.txt
字号:
00005e f7fffffe BL I2C_CheckEvent
000062 2800 CMP r0,#0
000064 d0f9 BEQ |L5.90|
;;;268 {
;;;269 }
;;;270
;;;271 /* Send I2C1 data */
;;;272 I2C_SendData(I2C1, (u8)RegValue);
000066 b2e1 UXTB r1,r4
000068 4628 MOV r0,r5
00006a f7fffffe BL I2C_SendData
|L5.110|
;;;273
;;;274 /* Test on I2C1 EV8 and clear it */
;;;275 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
00006e 4631 MOV r1,r6
000070 4628 MOV r0,r5
000072 f7fffffe BL I2C_CheckEvent
000076 2800 CMP r0,#0
000078 d0f9 BEQ |L5.110|
;;;276 {
;;;277 }
;;;278
;;;279 /* Send I2C1 STOP Condition */
;;;280 I2C_GenerateSTOP(I2C1, ENABLE);
00007a 4628 MOV r0,r5
00007c e8bd41f0 POP {r4-r8,lr}
000080 2101 MOVS r1,#1
000082 f7ffbffe B.W I2C_GenerateSTOP
;;;281 }
;;;282
ENDP
000086 0000 DCW 0x0000
|L5.136|
DCD 0x40005400
|L5.140|
DCD 0x00030001
|L5.144|
DCD 0x00070082
AREA ||i.I2C_LM75_ShutDown||, CODE, READONLY, ALIGN=2
I2C_LM75_ShutDown PROC
;;;488 *******************************************************************************/
;;;489 void I2C_LM75_ShutDown(FunctionalState NewState)
000000 e92d47f0 PUSH {r4-r10,lr}
;;;490 {
;;;491 u32 RegValue = 0;
;;;492
;;;493 /*----- Transmission Phase -----*/
;;;494 /* Send I2C1 START condition */
;;;495 I2C_GenerateSTART(I2C1, ENABLE);
000004 4f46 LDR r7,|L6.288|
000006 4681 MOV r9,r0 ;490
000008 2101 MOVS r1,#1
00000a 4638 MOV r0,r7
00000c f7fffffe BL I2C_GenerateSTART
;;;496
;;;497 /* Test on I2C1 EV5 and clear it */
;;;498 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)) /* EV5 */
000010 4c44 LDR r4,|L6.292|
|L6.18|
000012 4638 MOV r0,r7
000014 4621 MOV r1,r4
000016 f7fffffe BL I2C_CheckEvent
00001a 2800 CMP r0,#0
00001c d0f9 BEQ |L6.18|
;;;499 {
;;;500 }
;;;501
;;;502 /* Send STLM75 slave address for write */
;;;503 I2C_Send7bitAddress(I2C1, LM75_Addr, I2C_Direction_Transmitter);
00001e 2200 MOVS r2,#0
000020 2190 MOVS r1,#0x90
000022 4638 MOV r0,r7
000024 f7fffffe BL I2C_Send7bitAddress
;;;504
;;;505 /* Test on I2C1 EV6 and clear it */
;;;506 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) /* EV6 */
000028 4d3f LDR r5,|L6.296|
|L6.42|
00002a 4638 MOV r0,r7
00002c 4629 MOV r1,r5
00002e f7fffffe BL I2C_CheckEvent
000032 2800 CMP r0,#0
000034 d0f9 BEQ |L6.42|
;;;507 {
;;;508 }
;;;509
;;;510 /* Send the configuration register data pointer */
;;;511 I2C_SendData(I2C1, LM75_CONF_Reg);
000036 2101 MOVS r1,#1
000038 4638 MOV r0,r7
00003a f7fffffe BL I2C_SendData
;;;512
;;;513 /* Test on I2C1 EV8 and clear it */
;;;514 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
00003e 4e3a LDR r6,|L6.296|
000040 1cb6 ADDS r6,r6,#2
|L6.66|
000042 4631 MOV r1,r6
000044 4638 MOV r0,r7
000046 f7fffffe BL I2C_CheckEvent
00004a 2800 CMP r0,#0
00004c d0f9 BEQ |L6.66|
;;;515 {
;;;516 }
;;;517
;;;518 /*----- Reception Phase -----*/
;;;519 /* Send Re-STRAT condition */
;;;520 I2C_GenerateSTART(I2C1, ENABLE);
00004e 2101 MOVS r1,#1
000050 4638 MOV r0,r7
000052 f7fffffe BL I2C_GenerateSTART
|L6.86|
;;;521
;;;522 /* Test on EV5 and clear it */
;;;523 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)) /* EV5 */
000056 4621 MOV r1,r4
000058 4638 MOV r0,r7
00005a f7fffffe BL I2C_CheckEvent
00005e 2800 CMP r0,#0
000060 d0f9 BEQ |L6.86|
;;;524 {
;;;525 }
;;;526
;;;527 /* Send STLM75 slave address for read */
;;;528 I2C_Send7bitAddress(I2C1, LM75_Addr, I2C_Direction_Receiver);
000062 2201 MOVS r2,#1
000064 2190 MOVS r1,#0x90
000066 4638 MOV r0,r7
000068 f7fffffe BL I2C_Send7bitAddress
;;;529
;;;530 /* Test on EV6 and clear it */
;;;531 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED)) /* EV6 */
00006c f8df80b4 LDR r8,|L6.292|
000070 f1080801 ADD r8,r8,#1
|L6.116|
000074 4641 MOV r1,r8
000076 4638 MOV r0,r7
000078 f7fffffe BL I2C_CheckEvent
00007c 2800 CMP r0,#0
00007e d0f9 BEQ |L6.116|
;;;532 {
;;;533 }
;;;534
;;;535 /* Disable I2C1 acknowledgement */
;;;536 I2C_AcknowledgeConfig(I2C1, DISABLE);
000080 2100 MOVS r1,#0
000082 4638 MOV r0,r7
000084 f7fffffe BL I2C_AcknowledgeConfig
;;;537
;;;538 /* Send I2C1 STOP Condition */
;;;539 I2C_GenerateSTOP(I2C1, ENABLE);
000088 2101 MOVS r1,#1
00008a 4638 MOV r0,r7
00008c f7fffffe BL I2C_GenerateSTOP
;;;540
;;;541 /* Test on EV7 and clear it */
;;;542 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_RECEIVED)) /* EV7 */
000090 f8df8090 LDR r8,|L6.292|
000094 f108083f ADD r8,r8,#0x3f
|L6.152|
000098 4641 MOV r1,r8
00009a 4638 MOV r0,r7
00009c f7fffffe BL I2C_CheckEvent
0000a0 2800 CMP r0,#0
0000a2 d0f9 BEQ |L6.152|
;;;543 {
;;;544 }
;;;545
;;;546 /* Store I2C1 received data */
;;;547 RegValue = I2C_ReceiveData(I2C1);
0000a4 46b8 MOV r8,r7
0000a6 4638 MOV r0,r7
0000a8 f7fffffe BL I2C_ReceiveData
0000ac 4607 MOV r7,r0
;;;548
;;;549 /*----- Transmission Phase -----*/
;;;550 /* Send I2C1 START condition */
;;;551 I2C_GenerateSTART(I2C1, ENABLE);
0000ae 2101 MOVS r1,#1
0000b0 4640 MOV r0,r8
0000b2 f7fffffe BL I2C_GenerateSTART
0000b6 46a2 MOV r10,r4 ;498
0000b8 4644 MOV r4,r8 ;495
|L6.186|
;;;552
;;;553 /* Test on I2C1 EV5 and clear it */
;;;554 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)) /* EV5 */
0000ba 4651 MOV r1,r10
0000bc 4620 MOV r0,r4
0000be f7fffffe BL I2C_CheckEvent
0000c2 2800 CMP r0,#0
0000c4 d0f9 BEQ |L6.186|
;;;555 {
;;;556 }
;;;557
;;;558 /* Send STLM75 slave address for write */
;;;559 I2C_Send7bitAddress(I2C1, LM75_Addr, I2C_Direction_Transmitter);
0000c6 2200 MOVS r2,#0
0000c8 2190 MOVS r1,#0x90
0000ca 4620 MOV r0,r4
0000cc f7fffffe BL I2C_Send7bitAddress
|L6.208|
;;;560
;;;561 /* Test on I2C1 EV6 and clear it */
;;;562 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) /* EV6 */
0000d0 4629 MOV r1,r5
0000d2 4620 MOV r0,r4
0000d4 f7fffffe BL I2C_CheckEvent
0000d8 2800 CMP r0,#0
0000da d0f9 BEQ |L6.208|
;;;563 {
;;;564 }
;;;565
;;;566 /* Send the configuration register data pointer */
;;;567 I2C_SendData(I2C1, LM75_CONF_Reg);
0000dc 2101 MOVS r1,#1
0000de 4620 MOV r0,r4
0000e0 f7fffffe BL I2C_SendData
|L6.228|
;;;568
;;;569 /* Test on I2C1 EV8 and clear it */
;;;570 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
0000e4 4631 MOV r1,r6
0000e6 4620 MOV r0,r4
0000e8 f7fffffe BL I2C_CheckEvent
0000ec 2800 CMP r0,#0
0000ee d0f9 BEQ |L6.228|
;;;571 {
;;;572 }
;;;573
;;;574 /* Enable or disable SD bit */
;;;575 if (NewState != DISABLE)
0000f0 f1b90f00 CMP r9,#0
0000f4 d003 BEQ |L6.254|
;;;576 {
;;;577 /* Disable LM75 */
;;;578 I2C_SendData(I2C1, RegValue | LM75_SD_Set);
0000f6 b2f8 UXTB r0,r7
0000f8 f0400101 ORR r1,r0,#1
0000fc e001 B |L6.258|
|L6.254|
;;;579 }
;;;580 else
;;;581 {
;;;582 /* Enable LM75 */
;;;583 I2C_SendData(I2C1, RegValue & LM75_SD_Reset);
0000fe f00701fe AND r1,r7,#0xfe
|L6.258|
000102 4620 MOV r0,r4 ;578
000104 f7fffffe BL I2C_SendData
|L6.264|
;;;584 }
;;;585
;;;586 /* Test on I2C1 EV8 and clear it */
;;;587 while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
000108 4631 MOV r1,r6
00010a 4620 MOV r0,r4
00010c f7fffffe BL I2C_CheckEvent
000110 2800 CMP r0,#0
000112 d0f9 BEQ |L6.264|
;;;588 {
;;;589 }
;;;590
;;;591 /* Send I2C1 STOP Condition */
;;;592 I2C_GenerateSTOP(I2C1, ENABLE);
000114 4620 MOV r0,r4
000116 e8bd47f0 POP {r4-r10,lr}
00011a 2101 MOVS r1,#1
00011c f7ffbffe B.W I2C_GenerateSTOP
;;;593 }
;;;594
ENDP
|L6.288|
DCD 0x40005400
|L6.292|
DCD 0x00030001
|L6.296|
DCD 0x00070082
AREA ||i.I2C_LM75_Status||, CODE, READONLY, ALIGN=2
I2C_LM75_Status PROC
;;;98 *******************************************************************************/
;;;99 ErrorStatus I2C_LM75_Status(void)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;100 {
;;;101 u32 I2C_TimeOut = 0x3FFFF;
;;;102
;;;103 /* Clear the I2C1 AF flag */
;;;104 I2C_ClearFlag(I2C1, I2C_FLAG_AF);
000004 4d18 LDR r5,|L7.104|
000006 4e19 LDR r6,|L7.108|
000008 4c16 LDR r4,|L7.100|
00000a 4629 MOV r1,r5
00000c 4630 MOV r0,r6
00000e f7fffffe BL I2C_ClearFlag
;;;105
;;;106 /* Enable I2C1 acknowledgement if it is already disabled by other function */
;;;107 I2C_AcknowledgeConfig(I2C1, ENABLE);
000012 2101 MOVS r1,#1
000014 4630 MOV r0,r6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -