Less magic numbers in PIT code
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#ifndef EMU_PIT_H
|
||||
#define EMU_PIT_H
|
||||
|
||||
#define NUM_COUNTERS 3
|
||||
|
||||
typedef struct ctr_t {
|
||||
uint8_t m;
|
||||
uint8_t ctrl;
|
||||
@@ -68,7 +70,7 @@ typedef struct PIT {
|
||||
int clock;
|
||||
pc_timer_t callback_timer;
|
||||
|
||||
ctr_t counters[3];
|
||||
ctr_t counters[NUM_COUNTERS];
|
||||
|
||||
uint8_t ctrl;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef struct ctrf_t {
|
||||
|
||||
typedef struct pitf_t {
|
||||
int flags;
|
||||
ctrf_t counters[3];
|
||||
ctrf_t counters[NUM_COUNTERS];
|
||||
|
||||
uint8_t ctrl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user