Taos: cleanup GPIO pins.

This commit is contained in:
Maxim Poliakovski 2024-07-11 02:36:01 +02:00
parent 378965cc3d
commit 11bb10b44b
2 changed files with 9 additions and 1 deletions

View File

@ -91,7 +91,8 @@ uint32_t TaosVideo::read(uint32_t rgn_start, uint32_t offset, int size) {
case CRT_CTRL:
return this->crt_ctrl;
case GPIO_IN:
return ((this->mon_id << 29) | (vsync_active << 25)) & ~this->gpio_cfg;
return ((this->mon_id << GPIO_MONID) | (1 << GPIO_CDTRAY) |
(vsync_active << GPIO_VSYNC)) & ~this->gpio_cfg;
case INT_ENABLES:
return this->int_enables;
case TAOS_VERSION:

View File

@ -111,6 +111,13 @@ enum {
MON_ID_VGA = 6 // GPIO_0 = "1", GPIO_1 = "1", GPIO_2 = "0"
};
/** Definitions for the GPIO pins. */
enum {
GPIO_MONID = 29, // GPIO 0..2 are monitor identification pins
GPIO_CDTRAY = 27, // GPIO 4: "1" - CD-ROM tray is closed
GPIO_VSYNC = 25, // GPIO 6: vertical synch input (active low)
};
/** Broktree Bt856 digital video encoder. */
class Bt856 : public I2CDevice, public HWComponent {
public: