rthw.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. rt_isr_handler_t rt_hw_interrupt_install(int vector,
  39. rt_isr_handler_t handler,
  40. void *param,
  41. char *name);
  42. void rt_hw_interrupt_handle(int vector);
  43. rt_base_t rt_hw_interrupt_disable(void);
  44. void rt_hw_interrupt_enable(rt_base_t level);
  45. void rt_hw_context_switch(rt_uint32_t from, rt_uint32_t to);
  46. void rt_hw_context_switch_to(rt_uint32_t to);
  47. void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to);
  48. void rt_hw_console_output(const char *str);
  49. void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry);
  50. void rt_hw_show_memory(rt_uint32_t addr, rt_uint32_t size);
  51. /*
  52. * exception interfaces
  53. */
  54. void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context));
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58. #endif