这篇教程C++ ADC_ResetCalibration函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ADC_ResetCalibration函数的典型用法代码示例。如果您正苦于以下问题:C++ ADC_ResetCalibration函数的具体用法?C++ ADC_ResetCalibration怎么用?C++ ADC_ResetCalibration使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ADC_ResetCalibration函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: Accel_ADC_Configuration/** * @brief Initializes the ADC used by the Accelerometer. * @retval None */void Accel_ADC_Configuration() { ADC_InitTypeDef ADC_InitStructure; ADC_InitStructure.ADC_Mode = ADC_Mode_Independent; ADC_InitStructure.ADC_ScanConvMode = ENABLE; ADC_InitStructure.ADC_ContinuousConvMode = ENABLE; ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; ADC_InitStructure.ADC_NbrOfChannel = 3; ADC_Init(ADC1, &ADC_InitStructure); /* ADC1 regular channel 10, 11, 12 configuration */ ADC_RegularChannelConfig(ADC1, ADC_Channel_10, 1, ADC_SampleTime_55Cycles5); ADC_RegularChannelConfig(ADC1, ADC_Channel_11, 2, ADC_SampleTime_55Cycles5); ADC_RegularChannelConfig(ADC1, ADC_Channel_12, 3, ADC_SampleTime_55Cycles5); /* Enable ADC1 DMA */ ADC_DMACmd(ADC1, ENABLE); /* Enable ADC1 */ ADC_Cmd(ADC1, ENABLE); /* Enable ADC1 reset calibaration register */ ADC_ResetCalibration(ADC1); /* Check the end of ADC1 reset calibration register */ while(ADC_GetResetCalibrationStatus(ADC1)); /* Start ADC1 calibaration */ ADC_StartCalibration(ADC1); /* Check the end of ADC1 calibration */ while(ADC_GetCalibrationStatus(ADC1)); /* Start ADC1 Software Conversion */ ADC_SoftwareStartConvCmd(ADC1, ENABLE);}
开发者ID:zwasson,项目名称:project-blox,代码行数:39,
示例2: USART1_IRQHandler/******************************************************************************** Function Name : USART1_IRQHandler* Description : This function handles USART1 global interrupt request.* Input : None* Output : None* Return : None*******************************************************************************/void USART1_IRQHandler(void){ USART_ClearITPendingBit(USART1, USART_IT_RXNE); if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET) { Rx_Buffer[data]=USART_ReceiveData(USART1); Usart_Putnum(Rx_Buffer[data]); if(Rx_Buffer[data]==1){ /* Enable ADC1 DMA */ ADC_DMACmd(ADC1, ENABLE); /* Enable ADC1 */ ADC_Cmd(ADC1, ENABLE); /* Enable ADC1 reset calibaration register */ ADC_ResetCalibration(ADC1); /* Check the end of ADC1 reset calibration register */ while(ADC_GetResetCalibrationStatus(ADC1)); /* Start ADC1 calibaration */ ADC_StartCalibration(ADC1); /* Check the end of ADC1 calibration */ while(ADC_GetCalibrationStatus(ADC1)); /* Start ADC1 Software Conversion */ ADC_SoftwareStartConvCmd(ADC1, ENABLE); } else if(Rx_Buffer[data]==2) ADC_Cmd(ADC1, DISABLE); else if(Rx_Buffer[data]==3) Usart_Putnum(TIM_GetCounter(TIM4)); } //{ //Rx_Buffer[data]=data; //data++; //USART_ClearITPendingBit(USART1, USART_IT_RXNE); /*Rx_Buffer[data]=USART_ReceiveData(USART1); Usart_Putnum(Rx_Buffer[data]); data++;*/ /* if(Rx_Buffer[data]==1) Usart_Putnum(10); else if(Rx_Buffer[data]==2) Usart_Putnum(20); */ }
开发者ID:JinhoAndyPark,项目名称:ARM,代码行数:67,
|