NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A single counter of a PIT. More...
Public Member Functions | |
void | read_back (unsigned char value) |
void | set_modus (unsigned char modus) |
Set the modus of the counter. | |
void | set_gate (unsigned char value) |
Manipulate the gate. | |
bool | get_out () |
unsigned char | read () |
Read from the counter port. | |
void | write (unsigned char value) |
Write to the counter port. | |
bool | receive (MessageIrqNotify &msg) |
bool | receive (MessageTimeout &msg) |
PitCounter (DBus< MessageTimer > *bus_timer, DBus< MessageIrqLines > *bus_irq, unsigned irq, Clock *clock) | |
PitCounter () | |
Public Member Functions inherited from StaticReceiver< PitCounter > | |
StaticReceiver () | |
Public Member Functions inherited from Device | |
void | debug_dump () |
Device (const char *debug_name) |
Private Types | |
enum | Modes { BCD = 0x001, RW_LOW = 0x010, RW_HIGH = 0x020, NULL_COUNT = 0x040 } |
enum | Features { FPERIODIC = 1 << 0, FSOFTWARE_TRIGGER = 1 << 1, FGATE_DISABLE_COUNTING = 1 << 2, FSQUARE_WAVE = 1 << 3, FCOUNTDOWN = 1 << 4 } |
Private Member Functions | |
bool | feature (Features f) |
unsigned short | s2bcd (unsigned short value) |
unsigned short | bcd2s (unsigned short value) |
void | load_counter () |
void | disable_counting () |
void | update_timer () |
Rearm a new timeout. | |
unsigned short | get_counter () |
Get the current counter value. | |
void | reload_counter () |
Private Attributes | |
unsigned short | _modus |
unsigned short | _latch |
unsigned short | _new_counter |
unsigned | _initial |
unsigned char | _latched_status |
struct { | |
unsigned char _read_low: 1 | |
unsigned char _wrote_low: 1 | |
unsigned char _stopped: 1 | |
unsigned char _stopped_out: 1 | |
unsigned char _gate: 1 | |
unsigned char _lstatus: 1 | |
unsigned char _latched: 2 | |
}; | |
timevalue | _start |
DBus< MessageTimer > * | _bus_timer |
DBus< MessageIrqLines > * | _bus_irq |
unsigned | _irq |
Clock | _clock |
unsigned | _timer |
Static Private Attributes | |
static const long | FREQ = 1193180 |
Friends | |
class | PitTest |
Additional Inherited Members | |
Static Public Member Functions inherited from StaticReceiver< PitCounter > | |
static bool | receive_static (Device *o, M &msg) |
A single counter of a PIT.
State: stable Implementation Note: the access to the _modus variable is not SMP safe. Documentation: Intel 82c54 - intel-82c54-timer.pdf
|
private |
|
private |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Get the current counter value.
|
inline |
|
inlineprivate |
|
inline |
Read from the counter port.
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
Manipulate the gate.
|
inline |
Set the modus of the counter.
|
inlineprivate |
Rearm a new timeout.
|
inline |
Write to the counter port.
|
friend |
struct { ... } |
|
private |
|
private |
|
private |
unsigned char PitCounter::_gate |
|
private |
|
private |
|
private |
unsigned char PitCounter::_latched |
|
private |
unsigned char PitCounter::_lstatus |
|
private |
|
private |
unsigned char PitCounter::_read_low |
|
private |
unsigned char PitCounter::_stopped |
unsigned char PitCounter::_stopped_out |
|
private |
unsigned char PitCounter::_wrote_low |
|
staticprivate |