board.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * File : board.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009 - 2012 RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2011-02-24 Bernard first implementation
  13. */
  14. #include <rthw.h>
  15. #include <rtthread.h>
  16. #include "board.h"
  17. #include "mcu.h"
  18. #include "fm3_uart.h"
  19. #include "nand.h"
  20. /**
  21. * @addtogroup FM3
  22. */
  23. /*@{*/
  24. /**
  25. * This is the timer interrupt service routine.
  26. */
  27. void SysTick_Handler(void)
  28. {
  29. /* enter interrupt */
  30. rt_interrupt_enter();
  31. rt_tick_increase();
  32. /* leave interrupt */
  33. rt_interrupt_leave();
  34. }
  35. /**
  36. * This function will initial FM3 Easy Kit board.
  37. */
  38. void rt_hw_board_init(void)
  39. {
  40. /* init systick */
  41. SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
  42. /* initialize UART device */
  43. rt_hw_serial_init();
  44. /* set console as UART device */
  45. rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
  46. /* initialize nand flash device */
  47. rt_hw_nand_init();
  48. }
  49. /*@}*/