cpu: define get_reg functions as const

This will be useful in the future when we want to reference the CPU
state in a const-way.
This commit is contained in:
2017-05-31 21:39:46 -07:00
parent e062a40571
commit f76d384e6d
2 changed files with 13 additions and 6 deletions

View File

@@ -100,11 +100,18 @@ void lr35902_init(struct lr35902_state *cpu,
lr35902_mem_read_fn mem_read,
lr35902_mem_write_fn mem_write);
uint16_t lr35902_get_reg_16(struct lr35902_state *cpu, lr35902_regs_16 reg);
uint8_t lr35902_get_reg_8(struct lr35902_state *cpu, lr35902_regs_8 reg);
void lr35902_set_reg_16(struct lr35902_state *cpu, lr35902_regs_16 reg,
uint16_t lr35902_get_reg_16(const struct lr35902_state *cpu,
lr35902_regs_16 reg);
uint8_t lr35902_get_reg_8(const struct lr35902_state *cpu,
lr35902_regs_8 reg);
void lr35902_set_reg_16(struct lr35902_state *cpu,
lr35902_regs_16 reg,
uint16_t val);
void lr35902_set_reg_8(struct lr35902_state *cpu, lr35902_regs_8 reg,
void lr35902_set_reg_8(struct lr35902_state *cpu,
lr35902_regs_8 reg,
uint8_t val);
void lr35902_cycle(struct lr35902_state *cpu);