OLE Developer Guide  Latest Git
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
setting_macros.h File Reference

Detailed Description

Expand configuration settings to symbols.

These macros can be used to convert integers to module IDs, interrupt sources & interrupt vectors. This allows us to specify the peripheral index in a single location, see app_settings.h

Go to the source code of this file.

Macros

#define AS_TIMER_ID(id)   _CAT2(TMR_ID_, id)
 Expands to a TMR_MODULE_ID. More...
 
#define AS_TIMER_INTERRUPT_SOURCE(id)   _CAT2(INT_SOURCE_TIMER_, id)
 Expands to a INT_SOURCE. More...
 
#define AS_TIMER_INTERRUPT_VECTOR(id)   _CAT2(INT_VECTOR_T, id)
 Expands to an INT_VECTOR. More...
 
#define AS_TIMER_ISR_VECTOR(id)   _CAT3(_TIMER_, id, _VECTOR)
 Expands to an ISR vector number. More...
 
#define AS_USART_ID(id)   _CAT2(USART_ID_, id)
 Expands to a USART_MODULE_ID. More...
 
#define AS_USART_ISR_VECTOR(id)   _CAT3(_UART_, id, _VECTOR)
 Expands to an ISR vector number. More...
 
#define AS_USART_INTERRUPT_VECTOR(id)   _CAT2(INT_VECTOR_UART, id)
 Expands to an INT_VECTOR. More...
 
#define AS_USART_INTERRUPT_TX_SOURCE(id)   _CAT3(INT_SOURCE_USART_, id, _TRANSMIT)
 Expands to an INT_SOURCE. More...
 
#define AS_USART_INTERRUPT_RX_SOURCE(id)   _CAT3(INT_SOURCE_USART_, id, _RECEIVE)
 Expands to an INT_SOURCE. More...
 
#define AS_USART_INTERRUPT_ERROR_SOURCE(id)   _CAT3(INT_SOURCE_USART_, id, _ERROR)
 Expands to an INT_SOURCE. More...
 
#define AS_IC_ID(id)   _CAT2(IC_ID_, id)
 Expands to a IC_MODULE_ID. More...
 
#define AS_IC_ISR_VECTOR(id)   _CAT3(_INPUT_CAPTURE_, id, _VECTOR)
 Expands to an ISR vector number. More...
 
#define AS_IC_INTERRUPT_SOURCE(id)   _CAT2(INT_SOURCE_INPUT_CAPTURE_, id)
 Expands to a INT_SOURCE. More...
 
#define AS_IC_INTERRUPT_VECTOR(id)   _CAT2(INT_VECTOR_IC, id)
 Expands to an INT_VECTOR. More...
 
#define AS_IC_TMR_ID(id)   _CAT2(IC_TIMER_TMR, id)
 Expands to an IC_TIMERS. More...
 

Macro Definition Documentation

#define AS_IC_ID (   id)    _CAT2(IC_ID_, id)

Expands to a IC_MODULE_ID.

Parameters
idThe Input Capture module id.
Returns
The corresponding IC_MODULE_ID.
#define AS_IC_INTERRUPT_SOURCE (   id)    _CAT2(INT_SOURCE_INPUT_CAPTURE_, id)

Expands to a INT_SOURCE.

Parameters
idThe IC module id.
Returns
The corresponding INT_SOURCE.
#define AS_IC_INTERRUPT_VECTOR (   id)    _CAT2(INT_VECTOR_IC, id)

Expands to an INT_VECTOR.

Parameters
idThe IC module id.
Returns
The corresponding vector
#define AS_IC_ISR_VECTOR (   id)    _CAT3(_INPUT_CAPTURE_, id, _VECTOR)

Expands to an ISR vector number.

Parameters
idThe IC module id.
Returns
The corresponding ISR vector
#define AS_IC_TMR_ID (   id)    _CAT2(IC_TIMER_TMR, id)

Expands to an IC_TIMERS.

Parameters
idThe timer module id.
Returns
The corresponding IC timer id
#define AS_TIMER_ID (   id)    _CAT2(TMR_ID_, id)

Expands to a TMR_MODULE_ID.

Parameters
idThe timer module id.
Returns
The corresponding TMR_MODULE_ID.
#define AS_TIMER_INTERRUPT_SOURCE (   id)    _CAT2(INT_SOURCE_TIMER_, id)

Expands to a INT_SOURCE.

Parameters
idThe timer module id.
Returns
The corresponding INT_SOURCE.
#define AS_TIMER_INTERRUPT_VECTOR (   id)    _CAT2(INT_VECTOR_T, id)

Expands to an INT_VECTOR.

Parameters
idThe timer module id.
Returns
The corresponding vector
#define AS_TIMER_ISR_VECTOR (   id)    _CAT3(_TIMER_, id, _VECTOR)

Expands to an ISR vector number.

Parameters
idThe timer module id.
Returns
The corresponding ISR vector
#define AS_USART_ID (   id)    _CAT2(USART_ID_, id)

Expands to a USART_MODULE_ID.

Parameters
idThe USART module id.
Returns
The corresponding USART_MODULE_ID.
#define AS_USART_INTERRUPT_ERROR_SOURCE (   id)    _CAT3(INT_SOURCE_USART_, id, _ERROR)

Expands to an INT_SOURCE.

Parameters
idThe USART module id.
Returns
The corresponding error source
#define AS_USART_INTERRUPT_RX_SOURCE (   id)    _CAT3(INT_SOURCE_USART_, id, _RECEIVE)

Expands to an INT_SOURCE.

Parameters
idThe USART module id.
Returns
The corresponding RX source
#define AS_USART_INTERRUPT_TX_SOURCE (   id)    _CAT3(INT_SOURCE_USART_, id, _TRANSMIT)

Expands to an INT_SOURCE.

Parameters
idThe USART module id.
Returns
The corresponding TX source
#define AS_USART_INTERRUPT_VECTOR (   id)    _CAT2(INT_VECTOR_UART, id)

Expands to an INT_VECTOR.

Parameters
idThe USART module id.
Returns
The corresponding vector
#define AS_USART_ISR_VECTOR (   id)    _CAT3(_UART_, id, _VECTOR)

Expands to an ISR vector number.

Parameters
idThe USART module id.
Returns
The corresponding ISR vector