config.c 651 B

1234567891011121314151617181920212223242526272829
  1. #include "config.h"
  2. void sw0_isr(void *args)
  3. {
  4. rt_kprintf("sw_0 is trigger \r\n");
  5. rt_thread_mdelay(400);
  6. }
  7. void sw1_isr(void *args)
  8. {
  9. rt_kprintf("sw_1 is trigger \r\n");
  10. rt_thread_mdelay(400);
  11. }
  12. /* hardware initialization */
  13. void boardInit(void)
  14. {
  15. /* disable watchdog timer */
  16. SYSREG->WDOG_CR = 0;
  17. }
  18. INIT_BOARD_EXPORT(boardInit);
  19. /* custom finish command */
  20. extern uint32_t SystemCoreClock;
  21. void sayHello(void)
  22. {
  23. rt_kprintf("Hello RT-Thread! By Microsemi SmartFusion2 Family FPGA-M2S010.\r\n");
  24. rt_kprintf("MSS System Core Clock: %d Hz.\r\n", SystemCoreClock);
  25. }
  26. MSH_CMD_EXPORT(sayHello, "say hello to console");