| 136 | } |
| 137 | |
| 138 | static uint8_t gpt_read(uint16_t address, bool peek) { |
| 139 | uint8_t value = 0; |
| 140 | uint8_t index = address >> 2; |
| 141 | uint8_t bit_offset = (address & 3) << 3; |
| 142 | (void)peek; |
| 143 | |
| 144 | if (index < 0xC && (index & 3) == 0) { |
| 145 | value = read8(gpt_peek_counter(index >> 2), bit_offset); |
| 146 | } else if (address < 0x40) { |
| 147 | value = read8(gpt.regs[index], bit_offset); |
| 148 | } |
| 149 | return value; |
| 150 | } |
| 151 | |
| 152 | static void gpt_write(uint16_t address, uint8_t value, bool poke) { |
| 153 | int timer; |
nothing calls this directly
no test coverage detected