From ea60d55415892ca1a98c735d95c310637b835bf3 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 10 Jan 2009 14:56:02 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@606 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chsys.c | 10 ---------- src/include/sys.h | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/chsys.c b/src/chsys.c index 21fbe1048..347b75da3 100644 --- a/src/chsys.c +++ b/src/chsys.c @@ -94,16 +94,6 @@ void chSysTimerHandlerI(void) { chVTDoTickI(); } -/** - * Abonormal system termination handler. Invoked by the ChibiOS/RT when an - * abnormal unrecoverable condition is met. - */ -void chSysHalt(void) { - - chSysDisable(); - sys_halt(); -} - #if !defined(CH_OPTIMIZE_SPEED) /** * Enters the ChibiOS/RT system mutual exclusion zone. diff --git a/src/include/sys.h b/src/include/sys.h index 6c6b65704..cf7cf78a4 100644 --- a/src/include/sys.h +++ b/src/include/sys.h @@ -31,6 +31,12 @@ */ #define chSysPuts(msg) sys_puts(msg) +/** + * Abonormal system termination handler. Invoked by the ChibiOS/RT when an + * abnormal unrecoverable condition is met. + */ +#define chSysHalt() sys_halt() + /** * Performs a context switch. * This is the most critical code in any port, this function is responsible @@ -52,8 +58,8 @@ #define chSysEnable() sys_enable() /** - * Raises the system interrupt priority mask to system level. - * @note The implementation is architecture dependent, it may just enable the + * Raises the system interrupt priority mask to system level. + * @note The implementation is architecture dependent, it may just disable the * interrupts. * @note This API should only be invoked from the main thread in order to stop * ChibiOS/RT, hardware de/re-initialization should follow. It would then @@ -62,6 +68,14 @@ */ #define chSysDisable() sys_disable() +/** + * Raises the system interrupt priority mask to the maximum level thus disabling + * any mask-able interrupt source.. + * @note The implementation is architecture dependent, it may just disable the + * interrupts or be exactly equivalent to @p chSysDisable(). + */ +#define chSysDisableAll() sys_disable_all() + /** * Enters the ChibiOS/RT system mutual exclusion zone from within an interrupt * handler. @@ -161,7 +175,6 @@ extern "C" { #endif void chSysInit(void); void chSysTimerHandlerI(void); - void chSysHalt(void); #if !defined(CH_OPTIMIZE_SPEED) void chSysLock(void); void chSysUnlock(void); -- cgit v1.2.3