Skip to content

Commit 11bb10b

Browse files
Taos: cleanup GPIO pins.
1 parent 378965c commit 11bb10b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

devices/video/taos.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ uint32_t TaosVideo::read(uint32_t rgn_start, uint32_t offset, int size) {
9191
case CRT_CTRL:
9292
return this->crt_ctrl;
9393
case GPIO_IN:
94-
return ((this->mon_id << 29) | (vsync_active << 25)) & ~this->gpio_cfg;
94+
return ((this->mon_id << GPIO_MONID) | (1 << GPIO_CDTRAY) |
95+
(vsync_active << GPIO_VSYNC)) & ~this->gpio_cfg;
9596
case INT_ENABLES:
9697
return this->int_enables;
9798
case TAOS_VERSION:

devices/video/taos.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ enum {
111111
MON_ID_VGA = 6 // GPIO_0 = "1", GPIO_1 = "1", GPIO_2 = "0"
112112
};
113113

114+
/** Definitions for the GPIO pins. */
115+
enum {
116+
GPIO_MONID = 29, // GPIO 0..2 are monitor identification pins
117+
GPIO_CDTRAY = 27, // GPIO 4: "1" - CD-ROM tray is closed
118+
GPIO_VSYNC = 25, // GPIO 6: vertical synch input (active low)
119+
};
120+
114121
/** Broktree Bt856 digital video encoder. */
115122
class Bt856 : public I2CDevice, public HWComponent {
116123
public:

0 commit comments

Comments
 (0)