Timer unit with 16Bit counter and 2 output compare units, but 3 config registers. More...
#include <hwtimer.h>
Public Member Functions | |
HWTimer16_2C3 (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *tcompB, PinAtPort *outB, IRQLine *ticap, ICaptureSource *icapsrc) | |
void | Reset (void) |
Perform a reset of this unit. | |
Public Attributes | |
IOReg< HWTimer16_2C3 > | tccra_reg |
control register A | |
IOReg< HWTimer16_2C3 > | tccrb_reg |
control register B | |
IOReg< HWTimer16_2C3 > | tccrc_reg |
control register C | |
Protected Member Functions | |
void | Set_TCCRA (unsigned char val) |
Register access to set control register A. | |
unsigned char | Get_TCCRA () |
Register access to read control register A. | |
void | Set_TCCRB (unsigned char val) |
Register access to set control register B. | |
unsigned char | Get_TCCRB () |
Register access to read control register B. | |
void | Set_TCCRC (unsigned char val) |
Register access to set control register C. | |
unsigned char | Get_TCCRC () |
Register access to read control register C. | |
Protected Attributes | |
unsigned char | tccra_val |
register value TCCRA | |
unsigned char | tccrb_val |
register value TCCRB |
Timer unit with 16Bit counter and 2 output compare units, but 3 config registers.
This timer unit is used by following devices: ATMega48/88/168/328.
TCCRxA register contains the following configuration bits (x=timer):
+------+------+------+------+---+---+-----+-----+ |COMxA1|COMxA0|COMxB1|COMxB0| - | - |WGMx1|WGMx0| +------+------+------+------+---+---+-----+-----+
TCCRxB register contains the following configuration bits (x=timer):
+----+------+---+-----+-----+----+----+----+ |ICNCx|ICESx| - |WGMx3|WGMx2|CSx2|CSx1|CSx0| +----+------+---+-----+-----+----+----+----+
TCCRxC register contains the following configuration bits (x=timer):
+-----+-----+---+---+---+---+---+---+ |FOCxA|FOCxB| - | - | - | - | - | - | +-----+-----+---+---+---+---+---+---+
Definition at line 574 of file hwtimer.h.
HWTimer16_2C3::HWTimer16_2C3 | ( | AvrDevice * | core, | |
PrescalerMultiplexer * | p, | |||
int | unit, | |||
IRQLine * | tov, | |||
IRQLine * | tcompA, | |||
PinAtPort * | outA, | |||
IRQLine * | tcompB, | |||
PinAtPort * | outB, | |||
IRQLine * | ticap, | |||
ICaptureSource * | icapsrc | |||
) |
Definition at line 1155 of file hwtimer.cpp.
unsigned char HWTimer16_2C3::Get_TCCRA | ( | ) | [inline, protected] |
unsigned char HWTimer16_2C3::Get_TCCRB | ( | ) | [inline, protected] |
unsigned char HWTimer16_2C3::Get_TCCRC | ( | ) | [inline, protected] |
void HWTimer16_2C3::Reset | ( | void | ) | [virtual] |
Perform a reset of this unit.
Reimplemented from HWTimer16.
Definition at line 1209 of file hwtimer.cpp.
void HWTimer16_2C3::Set_TCCRA | ( | unsigned char | val | ) | [protected] |
Register access to set control register A.
Definition at line 1173 of file hwtimer.cpp.
References HWTimer16::ChangeWGM(), BasicTimerUnit::SetCompareOutputMode(), tccra_val, and BasicTimerUnit::wgm.
void HWTimer16_2C3::Set_TCCRB | ( | unsigned char | val | ) | [protected] |
Register access to set control register B.
Definition at line 1185 of file hwtimer.cpp.
References HWTimer16::ChangeWGM(), BasicTimerUnit::icapNoiseCanceler, BasicTimerUnit::icapRisingEdge, BasicTimerUnit::SetClockMode(), tccrb_val, and BasicTimerUnit::wgm.
void HWTimer16_2C3::Set_TCCRC | ( | unsigned char | val | ) | [protected] |
Register access to set control register C.
Definition at line 1198 of file hwtimer.cpp.
References BasicTimerUnit::SetCompareOutput(), and BasicTimerUnit::WGMisPWM().
control register A
Definition at line 596 of file hwtimer.h.
Referenced by AvrDevice_atmega1284Abase::AvrDevice_atmega1284Abase(), AvrDevice_atmega668base::AvrDevice_atmega668base(), and AvrDevice_attiny2313::AvrDevice_attiny2313().
unsigned char HWTimer16_2C3::tccra_val [protected] |
register value TCCRA
Definition at line 577 of file hwtimer.h.
Referenced by Get_TCCRA(), Reset(), and Set_TCCRA().
control register B
Definition at line 597 of file hwtimer.h.
Referenced by AvrDevice_atmega1284Abase::AvrDevice_atmega1284Abase(), AvrDevice_atmega668base::AvrDevice_atmega668base(), and AvrDevice_attiny2313::AvrDevice_attiny2313().
unsigned char HWTimer16_2C3::tccrb_val [protected] |
register value TCCRB
Definition at line 578 of file hwtimer.h.
Referenced by Get_TCCRB(), Reset(), and Set_TCCRB().
control register C
Definition at line 598 of file hwtimer.h.
Referenced by AvrDevice_atmega1284Abase::AvrDevice_atmega1284Abase(), AvrDevice_atmega668base::AvrDevice_atmega668base(), and AvrDevice_attiny2313::AvrDevice_attiny2313().