Added support for the WNC M14A2A Cellular LTE Data Module.

Dependencies:   WNC14A2AInterface

Embed: (wiki syntax)

« Back to documentation index

IRQ Exported Functions

IRQ Exported Functions
[IRQ]

Functions

void SpiritIrqDeInit (SpiritIrqs *pxIrqInit)
 De initializate the SpiritIrqs structure setting all the bitfield to 0.
void SpiritIrqInit (SpiritIrqs *pxIrqInit)
 Enables all the IRQs according to the user defined pxIrqInit structure.
void SpiritIrq (IrqList xIrq, SpiritFunctionalState xNewState)
 Enables or disables a specific IRQ.
void SpiritIrqGetMask (SpiritIrqs *pxIrqMask)
 Fills a pointer to a structure of SpiritIrqs type reading the IRQ_MASK registers.
void SpiritIrqGetStatus (SpiritIrqs *pxIrqStatus)
 Filla a pointer to a structure of SpiritIrqs type reading the IRQ_STATUS registers.
void SpiritIrqClearStatus (void)
 Clear the IRQ status registers.
SpiritBool SpiritIrqCheckFlag (IrqList xFlag)
 Verifies if a specific IRQ has been generated.

Function Documentation

void SpiritIrq ( IrqList  xIrq,
SpiritFunctionalState  xNewState 
)

Enables or disables a specific IRQ.

Parameters:
xIrqIRQ to enable or disable. This parameter can be any value of IrqList.
xNewStatenew state for the IRQ. This parameter can be: S_ENABLE or S_DISABLE.
Return values:
None.

Definition at line 165 of file SPIRIT_Irq.c.

SpiritBool SpiritIrqCheckFlag ( IrqList  xFlag )

Verifies if a specific IRQ has been generated.

The call resets all the IRQ status, so it can't be used in case of multiple raising interrupts.

Parameters:
xFlagIRQ flag to be checked. This parameter can be any value of IrqList.
Return values:
SpiritBoolS_TRUE or S_FALSE.

Definition at line 273 of file SPIRIT_Irq.c.

void SpiritIrqClearStatus ( void   )

Clear the IRQ status registers.

Parameters:
None.
Return values:
None.

Definition at line 256 of file SPIRIT_Irq.c.

void SpiritIrqDeInit ( SpiritIrqs pxIrqInit )

De initializate the SpiritIrqs structure setting all the bitfield to 0.

Moreover, it sets the IRQ mask registers to 0x00000000, disabling all IRQs.

Parameters:
pxIrqInitpointer to a variable of type SpiritIrqs, in which all the bitfields will be settled to zero.
Return values:
None.

Definition at line 121 of file SPIRIT_Irq.c.

void SpiritIrqGetMask ( SpiritIrqs pxIrqMask )

Fills a pointer to a structure of SpiritIrqs type reading the IRQ_MASK registers.

Parameters:
pxIrqMaskpointer to a variable of type SpiritIrqs, through which the user can read which IRQs are enabled. All the bitfields equals to zero correspond to enabled IRQs, while all the bitfields equals to one correspond to disabled IRQs. This parameter is a pointer to a SpiritIrqs. For example suppose that the Power On Reset and RX Data ready are the only enabled IRQs.

 SpiritIrqs myIrqMask;
 SpiritIrqGetStatus(&myIrqMask);

Then myIrqMask.IRQ_POR and myIrqMask.IRQ_RX_DATA_READY are equal to 0 while all the other bitfields are equal to one.

Return values:
None.

Definition at line 221 of file SPIRIT_Irq.c.

void SpiritIrqGetStatus ( SpiritIrqs pxIrqStatus )

Filla a pointer to a structure of SpiritIrqs type reading the IRQ_STATUS registers.

Parameters:
pxIrqStatuspointer to a variable of type SpiritIrqs, through which the user can read the status of all the IRQs. All the bitfields equals to one correspond to the raised interrupts. This parameter is a pointer to a SpiritIrqs. For example suppose that the XO settling timeout is raised as well as the Sync word detection.

 SpiritIrqs myIrqStatus;
 SpiritIrqGetStatus(&myIrqStatus);

Then myIrqStatus.IRQ_XO_COUNT_EXPIRED and myIrqStatus.IRQ_VALID_SYNC are equals to 1 while all the other bitfields are equals to zero.

Return values:
None.

Definition at line 244 of file SPIRIT_Irq.c.

void SpiritIrqInit ( SpiritIrqs pxIrqInit )

Enables all the IRQs according to the user defined pxIrqInit structure.

Parameters:
pxIrqInitpointer to a variable of type SpiritIrqs, through which the user enable specific IRQs. This parameter is a pointer to a SpiritIrqs. For example suppose to enable only the two IRQ Low Battery Level and Tx Data Sent:

 SpiritIrqs myIrqInit = {0};
 myIrqInit.IRQ_LOW_BATT_LVL  = 1;
 myIrqInit.IRQ_TX_DATA_SENT  = 1;
 SpiritIrqInit(&myIrqInit);
Return values:
None.

Definition at line 149 of file SPIRIT_Irq.c.