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

#include <bsp430/periph/timer.h>

Data Fields

hBSP430halTIMER timer
 
unsigned char ccidx
 
unsigned char flags
 
unsigned long setting_tck
 
iBSP430timerAlarmCallback_ni callback_ni
 
sBSP430halISRVoidChainNode overflow_cb
 
sBSP430halISRIndexedChainNode cc_cb
 

Detailed Description

A structure holding information related to timer-based alarms.

Warning
The contents of this structure must not be manipulated by user code at any time. The primary reason the internals are exposed is so that alarm structures can be statically allocated. Fields may be inspected, though only sBSP430timerAlarm::flags and sBSP430timerAlarm::setting_tck are likely to be of great interest.
Examples:
periph/timer/alarm/main.c, utility/cli/main.c, and utility/u8glib/main.c.

Field Documentation

iBSP430timerAlarmCallback_ni sBSP430timerAlarm::callback_ni

The function invoked by the infrastructure when the alarm goes off. If this is a null pointer, the infrastructure will act as though it was a function that did nothing but return BSP430_HAL_ISR_CALLBACK_EXIT_LPM.

Note
This field is initialized by iBSP430timerAlarmInitialize() and must not be manipulated by user code.
sBSP430halISRIndexedChainNode sBSP430timerAlarm::cc_cb

The callback chain node used when the alarm must be hooked into a capture/compare chain.

Note
This field is initialized by iBSP430timerAlarmInitialize() and maintained by iBSP430timerAlarmSetEnabled_ni(), and must not be manipulated by user code. should not be manipulated by user code.
unsigned char sBSP430timerAlarm::ccidx

The capture/compare resource used by the alarm.

Note
This field is initialized by iBSP430timerAlarmInitialize() and must not be manipulated by user code.
Examples:
periph/timer/alarm/main.c.
unsigned char sBSP430timerAlarm::flags

Assorted flags recording alarm state. Bit values BSP430_TIMER_ALARM_FLAG_SET and BSP430_TIMER_ALARM_FLAG_ENABLED may be inspected; other bits are reserved for internal use.

Note
This field is maintained by the infrastructure and must not be manipulated by user code.
Examples:
periph/timer/alarm/main.c.
sBSP430halISRVoidChainNode sBSP430timerAlarm::overflow_cb

The callback chain node used when the alarm must be hooked into a timer overflow chain.

Note
This field is initialized by iBSP430timerAlarmInitialize() and maintained by iBSP430timerAlarmSetEnabled_ni(), and must not be manipulated by user code. should not be manipulated by user code.
unsigned long sBSP430timerAlarm::setting_tck

The absolute time as determined by timer at which the alarm fired (when the callback is invoked), or at which the next alarm should fire (when returning from callback with BSP430_HAL_ISR_CALLBACK_DISABLE_INTERRUPT cleared). This is the scheduled time of the alarm, not the time at which the callback is entered which is likely to be later due to processing overhead.

Note
This field is maintained by iBSP430timerAlarmSet_ni() and must not be manipulated by user code.
Examples:
periph/timer/alarm/main.c, utility/cli/main.c, and utility/u8glib/main.c.
hBSP430halTIMER sBSP430timerAlarm::timer

The timer registered as owner of this alarm structure.

Examples:
utility/cli/main.c.

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