82 #ifndef BSP430_PERIPH_H
83 #define BSP430_PERIPH_H
109 #define BSP430_PERIPH_NONE ((tBSP430periphHandle)0)
116 #define BSP430_PERIPH_LFXT1 ((tBSP430periphHandle)0x4001)
125 #ifndef configBSP430_PERIPH_XT2
126 #define configBSP430_PERIPH_XT2 0
138 #if defined(BSP430_DOXYGEN) || (configBSP430_PERIPH_XT2 - 0)
139 #define BSP430_PERIPH_XT2 ((tBSP430periphHandle)0x4003)
149 #ifndef configBSP430_PERIPH_EXPOSED_CLOCKS
150 #define configBSP430_PERIPH_EXPOSED_CLOCKS 0
161 #if defined(BSP430_DOXYGEN) || (configBSP430_PERIPH_EXPOSED_CLOCKS - 0)
162 #define BSP430_PERIPH_EXPOSED_CLOCKS ((tBSP430periphHandle)0x4005)
169 #define BSP430_PERIPH_BUTTON0 ((tBSP430periphHandle)0x4101)
174 #define BSP430_PERIPH_BUTTON1 ((tBSP430periphHandle)0x4103)
179 #define BSP430_PERIPH_BUTTON2 ((tBSP430periphHandle)0x4105)
184 #define BSP430_PERIPH_BUTTON3 ((tBSP430periphHandle)0x4107)
187 #define BSP430_PERIPHCFG_DEFAULT 0
193 #define BSP430_PERIPHCFG_SERIAL_UART 1
200 #define BSP430_PERIPHCFG_SERIAL_I2C 2
208 #define BSP430_PERIPHCFG_SERIAL_SPI3 3
215 #define BSP430_PERIPHCFG_SERIAL_SPI4 4
218 #define BSP430_PERIPH_HAL_STATE_CFLAGS_VARIANT_UNKNOWN 0
222 #define BSP430_PERIPH_HAL_STATE_CFLAGS_VARIANT_MASK_ 0x0F
229 #define BSP430_PERIPH_HAL_STATE_CFLAGS_VARIANT(_p) (BSP430_PERIPH_HAL_STATE_CFLAGS_VARIANT_MASK_ & (_p)->hal_state.cflags)
246 #define BSP430_PERIPH_HAL_STATE_CFLAGS_ISR 0x80
265 #define BSP430_PERIPH_HAL_STATE_CFLAGS_ISR2 0x40
345 #define BSP430_HAL_ISR_CALLBACK_BREAK_CHAIN 0x0001
361 #define BSP430_HAL_ISR_CALLBACK_EXIT_LPM 0x0002
369 #define BSP430_HAL_ISR_CALLBACK_YIELD 0x1000
388 #define BSP430_HAL_ISR_CALLBACK_DISABLE_INTERRUPT 0x2000
468 basis |= (*cbpp)->callback_ni(*cbpp, context);
492 basis |= (*cbpp)->callback_ni(*cbpp, context, idx);
506 #define BSP430_HAL_ISR_CALLBACK_TAIL_NI(return_flags_) do { \
507 unsigned int rf = (return_flags_); \
508 if (rf & BSP430_HAL_ISR_CALLBACK_EXIT_LPM) { \
509 rf |= BSP430_CORE_LPM_EXIT_MASK; \
511 BSP430_CORE_LPM_EXIT_FROM_ISR(rf); \
512 if (rf & BSP430_HAL_ISR_CALLBACK_YIELD) { \
513 BSP430_RTOS_YIELD_FROM_ISR(); \
533 #define BSP430_HAL_ISR_CALLBACK_LINK_NI(type_,root_,node_,next_) do { \
534 (node_).next_ = root_; \
558 #define BSP430_HAL_ISR_CALLBACK_UNLINK_NI(type_,root_,node_,next_) do { \
559 typedef type_ tNode_; \
560 const tNode_ * volatile * curp_ = &(root_); \
561 while ((NULL != *curp_) && (&(node_) != *curp_)) { \
562 curp_ = &(((tNode_*)*curp_)->next_); \
564 if (&(node_) == *curp_) { \
565 *curp_ = (node_).next_; \
566 (node_).next_ = NULL; \
Stripped header supporting Doxygen links.
int(* iBSP430halISRCallbackIndexed_ni)(const struct sBSP430halISRIndexedChainNode *cb, void *context, int idx)
Definition: periph.h:420
Common header included by all BSP430 leaf headers.
const unsigned char cflags
Definition: periph.h:278
struct sBSP430hplHALStatePrefix sBSP430hplHALStatePrefix
static BSP430_CORE_INLINE tBSP430periphHandle xBSP430periphFromHPL(volatile void *hpl)
Definition: periph.h:306
const struct sBSP430halISRIndexedChainNode *volatile next_ni
Definition: periph.h:442
static BSP430_CORE_INLINE int iBSP430callbackInvokeISRVoid_ni(const struct sBSP430halISRVoidChainNode *volatile const *cbpp, void *context, int basis)
Definition: periph.h:463
#define BSP430_CORE_INLINE
Definition: core.h:439
struct sBSP430halISRVoidChainNode sBSP430halISRVoidChainNode
volatile unsigned char flags
Definition: periph.h:285
#define BSP430_HAL_ISR_CALLBACK_BREAK_CHAIN
Definition: periph.h:345
iBSP430halISRCallbackVoid_ni callback_ni
Definition: periph.h:433
int(* iBSP430halISRCallbackVoid_ni)(const struct sBSP430halISRVoidChainNode *cb, void *context)
Definition: periph.h:403
static BSP430_CORE_INLINE int iBSP430callbackInvokeISRIndexed_ni(const struct sBSP430halISRIndexedChainNode *volatile const *cbpp, void *context, int idx, int basis)
Definition: periph.h:486
struct sBSP430halISRIndexedChainNode sBSP430halISRIndexedChainNode
int tBSP430periphHandle
Definition: periph.h:106
iBSP430halISRCallbackIndexed_ni callback_ni
Definition: periph.h:445
const struct sBSP430halISRVoidChainNode *volatile next_ni
Definition: periph.h:430