From 314ba53ca7082138720a173f76467a9450f1c371 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 26 Apr 2010 12:34:10 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1892 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/interrupts.dox | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'docs/src/interrupts.dox') diff --git a/docs/src/interrupts.dox b/docs/src/interrupts.dox index 64f336f08..bceea96c4 100644 --- a/docs/src/interrupts.dox +++ b/docs/src/interrupts.dox @@ -21,8 +21,11 @@ * @page article_interrupts How to write interrupt handlers * Since version 1.1.0 ChibiOS/RT offers a cross-platform method for writing * interrupt handlers. Port-related and compiler-related details are - * encapsulated within standard system macros.
- * An interrupt handler assumes the following general form: + * encapsulated within standard system macros. + * + *

Writing Regular Interrupt handlers

+ * A Regular Interrupts handler (see @ref interrupt_classes) must be written + * using the following general form: * @code CH_IRQ_HANDLER(myIRQ) { CH_IRQ_PROLOGUE(); @@ -38,15 +41,29 @@ CH_IRQ_HANDLER(myIRQ) { CH_IRQ_EPILOGUE(); } * @endcode - * Note that only interrupt handlers that have to invoke system @ref I-Class - * APIs must be written in this form, handlers unrelated to the OS activity can - * omit the macros. - * Another note about the handler name "myIRQ", in some ports it must be a + * + *

Writing Fast Interrupt handlers

+ * In those architectures (@ref ARM7 and @ref ARMCMx) supporting Fast + * Interrupts (see @ref interrupt_classes) handlers must be written + * using the following general form: + * @code +CH_FAST_IRQ_HANDLER(myIRQ) { + + // Fast IRQ handling code, preemptable if the architecture supports it. + // The invocation of any API is forbidden here because fast interrupt + // handlers can preempt the kernel even within its critical zones in + // order to minimize latency. +} + * @endcode + * + *

Handlers naming

+ * A note about the handler name "myIRQ", in some ports it must be a * vector number rather than a function name, it could also be a name from * within a predefined set, see the notes about the various ports. + * *

Important Notes

* - There is an important application note about ARM7 interrupt handlers, * please read about it in the ARM7 port section: @ref ARM7_IH * . */ - + \ No newline at end of file -- cgit v1.2.3