Rewrote timer code.
The new code is based on timestamps, rather than delays. This eliminates the need to update every timer in timer_process(), which cost a non-trivial amount of CPU time on low-end machines. This involved changes to every user of the timer code, so this change almost certainly introduces bugs.
This commit is contained in:
parent
ab359ca9c5
commit
a7d006b637
79 changed files with 1050 additions and 1033 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#include "timer.h"
|
||||
|
||||
void serial1_init(uint16_t addr, int irq);
|
||||
void serial2_init(uint16_t addr, int irq);
|
||||
void serial1_set(uint16_t addr, int irq);
|
||||
|
|
@ -25,7 +27,7 @@ typedef struct
|
|||
uint8_t fifo[256];
|
||||
int fifo_read, fifo_write;
|
||||
|
||||
int recieve_delay;
|
||||
pc_timer_t receive_timer;
|
||||
} SERIAL;
|
||||
|
||||
void serial_write_fifo(SERIAL *serial, uint8_t dat);
|
||||
|
|
|
|||
Loading…
Reference in a new issue