rthw.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * File : rthw.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2012, RT-Thread Development 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. * 2006-03-18 Bernard the first version
  13. * 2006-04-25 Bernard add rt_hw_context_switch_interrupt declaration
  14. * 2006-09-24 Bernard add rt_hw_context_switch_to declaration
  15. * 2012-12-29 Bernard add rt_hw_exception_install declaration
  16. */
  17. #ifndef __RT_HW_H__
  18. #define __RT_HW_H__
  19. #include <rtthread.h>
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. void rt_hw_cpu_icache_enable(void);
  24. void rt_hw_cpu_icache_disable(void);
  25. rt_base_t rt_hw_cpu_icache_status(void);
  26. void rt_hw_cpu_dcache_enable(void);
  27. void rt_hw_cpu_dcache_disable(void);
  28. rt_base_t rt_hw_cpu_dcache_status(void);
  29. void rt_hw_cpu_reset(void);
  30. void rt_hw_cpu_shutdown(void);
  31. rt_uint8_t *rt_hw_stack_init(void *entry,
  32. void *parameter,
  33. rt_uint8_t *stack_addr,
  34. void *exit);
  35. void rt_hw_interrupt_init(void);
  36. void rt_hw_interrupt_mask(int vector);
  37. void rt_hw_interrupt_umask(int vector);
  38. void rt_hw_interrupt_install(int vector,
  39. rt_isr_handler_t new_handler,
  40. rt_isr_handler_t *old_handler);
  41. void rt_hw_interrupt_handle(int vector);
  42. rt_base_t rt_hw_interrupt_disable(void);
  43. void rt_hw_interrupt_enable(rt_base_t level);
  44. void rt_hw_context_switch(rt_uint32_t from, rt_uint32_t to);
  45. void rt_hw_context_switch_to(rt_uint32_t to);
  46. void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to);
  47. void rt_hw_console_output(const char *str);
  48. void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry);
  49. void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size);
  50. /*
  51. * exception interfaces
  52. */
  53. void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context));
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif