付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 政府采购服务保证金制度
- 私人单位采购制度
- 精煤采购渠道管理制度
- 中小学食堂集中采购制度
- 绿色建材采购制度范本
- 专项采购管理制度汇编
- 中药材采购出差管理制度
- 中药诊所采购管理制度
- 薯片土豆采购制度
- 无纺布物料采购制度
- 2026年陕西航空职业技术学院单招职业适应性测试题库带答案详解(能力提升)
- 2026年自贡市市本级招用高校毕业生从事公共服务(58人)笔试参考题库及答案解析
- 食材配送中心奖惩制度
- 【2026年中考复习】全国中考物理真卷综合能力题100道(上)
- 2026年雨季安全驾驶试题及答案
- 《中国诗词大会》选拔专项训练试题及答案
- 高中历史必背阶段特征-2026届高三统编版历史一轮复习(选必融合)
- 2026年安徽工商职业学院单招职业技能测试题库带答案详解ab卷
- 2026年安徽工贸职业技术学院单招职业技能测试题库带答案详解(基础题)
- 纳税人员财会制度
- 2026年西安科技大学辅导员招聘(15人)考试参考试题及答案解析
评论
0/150
提交评论