?? stm32f10x_adc.txt
字號:
;;;548 ADCx->CR1 &= CR1_DISCEN_Reset;
00000c 6842 LDR r2,[r0,#4]
00000e f4226200 BIC r2,r2,#0x800
000012 6042 STR r2,[r0,#4]
|L11.20|
;;;549 }
;;;550 }
000014 4770 BX lr
;;;551
ENDP
AREA ||i.ADC_ExternalTrigConvCmd||, CODE, READONLY, ALIGN=1
ADC_ExternalTrigConvCmd PROC
;;;684 */
;;;685 void ADC_ExternalTrigConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000 b121 CBZ r1,|L12.12|
;;;686 {
;;;687 /* Check the parameters */
;;;688 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;689 assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;690 if (NewState != DISABLE)
;;;691 {
;;;692 /* Enable the selected ADC conversion on external event */
;;;693 ADCx->CR2 |= CR2_EXTTRIG_Set;
000002 6882 LDR r2,[r0,#8]
000004 f4421280 ORR r2,r2,#0x100000
000008 6082 STR r2,[r0,#8]
00000a e003 B |L12.20|
|L12.12|
;;;694 }
;;;695 else
;;;696 {
;;;697 /* Disable the selected ADC conversion on external event */
;;;698 ADCx->CR2 &= CR2_EXTTRIG_Reset;
00000c 6882 LDR r2,[r0,#8]
00000e f4221280 BIC r2,r2,#0x100000
000012 6082 STR r2,[r0,#8]
|L12.20|
;;;699 }
;;;700 }
000014 4770 BX lr
;;;701
ENDP
AREA ||i.ADC_ExternalTrigInjectedConvCmd||, CODE, READONLY, ALIGN=1
ADC_ExternalTrigInjectedConvCmd PROC
;;;822 */
;;;823 void ADC_ExternalTrigInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
000000 b121 CBZ r1,|L13.12|
;;;824 {
;;;825 /* Check the parameters */
;;;826 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;827 assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;828 if (NewState != DISABLE)
;;;829 {
;;;830 /* Enable the selected ADC external event selection for injected group */
;;;831 ADCx->CR2 |= CR2_JEXTTRIG_Set;
000002 6882 LDR r2,[r0,#8]
000004 f4424200 ORR r2,r2,#0x8000
000008 6082 STR r2,[r0,#8]
00000a e003 B |L13.20|
|L13.12|
;;;832 }
;;;833 else
;;;834 {
;;;835 /* Disable the selected ADC external event selection for injected group */
;;;836 ADCx->CR2 &= CR2_JEXTTRIG_Reset;
00000c 6882 LDR r2,[r0,#8]
00000e f4224200 BIC r2,r2,#0x8000
000012 6082 STR r2,[r0,#8]
|L13.20|
;;;837 }
;;;838 }
000014 4770 BX lr
;;;839
ENDP
AREA ||i.ADC_ExternalTrigInjectedConvConfig||, CODE, READONLY, ALIGN=1
ADC_ExternalTrigInjectedConvConfig PROC
;;;797 */
;;;798 void ADC_ExternalTrigInjectedConvConfig(ADC_TypeDef* ADCx, uint32_t ADC_ExternalTrigInjecConv)
000000 2200 MOVS r2,#0
;;;799 {
;;;800 uint32_t tmpreg = 0;
;;;801 /* Check the parameters */
;;;802 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;803 assert_param(IS_ADC_EXT_INJEC_TRIG(ADC_ExternalTrigInjecConv));
;;;804 /* Get the old register value */
;;;805 tmpreg = ADCx->CR2;
000002 6882 LDR r2,[r0,#8]
;;;806 /* Clear the old external event selection for injected group */
;;;807 tmpreg &= CR2_JEXTSEL_Reset;
000004 f42242e0 BIC r2,r2,#0x7000
;;;808 /* Set the external event selection for injected group */
;;;809 tmpreg |= ADC_ExternalTrigInjecConv;
000008 430a ORRS r2,r2,r1
;;;810 /* Store the new register value */
;;;811 ADCx->CR2 = tmpreg;
00000a 6082 STR r2,[r0,#8]
;;;812 }
00000c 4770 BX lr
;;;813
ENDP
AREA ||i.ADC_GetCalibrationStatus||, CODE, READONLY, ALIGN=1
ADC_GetCalibrationStatus PROC
;;;428 */
;;;429 FlagStatus ADC_GetCalibrationStatus(ADC_TypeDef* ADCx)
000000 4601 MOV r1,r0
;;;430 {
;;;431 FlagStatus bitstatus = RESET;
000002 2000 MOVS r0,#0
;;;432 /* Check the parameters */
;;;433 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;434 /* Check the status of CAL bit */
;;;435 if ((ADCx->CR2 & CR2_CAL_Set) != (uint32_t)RESET)
000004 688a LDR r2,[r1,#8]
000006 f0120f04 TST r2,#4
00000a d001 BEQ |L15.16|
;;;436 {
;;;437 /* CAL bit is set: calibration on going */
;;;438 bitstatus = SET;
00000c 2001 MOVS r0,#1
00000e e000 B |L15.18|
|L15.16|
;;;439 }
;;;440 else
;;;441 {
;;;442 /* CAL bit is reset: end of calibration */
;;;443 bitstatus = RESET;
000010 2000 MOVS r0,#0
|L15.18|
;;;444 }
;;;445 /* Return the CAL bit status */
;;;446 return bitstatus;
;;;447 }
000012 4770 BX lr
;;;448
ENDP
AREA ||i.ADC_GetConversionValue||, CODE, READONLY, ALIGN=1
ADC_GetConversionValue PROC
;;;706 */
;;;707 uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
000000 4601 MOV r1,r0
;;;708 {
;;;709 /* Check the parameters */
;;;710 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;711 /* Return the selected ADC conversion value */
;;;712 return (uint16_t) ADCx->DR;
000002 6cc8 LDR r0,[r1,#0x4c]
000004 b280 UXTH r0,r0
;;;713 }
000006 4770 BX lr
;;;714
ENDP
AREA ||i.ADC_GetDualModeConversionValue||, CODE, READONLY, ALIGN=2
ADC_GetDualModeConversionValue PROC
;;;718 */
;;;719 uint32_t ADC_GetDualModeConversionValue(void)
000000 4801 LDR r0,|L17.8|
;;;720 {
;;;721 /* Return the dual mode conversion value */
;;;722 return (*(__IO uint32_t *) DR_ADDRESS);
000002 6800 LDR r0,[r0,#0]
;;;723 }
000004 4770 BX lr
;;;724
ENDP
000006 0000 DCW 0x0000
|L17.8|
DCD 0x4001244c
AREA ||i.ADC_GetFlagStatus||, CODE, READONLY, ALIGN=1
ADC_GetFlagStatus PROC
;;;1193 */
;;;1194 FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
000000 4602 MOV r2,r0
;;;1195 {
;;;1196 FlagStatus bitstatus = RESET;
000002 2000 MOVS r0,#0
;;;1197 /* Check the parameters */
;;;1198 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1199 assert_param(IS_ADC_GET_FLAG(ADC_FLAG));
;;;1200 /* Check the status of the specified ADC flag */
;;;1201 if ((ADCx->SR & ADC_FLAG) != (uint8_t)RESET)
000004 6813 LDR r3,[r2,#0]
000006 420b TST r3,r1
000008 d001 BEQ |L18.14|
;;;1202 {
;;;1203 /* ADC_FLAG is set */
;;;1204 bitstatus = SET;
00000a 2001 MOVS r0,#1
00000c e000 B |L18.16|
|L18.14|
;;;1205 }
;;;1206 else
;;;1207 {
;;;1208 /* ADC_FLAG is reset */
;;;1209 bitstatus = RESET;
00000e 2000 MOVS r0,#0
|L18.16|
;;;1210 }
;;;1211 /* Return the ADC_FLAG status */
;;;1212 return bitstatus;
;;;1213 }
000010 4770 BX lr
;;;1214
ENDP
AREA ||i.ADC_GetITStatus||, CODE, READONLY, ALIGN=1
ADC_GetITStatus PROC
;;;1245 */
;;;1246 ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint16_t ADC_IT)
000000 b570 PUSH {r4-r6,lr}
;;;1247 {
000002 4602 MOV r2,r0
;;;1248 ITStatus bitstatus = RESET;
000004 2000 MOVS r0,#0
;;;1249 uint32_t itmask = 0, enablestatus = 0;
000006 2300 MOVS r3,#0
000008 2400 MOVS r4,#0
;;;1250 /* Check the parameters */
;;;1251 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1252 assert_param(IS_ADC_GET_IT(ADC_IT));
;;;1253 /* Get the ADC IT index */
;;;1254 itmask = ADC_IT >> 8;
00000a 120b ASRS r3,r1,#8
;;;1255 /* Get the ADC_IT enable bit status */
;;;1256 enablestatus = (ADCx->CR1 & (uint8_t)ADC_IT) ;
00000c 6855 LDR r5,[r2,#4]
00000e b2ce UXTB r6,r1
000010 ea050406 AND r4,r5,r6
;;;1257 /* Check the status of the specified ADC interrupt */
;;;1258 if (((ADCx->SR & itmask) != (uint32_t)RESET) && enablestatus)
000014 6815 LDR r5,[r2,#0]
000016 421d TST r5,r3
000018 d002 BEQ |L19.32|
00001a b10c CBZ r4,|L19.32|
;;;1259 {
;;;1260 /* ADC_IT is set */
;;;1261 bitstatus = SET;
00001c 2001 MOVS r0,#1
00001e e000 B |L19.34|
|L19.32|
;;;1262 }
;;;1263 else
;;;1264 {
;;;1265 /* ADC_IT is reset */
;;;1266 bitstatus = RESET;
000020 2000 MOVS r0,#0
|L19.34|
;;;1267 }
;;;1268 /* Return the ADC_IT status */
;;;1269 return bitstatus;
;;;1270 }
000022 bd70 POP {r4-r6,pc}
;;;1271
ENDP
AREA ||i.ADC_GetInjectedConversionValue||, CODE, READONLY, ALIGN=1
ADC_GetInjectedConversionValue PROC
;;;1050 */
;;;1051 uint16_t ADC_GetInjectedConversionValue(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChannel)
000000 4602 MOV r2,r0
;;;1052 {
;;;1053 __IO uint32_t tmp = 0;
000002 2300 MOVS r3,#0
;;;1054
;;;1055 /* Check the parameters */
;;;1056 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;1057 assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
;;;1058
;;;1059 tmp = (uint32_t)ADCx;
000004 4613 MOV r3,r2
;;;1060 tmp += ADC_InjectedChannel + JDR_Offset;
000006 461a MOV r2,r3
000008 f1010028 ADD r0,r1,#0x28
00000c 4403 ADD r3,r3,r0
;;;1061
;;;1062 /* Returns the selected injected channel conversion data value */
;;;1063 return (uint16_t) (*(__IO uint32_t*) tmp);
00000e 6818 LDR r0,[r3,#0]
000010 b280 UXTH r0,r0
;;;1064 }
000012 4770 BX lr
;;;1065
ENDP
AREA ||i.ADC_GetResetCalibrationStatus||, CODE, READONLY, ALIGN=1
ADC_GetResetCalibrationStatus PROC
;;;390 */
;;;391 FlagStatus ADC_GetResetCalibrationStatus(ADC_TypeDef* ADCx)
000000 4601 MOV r1,r0
;;;392 {
;;;393 FlagStatus bitstatus = RESET;
000002 2000 MOVS r0,#0
;;;394 /* Check the parameters */
;;;395 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;396 /* Check the status of RSTCAL bit */
;;;397 if ((ADCx->CR2 & CR2_RSTCAL_Set) != (uint32_t)RESET)
000004 688a LDR r2,[r1,#8]
000006 f0120f08 TST r2,#8
00000a d001 BEQ |L21.16|
;;;398 {
;;;399 /* RSTCAL bit is set */
;;;400 bitstatus = SET;
00000c 2001 MOVS r0,#1
00000e e000 B |L21.18|
|L21.16|
;;;401 }
;;;402 else
;;;403 {
;;;404 /* RSTCAL bit is reset */
;;;405 bitstatus = RESET;
000010 2000 MOVS r0,#0
|L21.18|
;;;406 }
;;;407 /* Return the RSTCAL bit status */
;;;408 return bitstatus;
;;;409 }
000012 4770 BX lr
;;;410
ENDP
AREA ||i.ADC_GetSoftwareStartConvStatus||, CODE, READONLY, ALIGN=1
ADC_GetSoftwareStartConvStatus PROC
;;;479 */
;;;480 FlagStatus ADC_GetSoftwareStartConvStatus(ADC_TypeDef* ADCx)
000000 4601 MOV r1,r0
;;;481 {
;;;482 FlagStatus bitstatus = RESET;
000002 2000 MOVS r0,#0
;;;483 /* Check the parameters */
;;;484 assert_param(IS_ADC_ALL_PERIPH(ADCx));
;;;485 /* Check the status of SWSTART bit */
;;;486 if ((ADCx->CR2 & CR2_SWSTART_Set) != (uint32_t)RESET)
000004 688a LDR r2,[r1,#8]
000006 f4120f80 TST r2,#0x400000
00000a d001 BEQ |L22.16|
;;;487 {
;;;488 /* SWSTART bit is set */
;;;489 bitstatus = SET;
00000c 2001 MOVS r0,#1
00000e e000 B |L22.18|
|L22.16|
;;;490 }
;;;491 else
;;;492 {
;;;493 /* SWSTART bit is reset */
;;;494 bitstatus = RESET;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -