diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-18 16:30:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-18 16:30:31 +0000 |
commit | 69d687d05d42ba501c5aa1a6b26a2a7f46954612 (patch) | |
tree | d6b026cf713706f4aa3331cf70c21d4b7e27b0f7 /ports/MSP430/chcore.h | |
parent | 48d08ca9476ca38ba936ec7ff5ae3b79d8b02bd2 (diff) | |
download | ChibiOS-69d687d05d42ba501c5aa1a6b26a2a7f46954612.tar.gz ChibiOS-69d687d05d42ba501c5aa1a6b26a2a7f46954612.tar.bz2 ChibiOS-69d687d05d42ba501c5aa1a6b26a2a7f46954612.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@635 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'ports/MSP430/chcore.h')
-rw-r--r-- | ports/MSP430/chcore.h | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h index 807e7168f..642e53286 100644 --- a/ports/MSP430/chcore.h +++ b/ports/MSP430/chcore.h @@ -139,68 +139,81 @@ typedef struct { * IRQ prologue code, inserted at the start of all IRQ handlers enabled to
* invoke system APIs. */
-#define SYS_IRQ_PROLOGUE()
+#define PORT_IRQ_PROLOGUE()
/**
* IRQ epilogue code, inserted at the end of all IRQ handlers enabled to
* invoke system APIs.
*/
-#define SYS_IRQ_EPILOGUE() { \
-if (chSchRescRequiredI()) \
- chSchDoRescheduleI(); \
+#define PORT_IRQ_EPILOGUE() { \
+ if (chSchRescRequiredI()) \
+ chSchDoRescheduleI(); \
}
/**
* IRQ handler function modifier. Note, it just aliases the WinMSP "interrupt"
* macro.
*/
-#define SYS_IRQ_HANDLER interrupt
+#define PORT_IRQ_HANDLER interrupt
/**
- * This port function is implemented as inlined code for performance reasons.
+ * This function is empty in this port.
*/
-#define sys_disable() asm volatile ("dint")
+#define port_init()
/**
- * This port function is implemented as inlined code for performance reasons.
+ * Implemented as global interrupt disable.
+ */
+#define port_lock() asm volatile ("dint")
+
+/**
+ * Implemented as global interrupt enable.
*/
-#define sys_enable() asm volatile ("eint")
+#define port_unlock() asm volatile ("eint")
/**
* This function is empty in this port.
*/
-#define sys_disable_from_isr()
+#define port_lock_from_isr()
/**
* This function is empty in this port.
*/
-#define sys_enable_from_isr()
+#define port_unlock_from_isr()
+
+/**
+ * Implemented as global interrupt disable.
+ */
+#define port_disable() asm volatile ("dint")
+
+/**
+ * Same as @p port_disable() in this port, there is no difference between the
+ * two states.
+ */
+#define port_suspend() asm volatile ("dint")
/**
- * Disables all the interrupt sources, even those having a priority higher
- * to the kernel.
- * In this port it is no different than sys_disable() because the simple
- * interrupt handling
+ * Implemented as global interrupt enable.
*/
-#define sys_disable_all() sys_disable()
+#define port_enable() asm volatile ("eint")
/**
* This port function is implemented as inlined code for performance reasons.
*/
#if ENABLE_WFI_IDLE != 0
-#define sys_wait_for_interrupt() { \
+#define port_wait_for_interrupt() { \
asm volatile ("wfi"); \
}
#else
-#define sys_wait_for_interrupt()
+#define port_wait_for_interrupt()
#endif
#ifdef __cplusplus
extern "C" {
#endif
- void sys_puts(char *msg);
- void sys_switch(Thread *otp, Thread *ntp);
- void sys_halt(void);
+ void port_puts(char *msg);
+ void port_switch(Thread *otp, Thread *ntp);
+ void port_halt(void);
void threadstart(void);
#ifdef __cplusplus
}
|