STM32库函数(3.5.0)与相关寄存器控制标志位对应汇总--ADC_第1页
STM32库函数(3.5.0)与相关寄存器控制标志位对应汇总--ADC_第2页
免费预览已结束,剩余1页可下载查看

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、STM32ADC库函数与相关寄存器控制标志位对应汇总ADC_Private_FunctionsFunctionsvoidADC一一AnalogWatchdogCmd(ADC_TypeDef*ADCx,uint32_tADC_AnalogWatchdog)Enablesordisablestheanalogwatchdogonsingle/allregularorinjectedchannels.ADC_CR1->AWDSGLADC_CR1->AWDENADC_CR1->JAWDENvoidADC_AnalogWatchdogSingleChannelConfig(ADC_Ty

2、peDef*ADCx,uint8_tADC_Channel)Configurestheanalogwatchdogguardedsinglechannel.ADC_CR1->AWDCH4:0voidADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef*ADCx,uint16_tHighThreshold,uint16_tLowThreshold)Configuresthehighandlowthresholdsoftheanalogwatchdog.ADC_HTRADC_LRTvoidADC_AutoInjectedConvCmd(ADC_Type

3、Def*ADCx,FunctionalStateNewState)EnablesordisablestheselectedADCautomaticinjectedgroupconversionafterregularone.ADC_CR1->JAUTOvoidADC_ClearFlag(ADC_TypeDef*ADCx,uint8_tADC_FLAG)ClearstheADCx'spendingflags.ADC_SRvoidADC_ClearlTPendingBit(ADC_TypeDef*ADCx,uint16_tADC_IT)ClearstheADCx'sinter

4、ruptpendingbits.ADC_SR->AWDADC_SR->EOCADC_SR->JEOCvoidADC_Cmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablesthespecifiedADCperipheral.ADC_CR2->AD0NvoidADC_DeInit(ADC_TypeDef*ADCx)DeinitializestheADCxperipheralregisterstotheirdefaultresetvalues.NONEvoidADC_DiscModeChannelCount

5、Config(ADC_TypeDef*ADCx,uint8_tNumber)ConfiguresthediscontinuousmodefortheselectedADCregulargroupchannel.ADC_CR1->DISCNUM2:OvoidADC_DiscModeCmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablesthediscontinuousmodeonregulargroupchannelforthespecifiedADC.ADC_CR1->DISCENvoidADC_DMACmd(AD

6、C_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablesthespecifiedADCDMArequest.ADC_CR2->DMAvoidADC_ExternalTrigConvCmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablestheADCxconversionthroughexternaltrigger.ADC_CR2->EXTTRIGvoidADC_ExternalTrigInjectedConvCmd(ADC_TypeDef*ADCx,Funct

7、ionalStateNewState)EnablesordisablestheADCxinjectedchannelsconversionthroughexternaltrigger.ADC_CR2->JEXTTRIGvoidADC_ExternalTrigInjectedConvConfig(ADC_TypeDef*ADCx,uint32_tADC_ExternalTrigInjecConv)ConfigurestheADCxexternaltriggerforinjectedchannelsconversion.ADC_CR2->EXTSEL2:0FlagStatusADC_G

8、etCalibrationStatus(ADC_TypeDef*ADCx)GetstheselectedADCcalibrationstatus.ADC_CR2->CALuint16_tADCGetConversionValue(ADCTypeDef*ADCx)ReturnsthelastADCxconversionresultdataforregularchannel.ADC_DRuint32_tADC_GetDualModeConversionValue(void)ReturnsthelastADC1andADC2conversionresultdataindualmode.NONE

9、FlagStatusADC_GetFlagStatus(ADC_TypeDef*ADCx,uint8_tADC_FLAG)CheckswhetherthespecifiedADCflagissetornot.ADC_SRuintl6_tADC_GetlnjectedConversionValue(ADC_TypeDef*ADCx,uint8_tADC_InjectedChannel)ReturnstheADCinjectedchannelconversionresult.NONEITStatusADC_GetITStatus(ADC_TypeDef*ADCx,uint16_tADC_IT)Ch

10、eckswhetherthespecifiedADCinterrupthasoccurredornot.ADC_CR1->JEOCIEADC_CR1->AWDIEADC_CR1->EOCIEADC_SR->EOCADC_SR->AWDADC_SR->JEOCFlagStatusADCGetResetCalibrationStatus(ADCTypeDef*ADCx)GetstheselectedADCresetcalibrationregistersstatus.ADC_CR2->RSTCALFlagStatusADC_GetSoftwareStart

11、ConvStatus(ADC_TypeDef*ADCx)GetstheselectedADCSoftwarestartconversionStatus.ADC_CR2->SWSTARTFlagStatusADC_GetSoftwareStartInjectedConvCmdStatus(ADC_TypeDef*ADCx)GetstheselectedADCSoftwarestartinjectedconversionStatus.ADC_CR2->SWSTARTJvoidADC_Init(ADC_TypeDef*ADCx,ADC_InitTypeDef*ADC_InitStruct

12、)InitializestheADCxperipheralaccordingtothespecifiedparametersintheADC_InitStruct.ADC_CR1->SCANADC_CR1->DUALMODE3:OADC_CR2->EXTSEL2:0ADC_CR2->ALIGNADC_CR2->CONTADC_SQR1->L3:0voidADC_InjectedChannelConfig(ADC_TypeDef*ADCx,uint8_tADC_Channel,uint8_tRank,uint8_tADC_SampleTime)Configur

13、esfortheselectedADCinjectedchannelitscorrespondingrankinthesequenceranditssampletime.ADC_SMPR1ADC_SMPR2ADC_JSQRvoidADC_InjectedDiscModeCmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablesthediscontinuousmodeforinjectedgroupchannelforthespecifiedADC.ADC_CR1->DISCENJvoidADC_InjectedSequen

14、cerLengthConfig(ADC_TypeDef*ADCx,uint8_tLength)Configuresthesequencerlengthforinjectedchannels.ADC_JSQR->JL1:0voidADC_ITConfig(ADC_TypeDef*ADCx,uint16_tADC_IT,FunctionalStateNewState)EnablesordisablesthespecifiedADCinterrupts.ADC_CR1->JEOCIEADC_CR1->AWDIEADC_CR1->E0CIEvoidADC_RegularChan

15、nelConfig(ADC_TypeDef*ADCx,uint8_tADC_Channel,uint8_tRank,uint8_tADC_SampleTime)ConfiguresfortheselectedADCregularchannelitscorrespondingrankinthesequenceranditssampletime.ADC_SMPR1ADC_SMPR2ADC_SQR3ADC_SQR2ADC_SQR1voidADC_ResetCalibration(ADC_TypeDef*ADCx)ResetstheselectedADCcalibrationregisters.ADC

16、_CR2->RSTCALvoidADCSetlnjectedOffset(ADCTypeDef*ADCx,uint8_tADC_InjectedChannel,uint16_tOffset)Settheinjectedchannelsconversionvalueoffset.ADC_JOFR1ADCOFR2ADC_JOFR3voidADC_JOFR4ADC_SoftwareStartConvCmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablestheselectedADCsoftwarestartconversion.ADC_CR2->SWSTARTADC_CR2->EXTTRIGvoidADC_SoftwareStartInjectedConvCmd(ADC_TypeDef*ADCx,FunctionalStateNewState)EnablesordisablestheselectedADCstartoftheinjectedchannelsconversion.ADC_CR2->SWSTARTJADC_CR2->JEXTTRIGvoidADC_StartCalibration(ADC_TypeDef*ADCx)StartstheselectedADCca

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论