board.c 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * File : board.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, 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. * 2010-06-25 Bernard first version
  13. */
  14. #include <rtthread.h>
  15. #include <rthw.h>
  16. #include "board.h"
  17. #include "uart.h"
  18. /**
  19. * @addtogroup JZ47xx
  20. */
  21. /*@{*/
  22. /**
  23. * This is the timer interrupt service routine.
  24. */
  25. void rt_hw_timer_handler()
  26. {
  27. /* enter interrupt */
  28. rt_interrupt_enter();
  29. rt_tick_increase();
  30. /* leave interrupt */
  31. rt_interrupt_leave();
  32. }
  33. /**
  34. * This function will initial sam7s64 board.
  35. */
  36. void rt_hw_board_init()
  37. {
  38. #ifdef RT_USING_UART
  39. /* init hardware UART device */
  40. rt_hw_uart_init();
  41. #endif
  42. #ifdef RT_USING_CONSOLE
  43. /* set console device */
  44. rt_console_set_device("uart");
  45. #endif
  46. }
  47. /*@}*/