初级会员

- 积分
- 71
- 金钱
- 71
- 注册时间
- 2016-4-2
- 在线时间
- 14 小时
|
1金钱
#include <stdio.h>
#include "stm32f10x.h"
#include "led.h"
#include "delay.h"
#include "key.h"
#include "timer.h"
#include "beep.h"
#include "usart.h"
#include "adc.h"
extern __IO uint16_t ADC_ConvertedValue;
float ADC_ConvertedValueLocal;
int main(void)
{
u16 usart1_data;
SysTick_Init();
USART1_Int(9600);
while (1)
{
usart1_data = USART_ReceiveData(USART1);
printf("\n\r输入");
if (usart1_data ==0)
{printf("串口1=%x\r",usart1_data);
}
else
{printf("串口1 = %x\r",usart1_data);
}
Delay_ms(5000);
}
}
|
|