一个简单的stm32F030F串口程序,没用个这个的看以参考下。
单片机源程序如下:
- #include "stm32f0xx.h"
- #include "delay.h"
- #include "led.h"
- #include "USART1.h"
- int main(void)
- {
- delay_init();
- LED_Init();
- USART1_Init(9600);
- printf("STM32F030F4P6 USART TEST\r\n");
- while (1)
- {
- delay_ms(500);
- LED_TURN; //LED翻转
- }
-
- }
- #ifdef USE_FULL_ASSERT
- void assert_failed(uint8_t* file, uint32_t line)
- {
- while (1)
- {
- }
- }
- #endif
- /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
复制代码
所有资料51hei提供下载:
STM32F030串口.rar
(271.4 KB, 下载次数: 63)
|