armfly_bsp.c 910 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * @Author: 樊春春 [email protected]
  3. * @Date: 2022-07-06 19:12:52
  4. * @LastEditors: 樊春春 [email protected]
  5. * @LastEditTime: 2022-08-08 19:56:29
  6. * @FilePath: /ArmFly/User/bsp/armfly_bsp.c
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. #include "armfly_bsp.h"
  10. void bsp_init(void)
  11. {
  12. INT8U err;
  13. net_mutex = OSMutexCreate(15, &err);
  14. uart1_mbox = OSMboxCreate(NULL);
  15. uart3_mbox = OSMboxCreate(NULL);
  16. InitQueue(&CanQueueCan1);
  17. InitQueue(&CanQueueCan2);
  18. // GPIO初始化
  19. gpio_clock_init();
  20. interface_init();
  21. ad7606_init();
  22. am2303_init();
  23. dwt_init();
  24. spi1_init();
  25. uart1_init();
  26. uart3_init();
  27. nor_flash_init();
  28. lwip_setup();
  29. LCD_Init();
  30. key_init();
  31. // can初始化
  32. can_network_init();
  33. }