BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
sBSP430halTIMER Struct Reference

#include <bsp430/periph/timer.h>

Data Fields

sBSP430hplHALStatePrefix hal_state
volatile sBSP430hplTIMER *const hpl
unsigned long overflow_count
const struct sBSP430halISRVoidChainNode *volatile overflow_cbchain_ni
const struct sBSP430halISRIndexedChainNode *volatile *const cc_cbchain_ni

Detailed Description

Structure holding hardware abstraction layer state for Timer_A and Timer_B.


Field Documentation

const struct sBSP430halISRIndexedChainNode* volatile* const sBSP430halTIMER::cc_cbchain_ni

The callback chain to invoke when a CCx interrupt is received.

The chains are independent for each capture/compare block, but the block index is passed into the chain so that a common handler can be invoked if desired. The chain for CC0 is accessed only if the corresponding ISR is enabled (e.g., configBSP430_HAL_TA0_CC0_ISR)

sBSP430hplHALStatePrefix sBSP430halTIMER::hal_state

Common header used to extract the correct HPL pointer type from the hpl union and to hold hints about the timer's configuration.

volatile sBSP430hplTIMER* const sBSP430halTIMER::hpl

The underlying timer peripheral register structure

periph/timer/alarm/main.c, and sensors/hh10d/main.c.
const struct sBSP430halISRVoidChainNode* volatile sBSP430halTIMER::overflow_cbchain_ni

The callback chain to invoke when an overflow interrupt is received.

This pointer, and the pointers for any sBSP430halISRVoidChainNode.next_ni fields in chain nodes accessed through it, must be mutated only when interrupts are disabled.
unsigned long sBSP430halTIMER::overflow_count

The number of times the timer has wrapped.

The value is maintained only if the corresponding HAL ISR is enabled for the timer and the overflow interrupt is explicitly enabled by the application. It is also only accurate if interrupts are enabled, as the value is incremented by the interrupt handler itself.

This field is not marked volatile because doing so costs several extra instructions due to it being a multi-word value. It should be read and written only when interrupts are disabled.

The documentation for this struct was generated from the following file: