summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2013-03-22 17:43:40 -0700
committerBernard Xiong <[email protected]>2013-03-22 17:43:40 -0700
commit5a4d0d533875cf06b27510e17fb8ca708b9dd98b (patch)
tree2f9bc6a4bda2c520725d4ef972977b1e3ff498f0 /include
parenta9074e2ccd07dac20c8dde09477359f82679b7c3 (diff)
parent7917cf09e78636699ddea076d049324c9c303294 (diff)
Merge pull request #54 from weety/new-branch
Modify the interrupt interface implementations and changes some parameters definition
Diffstat (limited to 'include')
-rw-r--r--include/rthw.h7
-rw-r--r--include/rtthread.h10
2 files changed, 13 insertions, 4 deletions
diff --git a/include/rthw.h b/include/rthw.h
index 204f822a69..817b9f40f2 100644
--- a/include/rthw.h
+++ b/include/rthw.h
@@ -41,9 +41,10 @@ rt_uint8_t *rt_hw_stack_init(void *entry,
void rt_hw_interrupt_init(void);
void rt_hw_interrupt_mask(int vector);
void rt_hw_interrupt_umask(int vector);
-void rt_hw_interrupt_install(int vector,
- rt_isr_handler_t new_handler,
- rt_isr_handler_t *old_handler);
+rt_isr_handler_t rt_hw_interrupt_install(int vector,
+ rt_isr_handler_t handler,
+ void *param,
+ char *name);
void rt_hw_interrupt_handle(int vector);
rt_base_t rt_hw_interrupt_disable(void);
diff --git a/include/rtthread.h b/include/rtthread.h
index 0048366fed..dbe48b492e 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -425,7 +425,15 @@ void rt_module_unload_sethook(void (*hook)(rt_module_t module));
/*
* interrupt service
*/
-typedef void (*rt_isr_handler_t)(int vector);
+typedef void (*rt_isr_handler_t)(int vector, void *param);
+
+struct rt_irq_desc {
+ char irq_name[RT_NAME_MAX];
+ rt_isr_handler_t isr_handle;
+ void *param;
+ rt_uint32_t interrupt_cnt;
+};
+
/*
* rt_interrupt_enter and rt_interrupt_leave only can be called by BSP