mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Slows timer X, to what may or may not be correct.
This commit is contained in:
parent
f8f0ff0fae
commit
2a45e7a8d4
@ -801,7 +801,7 @@ inline void Executor::subtract_duration(int duration) {
|
||||
// Update timer X prescaler.
|
||||
switch(timer_control_ & 0x0c) {
|
||||
default: {
|
||||
const int tx_ticks = update_timer(prescalers_[1], duration * 4); // Update at 3.58Mhz.
|
||||
const int tx_ticks = update_timer(prescalers_[1], t12_ticks); // TODO: don't hard code this. And is this even right?
|
||||
if(update_timer(timers_[2], tx_ticks))
|
||||
timer_control_ |= 0x80; // TODO: interrupt result of this.
|
||||
} break;
|
||||
@ -815,7 +815,6 @@ inline void Executor::subtract_duration(int duration) {
|
||||
LOG("TODO: Timer X; Pulse width measurement mode");
|
||||
break;
|
||||
}
|
||||
// update_timer(timers_[2], update_timer(prescalers_[1], duration));
|
||||
}
|
||||
|
||||
inline int Executor::update_timer(Timer &timer, int count) {
|
||||
|
Loading…
Reference in New Issue
Block a user