simulavr
1.1.0
|
PWM output unit for timer 1 on ATtiny25/45/85. More...
#include <hwtimer.h>
Public Member Functions | |
TimerTinyX5_OCR (const PinAtPort &pinOut, const PinAtPort &pinOutInv) | |
void | Reset () |
Reset internal states on device reset. More... | |
void | DTClockCycle () |
Run one clock cycle from dead time prescaler. More... | |
void | TimerEvent (bool isCompareEvent) |
OCR event. More... | |
void | ForceEvent () |
Manual change of OCR unit by force bit. More... | |
void | SetDeadTime (int highTime, int lowTime) |
Configure dead time counter. More... | |
void | SetOCRMode (bool isPWM, int comMode) |
Configure OCR mode. More... | |
Private Member Functions | |
void | SetPWM (bool isCompareEvent) |
Calculate output pin value (before dead time generator) More... | |
void | SetDeadTime (bool pwmValue) |
Calculate output pin value after dead time generator. More... | |
Private Attributes | |
PinAtPort | outPin |
normal output pin for OCR unit More... | |
PinAtPort | outPinInv |
inverted output pin for OCR unit More... | |
int | ocrComMode |
COM mode. More... | |
bool | ocrPWM |
flag, if OCR unit is in PWM mode More... | |
bool | ocrOut |
OCR status before dead time generator. More... | |
int | dtHigh |
dead time raise delay More... | |
int | dtLow |
dead time fall delay More... | |
int | dtCounter |
dead time counter More... | |
PWM output unit for timer 1 on ATtiny25/45/85.
Supports the different output control modes for a OCR unit on timer 1 in ATtiny25/45/85 devices, contains also implementation of dead time generator
Definition at line 1745 of file hwtimer.cpp.
References HWTimerTinyX5::Reset().
void TimerTinyX5_OCR::DTClockCycle | ( | ) |
Run one clock cycle from dead time prescaler.
Definition at line 1761 of file hwtimer.cpp.
Referenced by HWTimerTinyX5::TimerCounter().
|
inline |
Manual change of OCR unit by force bit.
Definition at line 733 of file hwtimer.h.
Referenced by HWTimerTinyX5::TransferInputValues().
void TimerTinyX5_OCR::Reset | ( | void | ) |
Reset internal states on device reset.
Definition at line 1752 of file hwtimer.cpp.
Referenced by HWTimerTinyX5::Reset().
|
private |
Calculate output pin value after dead time generator.
Definition at line 1872 of file hwtimer.cpp.
Referenced by HWTimerTinyX5::TransferInputValues().
|
inline |
void TimerTinyX5_OCR::SetOCRMode | ( | bool | isPWM, |
int | comMode | ||
) |
Configure OCR mode.
Definition at line 1774 of file hwtimer.cpp.
Referenced by HWTimerTinyX5::TransferInputValues().
|
private |
Calculate output pin value (before dead time generator)
Definition at line 1801 of file hwtimer.cpp.
|
inline |
|
private |
|
private |
|
private |
|
private |