bsp.c 976 B

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