You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. /**
  2. ****************************************************************************************************
  3. * @file main.c
  4. * @author (ALIENTEK)
  5. * @version V1.0
  6. * @date 2022-5-04
  7. * @brief lwIP SOCKET UDP广播
  8. * @license Copyright (c) 2020-2032, 广
  9. ****************************************************************************************************
  10. * @attention
  11. *
  12. * : F407开发板
  13. * 线:www.yuanzige.com
  14. * :www.openedv.com
  15. * :www.alientek.com
  16. * :openedv.taobao.com
  17. *
  18. ****************************************************************************************************
  19. */
  20. #include "./BSP/KEY/key.h"
  21. #include "./BSP/LED/led.h"
  22. #include "./SYSTEM/delay/delay.h"
  23. #include "./SYSTEM/sys/sys.h"
  24. #include "./SYSTEM/usart/usart.h"
  25. #define HARDWARE_TEST 0
  26. int main(void) {
  27. HAL_Init(); /* 初始化HAL库 */
  28. __HAL_RCC_GPIOD_CLK_ENABLE(); /* 不初始化会导致dhcp获取不到ip */
  29. sys_stm32_clock_init(336, 8, 2, 7); /* 设置时钟,168Mhz */
  30. delay_init(168); /* 延时初始化 */
  31. usart_init(115200); /* 串口初始化为115200 */
  32. led_init(); /* 初始化LED */
  33. key_init(); /* 初始化按键 */
  34. #if !HARDWARE_TEST
  35. extern void user_main();
  36. user_main();
  37. #endif
  38. #if HARDWARE_TEST
  39. extern void hardware_main();
  40. hardware_main();
  41. #endif
  42. }