Timer unit with 16Bit counter and 3 output compare units. More...
#include <hwtimer.h>
Public Member Functions | |
HWTimer16_3C (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *tcompB, PinAtPort *outB, IRQLine *tcompC, PinAtPort *outC, IRQLine *ticap, ICaptureSource *icapsrc) | |
void | Reset (void) |
Perform a reset of this unit. | |
Public Attributes | |
IOReg< HWTimer16_3C > | tccra_reg |
control register A | |
IOReg< HWTimer16_3C > | tccrb_reg |
control register B | |
IOReg< HWTimer16_3C > | 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 3 output compare units.
This timer unit is used by following devices: ATMega128.
TCCRxA register contains the following configuration bits (x=timer):
+------+------+------+------+------+------+-----+-----+ |COMxA1|COMxA0|COMxB1|COMxB0|COMxC1|COMxC0|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|FOCxC| - | - | - | - | - | +-----+-----+-----+---+---+---+---+---+
Definition at line 637 of file hwtimer.h.
HWTimer16_3C::HWTimer16_3C | ( | AvrDevice * | core, | |
PrescalerMultiplexer * | p, | |||
int | unit, | |||
IRQLine * | tov, | |||
IRQLine * | tcompA, | |||
PinAtPort * | outA, | |||
IRQLine * | tcompB, | |||
PinAtPort * | outB, | |||
IRQLine * | tcompC, | |||
PinAtPort * | outC, | |||
IRQLine * | ticap, | |||
ICaptureSource * | icapsrc | |||
) |
Definition at line 1215 of file hwtimer.cpp.
unsigned char HWTimer16_3C::Get_TCCRA | ( | ) | [inline, protected] |
unsigned char HWTimer16_3C::Get_TCCRB | ( | ) | [inline, protected] |
unsigned char HWTimer16_3C::Get_TCCRC | ( | ) | [inline, protected] |
void HWTimer16_3C::Reset | ( | void | ) | [virtual] |
Perform a reset of this unit.
Reimplemented from HWTimer16.
Definition at line 1275 of file hwtimer.cpp.
void HWTimer16_3C::Set_TCCRA | ( | unsigned char | val | ) | [protected] |
Register access to set control register A.
Definition at line 1235 of file hwtimer.cpp.
References HWTimer16::ChangeWGM(), BasicTimerUnit::SetCompareOutputMode(), tccra_val, and BasicTimerUnit::wgm.
void HWTimer16_3C::Set_TCCRB | ( | unsigned char | val | ) | [protected] |
Register access to set control register B.
Definition at line 1248 of file hwtimer.cpp.
References HWTimer16::ChangeWGM(), BasicTimerUnit::icapNoiseCanceler, BasicTimerUnit::icapRisingEdge, BasicTimerUnit::SetClockMode(), tccrb_val, and BasicTimerUnit::wgm.
void HWTimer16_3C::Set_TCCRC | ( | unsigned char | val | ) | [protected] |
Register access to set control register C.
Definition at line 1261 of file hwtimer.cpp.
References BasicTimerUnit::SetCompareOutput(), and BasicTimerUnit::WGMisPWM().
control register A
Definition at line 659 of file hwtimer.h.
Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().
unsigned char HWTimer16_3C::tccra_val [protected] |
register value TCCRA
Definition at line 640 of file hwtimer.h.
Referenced by Get_TCCRA(), Reset(), and Set_TCCRA().
control register B
Definition at line 660 of file hwtimer.h.
Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().
unsigned char HWTimer16_3C::tccrb_val [protected] |
register value TCCRB
Definition at line 641 of file hwtimer.h.
Referenced by Get_TCCRB(), Reset(), and Set_TCCRB().
control register C
Definition at line 661 of file hwtimer.h.
Referenced by AvrDevice_at90canbase::AvrDevice_at90canbase(), and AvrDevice_atmega128::AvrDevice_atmega128().