enum ITimer_A.CAP_t |
|
enum CAP_t {
CAP_OFF,
// Compare mode
CAP
// Capture mode
};
enum ITimer_A.CCIE_t |
|
enum CCIE_t {
CCIE_OFF,
CCIE
};
enum ITimer_A.CCIFG_t |
|
enum CCIFG_t {
CCIFG_OFF,
CCIFG
};
enum ITimer_A.CCIS_t |
|
enum CCIS_t {
CCIS_0,
// CCIxA
CCIS_1,
// CCIxB
CCIS_2,
// GND
CCIS_3
// Vcc
};
enum ITimer_A.CCI_t |
|
enum CCI_t {
CCI_OFF,
CCI
};
enum ITimer_A.CM_t |
|
enum CM_t {
CM_0,
// No Capture
CM_1,
// Rising Edge
CM_2,
// Falling Edge
CM_3
// Both Edges
};
enum ITimer_A.COV_t |
|
enum COV_t {
COV_OFF,
COV
};
enum ITimer_A.ID_t |
|
enum ID_t {
ID_0,
// Divider - /1
ID_1,
// Divider - /2
ID_2,
// Divider - /4
ID_3
// Divider - /8
};
enum ITimer_A.IVValues |
|
TA3IV Definitions
enum IVValues {
TAIV_NONE,
// No Interrupt pending
TAIV_TACCR1,
// TACCR1_CCIFG
TAIV_TACCR2,
// TACCR2_CCIFG
TAIV_6,
// Reserved
TAIV_8,
// Reserved
TAIV_TAIFG
// TAIFG
};
enum ITimer_A.MC_t |
|
enum MC_t {
MC_0,
// Stop Mode
MC_1,
// Up Mode
MC_2,
// Continuous Mode
MC_3
// Up/Down Mode
};
enum ITimer_A.OUTMOD_t |
|
enum OUTMOD_t {
OUTMOD_0,
// PWM output mode: 0 - OUT bit value
OUTMOD_1,
// PWM output mode: 1 - Set
OUTMOD_2,
// PWM output mode: 2 - PWM toggle/reset
OUTMOD_3,
// PWM output mode: 3 - PWM set/reset
OUTMOD_4,
// PWM output mode: 4 - Toggle
OUTMOD_5,
// PWM output mode: 5 - Reset
OUTMOD_6,
// PWM output mode: 6 - PWM toggle/set
OUTMOD_7
// PWM output mode: 7 - PWM reset/set
};
enum ITimer_A.OUT_t |
|
enum OUT_t {
OUT_OFF,
OUT
};
enum ITimer_A.SCCI_t |
|
enum SCCI_t {
SCCI_OFF,
// Latched capture signal (read)
SCCI
// Latched capture signal (read)
};
enum ITimer_A.SCS_t |
|
enum SCS_t {
SCS_OFF,
// Asynchronous Capture
SCS
// Sychronous Capture
};
enum ITimer_A.TACLR_t |
|
enum TACLR_t {
TACLR_OFF,
TACLR
};
enum ITimer_A.TAIE_t |
|
enum TAIE_t {
TAIE_OFF,
TAIE
};
enum ITimer_A.TAIFG_t |
|
enum TAIFG_t {
TAIFG_OFF,
TAIFG
};
enum ITimer_A.TASSEL_t |
|
enum TASSEL_t {
TASSEL_0,
// TACLK
TASSEL_1,
// ACLK
TASSEL_2,
// SMCLK
TASSEL_3
// INCLK
};
typedef ITimer_A.IPeripheralArray |
|
typedef ITimer_A.StringArray |
|
typedef String StringArray[];
struct ITimer_A.ForceSetDefaultRegister_t |
|
Force Set Default Register
metaonly struct ForceSetDefaultRegister_t {
String register;
Bool regForceSet;
};
DETAILS
Type to store if each register needs to be forced initialized
even if the register is in default state.
SEE
struct ITimer_A.TACCTLx_t |
|
Capture/Compare Control Register
metaonly struct TACCTLx_t {
// Capture mode
00 No capture
01 Capture on rising edge
10 Capture on falling edge
11 Capture on both rising and falling edges
// Capture/compare input select. These bits select the TACCRx input signal.
See the device-specific data sheet for specific signal connections.
00 CCIxA
01 CCIxB
10 GND
11 VCC
// Synchronize capture source. This bit is used to synchronize the capture input
signal with the timer clock.
0 Asynchronous capture
1 Synchronous capture
// Synchronized capture/compare input. The selected CCI input signal is
latched with the EQUx signal and can be read via this bit
// Capture mode
0 Compare mode
1 Capture mode
// Output mode. Modes 2, 3, 6, and 7 are not useful for TACCR0 because
EQUx = EQU0.
000 OUT bit value
001 Set
010 Toggle/reset
011 Set/reset
100 Toggle
101 Reset
110 Toggle/set
111 Reset/set
// Capture/compare interrupt enable. This bit enables the interrupt request of
the corresponding CCIFG flag.
0 Interrupt disabled
1 Interrupt enabled
// Capture/compare input. The selected input signal can be read by this bit
// Output. For output mode 0, this bit directly controls the state of the output.
0 Output low
1 Output high
// Capture overflow. This bit indicates a capture overflow occurred. COV must
be reset with software.
0 No capture overflow occurred
1 Capture overflow occurred
// Capture/compare interrupt flag
0 No interrupt pending
1 Interrupt pending
};
SEE
struct ITimer_A.TACTL_t |
|
Timer_A Control Register
metaonly struct TACTL_t {
// Timer_A clock source select
00 TACLK
01 ACLK
10 SMCLK
11 INCLK
// Input divider. These bits select the divider for the input clock.
00 /1
01 /2
10 /4
11 /8
// Mode control. Setting MCx = 00h when Timer_A is not in use conserves
power.
00 Stop mode: the timer is halted.
01 Up mode: the timer counts up to TACCR0.
10 Continuous mode: the timer counts up to 0FFFFh.
11 Up/down mode: the timer counts up to TACCR0 then down to 0000h
// Timer_A clear. Setting this bit resets TAR, the clock divider, and the count
direction. The TACLR bit is automatically reset and is always read as zero
// Timer_A interrupt enable. This bit enables the TAIFG interrupt request.
0 Interrupt disabled
1 Interrupt enabled
// Timer_A interrupt flag
0 No interrupt pending
1 Interrupt pending
};
SEE
struct ITimer_A.regIntVect_t |
|
Interrupt vector description
metaonly struct regIntVect_t {
String registerName;
String registerDescription;
String isrToggleString;
String priorityName;
Bool interruptEnable;
Bool interruptHandler;
Int priority;
};
DETAILS
Type to describe a single interrupt vector pin and all its possible
configurations.
SEE
ITimer_A.getAll() // module-wide |
|
Find all peripherals of a certain type
DETAILS
The type of the peripherals returned is defined by the type of the
caller.
RETURNS
Returns an array of IPeripheral instances
ITimer_A.getRegisters() // module-wide |
|
Find all registers defined by the peripheral
RETURNS
Returns an array of register names
config ITimer_A.INCLK // instance |
|
Timer_A INCLK
config ITimer_A.TACLK // instance |
|
Timer_A TACLK
config ITimer_A.baseAddr // instance |
|
Address of the peripheral's control register
DETAILS
A peripheral's registers are commonly accessed through a structure
that defines the offsets of a particular register from the lowest
address mapped to a peripheral. That lowest address is specified by
this parameter.
config ITimer_A.intNum // instance |
|
Interrupt source number
config ITimer_A.isInternal // instance |
|
Boolean that is true if a Timer is internal, meaning
it has no external inputs or outputs
config Bool isInternal = false;
config ITimer_A.name // instance |
|
Specific peripheral name given by the device
DETAILS
Devices can have more than one peripheral of the same type. In such
cases, device data sheets give different names to the instances of a
same peripheral. For example, the name for a timer module could be
TimerA3, and a device that has two such timers can name them TA0
and TA1.
config ITimer_A.numberOfTimers // instance |
|
Stores the number of available timer capture compare blocks
config UChar numberOfTimers;
config ITimer_A.owner // instance |
|
String specifying the entity that manages the peripheral
Instance Creation |
|
// Create an instance-object
ITimer_A.getTxxCCRx() // instance |
|
Returns TxxCCRx register value based on which CCR register
Bits16 getTxxCCRx(UChar ccrNumber);
SEE
ITimer_A.setTxxCCRx() // instance |
|
Sets TxxCCRx register value based on which CCR register
Void setTxxCCRx(UChar ccrNumber, Bits16 value);
SEE