int main(void)
{
HSI_SetSysClock(RCC_PLLMul_9);
usart1_config();
adc1_config();
delay_ms(200);
Usart_SendString(USART1, "usart_config\r\n");
while(1)
{
adc1_convert_value = adc1_value*100/4096;
adc1_convert_value_float = 1;
printf("\r\n adc1_value = %u \r\n",adc1_value);
printf("\r\n adc1_convert_value = %u \r\n",adc1_convert_value);
printf("\r\n adc1_convert_value_float = %f \r\n",adc1_convert_value_float);
delay_ms(500);
}
}
|