123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #include "usart.h"
- #include "led.h"
- #include "delay.h"
- #include <stdio.h>
- #include "sys_data.h"
- #include "timer.h"
- #include "bat.h"
- #include "iwdg.h"
- int main(void)
- {
- // LED硬件初始化
- // LED_GPIO_Config();
- // 12V电源初始化
- // BAT_12V_Config();
- // 5V电源初始化
- // BAT_5V_Config();
- // USART3初始化
- USART3_config();
- // 测试串口
- // USART_485_config();
- // 定时器初始化
- timer_config();
- IWDG_Configuration(5000);// 参数单位ms
-
- while(1)
- {
- if(usartMsg.done == 1)
- {
- broad_to_host();
- delay_ms(1000);
- }
- IWDG_feed();
- }
-
- }
- 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) */
- /* Infinite loop */
- // while (1)
- //{}
- // printf("Wrong parameters value: file %s on line %d\r\n", __FILE__, __LINE__);
- }
|