Contiki-NG
Typedefs | Functions
Master interrupt manipulation

These functions can be used to manipulate the master interrupt in a platform-independent fashion. More...

Typedefs

typedef INT_MASTER_STATUS_DATATYPE int_master_status_t
 Master interrupt state representation data type. More...
 

Functions

void int_master_enable (void)
 Enable the master interrupt. More...
 
int_master_status_t int_master_read_and_disable (void)
 Disable the master interrupt. More...
 
void int_master_status_set (int_master_status_t status)
 Set the status of the master interrupt. More...
 
bool int_master_is_enabled (void)
 Retrieve the status of the master interrupt. More...
 

Detailed Description

These functions can be used to manipulate the master interrupt in a platform-independent fashion.

Typedef Documentation

◆ int_master_status_t

typedef INT_MASTER_STATUS_DATATYPE int_master_status_t

Master interrupt state representation data type.

It is possible for the platform code to change this datatype by defining INT_MASTER_CONF_STATUS_DATATYPE

Definition at line 62 of file int-master.h.

Function Documentation

◆ int_master_enable()

void int_master_enable ( void  )

Enable the master interrupt.

The platform developer must provide this function

Definition at line 52 of file int-master.c.

References __enable_irq().

◆ int_master_is_enabled()

bool int_master_is_enabled ( void  )

Retrieve the status of the master interrupt.

Return values
falseInterrupts are disabled
trueInterrupts are enabled

This function can be used to retrieve the status of the master interrupt in a platform-independent fashion.

The platform developer must provide this function

Definition at line 74 of file int-master.c.

References __get_PRIMASK().

◆ int_master_read_and_disable()

int_master_status_t int_master_read_and_disable ( void  )

Disable the master interrupt.

Returns
The status of the master interrupt before disabling it

This function will return the status of the master interrupt as it was before it got disabled.

The semantics of the return value are entirely platform-specific. The calling code should not try to determine whether the master interrupt was previously enabled/disabled by interpreting the return value of this function. The return value should only be used as an argument to int_master_status_set()

To determine the status of the master interrupt in a platform-independent fashion you should use int_master_is_enabled().

The platform developer must provide this function

Definition at line 58 of file int-master.c.

References __disable_irq(), and __get_PRIMASK().

◆ int_master_status_set()

void int_master_status_set ( int_master_status_t  status)

Set the status of the master interrupt.

Parameters
statusThe new status

The semantics of status are platform-dependent. Normally, the argument provided to this function will be a value previously retrieved through a call to int_master_read_and_disable()

The platform developer must provide this function

Definition at line 68 of file int-master.c.