mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 07:31:15 +00:00
Fix field decoding.
This commit is contained in:
parent
4e077701c9
commit
119c83eb18
@ -46,7 +46,8 @@ class PIT {
|
||||
printf("Set mode on %d\n", channel_id);
|
||||
|
||||
Channel &channel = channels_[channel_id];
|
||||
switch((value >> 1) & 3) {
|
||||
channel.next_write_high = false;
|
||||
switch((value >> 4) & 3) {
|
||||
default:
|
||||
channel.latch_value();
|
||||
return;
|
||||
@ -58,7 +59,7 @@ class PIT {
|
||||
channel.is_bcd = value & 1;
|
||||
channel.next_write_high = false;
|
||||
|
||||
const auto operating_mode = (value >> 3) & 7;
|
||||
const auto operating_mode = (value >> 1) & 7;
|
||||
switch(operating_mode) {
|
||||
default: channel.mode = OperatingMode(operating_mode); break;
|
||||
case 6: channel.mode = OperatingMode::RateGenerator; break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user