Timer unit with 16Bit counter and one output compare unit. More...
#include <hwtimer.h>


Public Member Functions | |
| HWTimer16_1C (AvrDevice *core, PrescalerMultiplexer *p, int unit, IRQLine *tov, IRQLine *tcompA, PinAtPort *outA, IRQLine *ticap, ICaptureSource *icapsrc) | |
| void | Reset (void) |
| Perform a reset of this unit. | |
Public Attributes | |
| IOReg< HWTimer16_1C > | tccra_reg |
| control register A | |
| IOReg< HWTimer16_1C > | tccrb_reg |
| control register B | |
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. | |
Protected Attributes | |
| unsigned char | tccra_val |
| register value TCCRA | |
| unsigned char | tccrb_val |
| register value TCCRB | |
Private Member Functions | |
| void | Set_WGM (int val) |
| Handle special WGM setting, translate wgm raw value to wgm value. | |
Private Attributes | |
| int | wgm_raw |
| this is the wgm raw value from register | |
Timer unit with 16Bit counter and one output compare unit.
This timer unit is used by following devices: AT90[L]S4433.
TCCRxA register contains the following configuration bits (x=timer):
+-----+-----+---+---+---+---+-----+-----+ |COMx1|COMx0| - | - | - | - |PWMx1|PWMx0| +-----+-----+---+---+---+---+-----+-----+
TCCRxB register contains the following configuration bits (x=timer):
+-----+-----+---+---+----+----+----+----+ |ICNCx|ICESx| - | - |CTCx|CSx2|CSx1|CSx0| +-----+-----+---+---+----+----+----+----+
Definition at line 451 of file hwtimer.h.
| HWTimer16_1C::HWTimer16_1C | ( | AvrDevice * | core, | |
| PrescalerMultiplexer * | p, | |||
| int | unit, | |||
| IRQLine * | tov, | |||
| IRQLine * | tcompA, | |||
| PinAtPort * | outA, | |||
| IRQLine * | ticap, | |||
| ICaptureSource * | icapsrc | |||
| ) |
Definition at line 1012 of file hwtimer.cpp.
| unsigned char HWTimer16_1C::Get_TCCRA | ( | ) | [inline, protected] |
| unsigned char HWTimer16_1C::Get_TCCRB | ( | ) | [inline, protected] |
| void HWTimer16_1C::Reset | ( | void | ) | [virtual] |
| void HWTimer16_1C::Set_TCCRA | ( | unsigned char | val | ) | [protected] |
Register access to set control register A.
Definition at line 1046 of file hwtimer.cpp.
References Set_WGM(), BasicTimerUnit::SetCompareOutputMode(), tccra_val, and wgm_raw.

| void HWTimer16_1C::Set_TCCRB | ( | unsigned char | val | ) | [protected] |
Register access to set control register B.
Definition at line 1056 of file hwtimer.cpp.
References BasicTimerUnit::icapNoiseCanceler, BasicTimerUnit::icapRisingEdge, Set_WGM(), BasicTimerUnit::SetClockMode(), tccrb_val, and wgm_raw.

| void HWTimer16_1C::Set_WGM | ( | int | val | ) | [private] |
Handle special WGM setting, translate wgm raw value to wgm value.
Definition at line 1026 of file hwtimer.cpp.
References HWTimer16::ChangeWGM(), BasicTimerUnit::WGM_CTC_OCRA, BasicTimerUnit::WGM_NORMAL, BasicTimerUnit::WGM_PCPWM_10BIT, BasicTimerUnit::WGM_PCPWM_8BIT, BasicTimerUnit::WGM_PCPWM_9BIT, and wgm_raw.
Referenced by Set_TCCRA(), and Set_TCCRB().


control register A
Definition at line 474 of file hwtimer.h.
Referenced by AvrDevice_at90s4433::AvrDevice_at90s4433().
unsigned char HWTimer16_1C::tccra_val [protected] |
register value TCCRA
Definition at line 460 of file hwtimer.h.
Referenced by Get_TCCRA(), Reset(), and Set_TCCRA().
control register B
Definition at line 475 of file hwtimer.h.
Referenced by AvrDevice_at90s4433::AvrDevice_at90s4433().
unsigned char HWTimer16_1C::tccrb_val [protected] |
register value TCCRB
Definition at line 461 of file hwtimer.h.
Referenced by Get_TCCRB(), Reset(), and Set_TCCRB().
int HWTimer16_1C::wgm_raw [private] |
this is the wgm raw value from register
Definition at line 454 of file hwtimer.h.
Referenced by Reset(), Set_TCCRA(), Set_TCCRB(), and Set_WGM().
1.6.3