Hilscher netX microcontroller driver  V0.0.5.0
Documentation of the netX driver package

This is the CORTEX peripheral driver. More...

Collaboration diagram for CORTEX:

Functions

void DRV_NVIC_SetPriorityGrouping (uint32_t PriorityGroup)
 This method sets the priority grouping. More...
 
uint32_t DRV_NVIC_GetPriorityGrouping (void)
 This function returns the priority grouping. More...
 
void DRV_NVIC_SetPriority (IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
 This method sets the priority of a given interrupt. More...
 
void DRV_NVIC_GetPriority (IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority)
 This method stores the priority of a given interrupt and group into the given locations. More...
 
void DRV_NVIC_EnableIRQ (IRQn_Type IRQn)
 This method enables a given interrupt. More...
 
void DRV_NVIC_DisableIRQ (IRQn_Type IRQn)
 This method disables a given interrupt. More...
 
__STATIC_INLINE int DRV_IRQ_Enable (void)
 This is a semaphore function for nested enabling the interrupts. More...
 
__STATIC_INLINE int DRV_IRQ_Disable (void)
 This is a semaphore function for nested disabling the interrupts. More...
 
void DRV_NVIC_SystemReset (void)
 This method resets the NVIC and the Cortex M4 internal registers and restarts the PC at 0. More...
 
uint32_t DRV_NVIC_GetPendingIRQ (IRQn_Type IRQn)
 This funciton returns the pending state of a given interrupt. More...
 
void DRV_NVIC_SetPendingIRQ (IRQn_Type IRQn)
 This method sets a given interrupt pending. More...
 
void DRV_NVIC_ClearPendingIRQ (IRQn_Type IRQn)
 This method clears the pending state of a given interrupt. More...
 
uint32_t DRV_NVIC_GetActive (IRQn_Type IRQn)
 This function returns the active state of a given interrupt. More...
 
uint32_t DRV_NVIC_GetEnableIRQ (IRQn_Type IRQn)
 This function returns the enable state of a given interrupt. More...
 
void DRV_NVIC_AttachIRQ (IRQn_Type IRQn, void *pfIRQHandler)
 This function may be used to attach or detach an interrupt to the software vector if it is used. More...
 
void * DRV_NVIC_GetIRQ (IRQn_Type IRQn)
 This function may be used to get the pointer of an interrupt. More...
 
int32_t DRV_ITM_ReceiveChar (void)
 Driver wrapper for ITM Receive Character. More...
 
int32_t DRV_ITM_CheckChar (void)
 Driver wrapper for ITM Check Character. More...
 
uint32_t DRV_ITM_SendChar (uint32_t ch)
 Driver wrapper for ITM Send Character. More...
 
uint32_t DRV_SYSTICK_Config (uint32_t TicksNumb)
 

Variables

int ulIrqSemaphore
 Semaphore value for nested enabling/disabling of all interrupts. More...
 
int ulIrqSemaphore = 0
 Semaphore value for nested enabling/disabling of all interrupts. More...
 

Detailed Description

This is the CORTEX peripheral driver.

Most of the functions of this driver component are just wrappings for the underlying CMSIS functions. Some of them provide convenience functionalities like the recursive interrupt locking of the interrupt enable and disable functions.

Function Documentation

__STATIC_FORCEINLINE int DRV_IRQ_Disable ( void  )

This is a semaphore function for nested disabling the interrupts.

Disables the IRQ recursively.

Enables and disables were counted. Transition between 0 and 1 lead to state change. Disables the Interrupt always. Disabling iterates the lock (disable) counter. The used Semaphore is not protected against overflow! IRQ is disabled

Returns
The counting semaphore

Definition at line 154 of file netx_drv_cortex.h.

Here is the call graph for this function:

Here is the caller graph for this function:

__STATIC_FORCEINLINE int DRV_IRQ_Enable ( void  )

This is a semaphore function for nested enabling the interrupts.

Enables the IRQ recursively.

Enables and disables were counted. Transition between 0 and 1 lead to state change. From 1 to 0 Enables the Interrupt. Enabling reduces the lock (disable) counter. The used Semaphore is not protected against overflow! [0..INT_MIN] IRQ is enabled [INT_MAX..1] IRQ is disabled

Returns
the counting semaphore

Definition at line 133 of file netx_drv_cortex.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t DRV_ITM_CheckChar ( void  )

Driver wrapper for ITM Check Character.

Checks whether a character is pending for reading in the variable ITM_RxBuffer.

Returns
0 No character available.
1 Character available.

Definition at line 200 of file netx_drv_cortex.c.

Here is the call graph for this function:

int32_t DRV_ITM_ReceiveChar ( void  )

Driver wrapper for ITM Receive Character.

Inputs a character via the external variable ITM_RxBuffer.

Returns
Received character.
-1 No character pending.

Definition at line 191 of file netx_drv_cortex.c.

Here is the call graph for this function:

uint32_t DRV_ITM_SendChar ( uint32_t  ch)

Driver wrapper for ITM Send Character.

Transmits a character via the ITM channel 0, and

  • Just returns when no debugger is connected that has booked the output.
  • Is blocking when a debugger is connected, but the previous character sent has not been transmitted.
    Parameters
    [in]chCharacter to transmit.
    Returns
    Character to transmit.

Definition at line 211 of file netx_drv_cortex.c.

void DRV_NVIC_AttachIRQ ( IRQn_Type  IRQn,
void *  pfIRQHandler 
)

This function may be used to attach or detach an interrupt to the software vector if it is used.

Parameters
[in]IRQn

Definition at line 170 of file netx_drv_cortex.c.

void DRV_NVIC_ClearPendingIRQ ( IRQn_Type  IRQn)

This method clears the pending state of a given interrupt.

Parameters
[in]IRQn

Definition at line 143 of file netx_drv_cortex.c.

Here is the caller graph for this function:

void DRV_NVIC_DisableIRQ ( IRQn_Type  IRQn)

This method disables a given interrupt.

Parameters
[in]IRQn

Definition at line 73 of file netx_drv_cortex.c.

Here is the caller graph for this function:

void DRV_NVIC_EnableIRQ ( IRQn_Type  IRQn)

This method enables a given interrupt.

Parameters
[in]IRQn

Definition at line 64 of file netx_drv_cortex.c.

Here is the caller graph for this function:

uint32_t DRV_NVIC_GetActive ( IRQn_Type  IRQn)

This function returns the active state of a given interrupt.

Parameters
[in]IRQn

Definition at line 152 of file netx_drv_cortex.c.

uint32_t DRV_NVIC_GetEnableIRQ ( IRQn_Type  IRQn)

This function returns the enable state of a given interrupt.

Parameters
[in]IRQn

Definition at line 161 of file netx_drv_cortex.c.

void * DRV_NVIC_GetIRQ ( IRQn_Type  IRQn)

This function may be used to get the pointer of an interrupt.

Parameters
[in]IRQn

Definition at line 181 of file netx_drv_cortex.c.

uint32_t DRV_NVIC_GetPendingIRQ ( IRQn_Type  IRQn)

This funciton returns the pending state of a given interrupt.

Parameters
[in]IRQn

Definition at line 134 of file netx_drv_cortex.c.

void DRV_NVIC_GetPriority ( IRQn_Type  IRQn,
uint32_t  PriorityGroup,
uint32_t *  pPreemptPriority,
uint32_t *  pSubPriority 
)

This method stores the priority of a given interrupt and group into the given locations.

Parameters
[in]IRQn
[in]PriorityGroup
[in]pPreemptPriority
[in]pSubPriority

Definition at line 116 of file netx_drv_cortex.c.

Here is the call graph for this function:

uint32_t DRV_NVIC_GetPriorityGrouping ( void  )

This function returns the priority grouping.

Returns

Definition at line 104 of file netx_drv_cortex.c.

void DRV_NVIC_SetPendingIRQ ( IRQn_Type  IRQn)

This method sets a given interrupt pending.

Parameters
[in]IRQn

Definition at line 125 of file netx_drv_cortex.c.

void DRV_NVIC_SetPriority ( IRQn_Type  IRQn,
uint32_t  PreemptPriority,
uint32_t  SubPriority 
)

This method sets the priority of a given interrupt.

Parameters
[in]IRQn
[in]PreemptPriority
[in]SubPriority

Definition at line 52 of file netx_drv_cortex.c.

Here is the call graph for this function:

void DRV_NVIC_SetPriorityGrouping ( uint32_t  PriorityGroup)

This method sets the priority grouping.

Parameters
PriorityGroup

Definition at line 41 of file netx_drv_cortex.c.

void DRV_NVIC_SystemReset ( void  )

This method resets the NVIC and the Cortex M4 internal registers and restarts the PC at 0.

Definition at line 87 of file netx_drv_cortex.c.

uint32_t DRV_SYSTICK_Config ( uint32_t  TicksNumb)
Parameters
[in]TicksNumb

Definition at line 96 of file netx_drv_cortex.c.

Variable Documentation

int ulIrqSemaphore

Semaphore value for nested enabling/disabling of all interrupts.

Semaphore value for nested enabling/disabling of all interrupts.

Definition at line 82 of file netx_drv_cortex.c.

int ulIrqSemaphore = 0

Semaphore value for nested enabling/disabling of all interrupts.

Semaphore value for nested enabling/disabling of all interrupts.

Definition at line 82 of file netx_drv_cortex.c.