diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-22 22:17:18 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-22 22:17:18 +0200 |
commit | 13435bfc961fd2abd5f688ce37e94d5f96b0873b (patch) | |
tree | b295a28626d56e244215b04d71173967a4239bc6 /src/hardware/port.h | |
parent | 107de40014ade48725b991dbe46f5d172da1078b (diff) | |
download | abaos-13435bfc961fd2abd5f688ce37e94d5f96b0873b.tar.gz abaos-13435bfc961fd2abd5f688ce37e94d5f96b0873b.tar.bz2 |
added 16-bit port class
Diffstat (limited to 'src/hardware/port.h')
-rw-r--r-- | src/hardware/port.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/hardware/port.h b/src/hardware/port.h index 8203fea..d083220 100644 --- a/src/hardware/port.h +++ b/src/hardware/port.h @@ -12,7 +12,15 @@ void port8_write( port8_t *port, uint8_t data ); uint8_t port8_read( port8_t *port ); typedef struct { - uint16_t number; // port number, e.g. 0x3d4 VGA index register + uint16_t number; +} port16_t; + +void port16_init( port16_t *port, uint16_t number ); +void port16_write( port16_t *port, uint16_t data ); +uint16_t port16_read( port16_t *port ); + +typedef struct { + uint16_t number; } port32_t; void port32_init( port32_t *port, uint16_t number ); |