Read from the 0xBXXX range of ports */
| 10 | |
| 11 | /* Read from the 0xBXXX range of ports */ |
| 12 | static uint8_t backlight_read(const uint16_t pio, bool peek) { |
| 13 | uint8_t index = (pio >> 2) & 0xFF; |
| 14 | uint8_t value; |
| 15 | (void)peek; |
| 16 | |
| 17 | switch (index) { |
| 18 | case 0x02: /* Ports B008-B00B always read 0 */ |
| 19 | case 0x03: /* Ports B00D-B00F always read 0 */ |
| 20 | case 0x04: /* Ports B00D-B00F always read 0 */ |
| 21 | case 0x07: /* Ports B01C-B01F always read 0 */ |
| 22 | value = 0; |
| 23 | break; |
| 24 | case 0x09: |
| 25 | value = backlight.brightness; |
| 26 | break; |
| 27 | default: |
| 28 | value = backlight.ports[index]; |
| 29 | break; |
| 30 | } |
| 31 | return value; |
| 32 | } |
| 33 | |
| 34 | /* Write to the 0xBXXX range of ports */ |
| 35 | static void backlight_write(const uint16_t pio, const uint8_t byte, bool poke) { |
nothing calls this directly
no outgoing calls
no test coverage detected