|
一個(gè)簡(jiǎn)單的stm32F030F串口程序,沒用個(gè)這個(gè)的看以參考下。
單片機(jī)源程序如下:
- #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翻轉(zhuǎn)
- }
-
- }
- #ifdef USE_FULL_ASSERT
- void assert_failed(uint8_t* file, uint32_t line)
- {
- while (1)
- {
- }
- }
- #endif
- /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
復(fù)制代碼
所有資料51hei提供下載:
STM32F030串口.rar
(271.4 KB, 下載次數(shù): 63)
2018-11-9 02:03 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
|
|