void GPIO_Config(void)
{
GPIO_Init(GPIOB, GPIO_PIN_ALL, GPIO_MODE_OUT_PP_HIGH_FAST); //LED灯的管脚
GPIO_Write(GPIOB, 0x00);
}
void ADC_Config(void)
{
GPIO_Init(GPIOF, GPIO_PIN_5, GPIO_MODE_IN_FL_NO_IT); //ADC模拟信号输入管脚
ADC2_DeInit();
ADC2_Init(ADC2_CONVERSIONMODE_CONTINUOUS, ADC2_CHANNEL_0, ADC2_PRESSEL_FCPU_D2,
ADC2_EXTTRIG_TIM, DISABLE, ADC2_ALIGN_RIGHT, ADC2_SCHMITTTRIG_CHANNEL0, DISABLE);
ADC2_Cmd(ENABLE);
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */