bsp.c 871 B

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