Choco OS
V.0.16.9.0
Join to the chocolate world
|
Module for definitions and types of interrupts. More...
Data Structures | |
struct | oC_InterruptData_t |
structure with data for interrupts More... | |
Macros | |
#define | oC_InterruptType_(TYPE_NAME) |
Returns value from oC_InterruptType_t. It is an index of interrupt type. | |
#define | oC_InterruptIndex_(BASE_NAME, TYPE_NAME) |
Returns value from oC_InterruptIndex_t. It is an index of interrupt in interrupts vector. | |
#define | oC_InterruptNumber_(BASE_NAME, TYPE_NAME) |
Returns value from oC_InterruptNumber_t. | |
#define | oC_InterruptBaseAddress_(BASE_NAME, TYPE_NAME) |
Returns value from oC_InterruptBaseAddress_t. More... | |
#define | oc_InterruptHandlerName(BASE_NAME, TYPE_NAME) |
returns name of interrupt function More... | |
#define | oC_InterruptHandlerPrototype(BASE_NAME, TYPE_NAME) |
returns handler prototype of interrupt handler More... | |
#define | oC_InterruptHandlerWeakPrototype(BASE_NAME, TYPE_NAME) |
creates weak interrupt handler prototype. Not for user usage | |
#define | oC_InterruptHandler(BASE_NAME, TYPE_NAME) |
Define handler for interrupt. More... | |
#define | oC_DefaultInterruptHandler |
Creates prototype of default interrupt handler. More... | |
#define | oC_DefaultInterruptHandlerPrototype |
Creates special prototype for default interrupt handler. Not for user usage. | |
#define | oC_ResetInterruptHandlerName |
Name of reset handler. Not for user usage. | |
#define | oC_ResetInterruptHandler |
Prototype for reset handler. Not for user usage. | |
#define | oC_ResetInterruptHandlerPrototype |
Prototype of reset handler. Not for user usage. | |
Typedefs | |
typedef void(* | oC_InterruptHandler_t) (void) |
Stores interrupt handler pointer. More... | |
Enumerations |
Variables | |
oC_InterruptHandler_t | oC_UnexpectedInterruptHandler |
Handler for unexpected interrupts. More... | |
const oC_InterruptData_t | oC_InterruptData [oC_InterruptIndex_NumberOfElements] |
Data for interrupts. | |
#define oC_DefaultInterruptHandler |
The macro creates prototype for default interrupt handler. This handler is called, when an interrupt occurs, but the handler is not set.
Example of usage:
Definition at line 226 of file oc_interrupts.h.
#define oC_InterruptBaseAddress_ | ( | BASE_NAME, | |
TYPE_NAME | |||
) |
Returns value from oC_InterruptBaseAddress_t (address of base address for register map, that the interrupt is connected to - just base address from the parameter)
BASE_NAME | Name of base address from the oc_ba_defs.h file |
TYPE_NAME | Name of the interrupt type |
Definition at line 81 of file oc_interrupts.h.
#define oC_InterruptHandler | ( | BASE_NAME, | |
TYPE_NAME | |||
) |
This macro should be used for definition of interrupt handler. Look for example below for more details.
BASE_NAME | Name of base address from the oc_ba_defs.h file |
TYPE_NAME | Name of the interrupt type |
Example of usage:
Definition at line 167 of file oc_interrupts.h.
#define oc_InterruptHandlerName | ( | BASE_NAME, | |
TYPE_NAME | |||
) |
The macro returns name of an interrupt handler. It is not interrupt prototype, just the name.
BASE_NAME | Name of base address from the oc_ba_defs.h file |
TYPE_NAME | Name of the interrupt type |
Here is some example:
Definition at line 110 of file oc_interrupts.h.
#define oC_InterruptHandlerPrototype | ( | BASE_NAME, | |
TYPE_NAME | |||
) |
The macro returns full prototype for an interrupt function. The type of this prototype should be the same as oC_InterruptHandler_t type.
BASE_NAME | Name of base address from the oc_ba_defs.h file |
TYPE_NAME | Name of the interrupt type |
Some example:
Definition at line 139 of file oc_interrupts.h.
typedef void(* oC_InterruptHandler_t) (void) |
The type is for storing interrupt handler pointers. Here is an example of usage:
Definition at line 362 of file oc_interrupts.h.
Each interrupt must be defined with connection of base address for register map. If some interrupt is not specific for base address, then it should be defined as system interrupt. In this case, the base address of such interrupt will be set to oC_BaseAddress_System
Definition at line 334 of file oc_interrupts.h.
enum oC_InterruptIndex_t |
The type is for storing index of interrupt in global interrupt vector array.
Definition at line 299 of file oc_interrupts.h.
enum oC_InterruptNumber_t |
The type is for storing number of interrupt in system (Unique number, ID in the machine). This is required for #MCS functions.
Definition at line 316 of file oc_interrupts.h.
enum oC_InterruptType_t |
The type is for storing interrupt type. Thanks to this type, it is possible to distinguish more interrupts connected to the same register map base address.
Example of usage:
Definition at line 283 of file oc_interrupts.h.
oC_InterruptHandler_t oC_UnexpectedInterruptHandler |
This variable stores handler for unexpected interrupt handler. This handler will be called, if some interrupt occurs, but the handler is not defined.
To use it just set it to correct handler pointer.
Example of usage:
Definition at line 43 of file oc_interrupts.c.