bsp.c 787 B

12345678910111213141516171819202122232425262728293031
  1. #include "bsp/shark_bsp.h"
  2. #include "bsp/gpio.h"
  3. #include "bsp/uart.h"
  4. #if defined CONFIG_BOARD_SP700
  5. const char iap_board_name[] __attribute__((at(0x08002800))) = "SP700";
  6. #elif defined CONFIG_BOARD_SP600
  7. const char iap_board_name[] __attribute__((at(0x08002800))) = "SP600";
  8. #endif
  9. const char iap_fw_version[] __attribute__((at(0x08002A00))) = "1.0";
  10. const char iap_fw_name[] __attribute__((at(0x08002C00))) = "App";
  11. extern void system_clock_config(void);
  12. extern void SystemCoreClockUpdate(void);
  13. //all board's low level init is here
  14. void bsp_init(void){
  15. wdog_start(4);
  16. gpio_init();
  17. DCDC_VOL_OPEN(1);
  18. system_clock_config(); //after dcdc open, MCU can run on full speed
  19. SystemCoreClockUpdate();
  20. shark_uart_init();
  21. }
  22. void wdog_start(int timeout){
  23. }
  24. void wdog_reload(void){
  25. }