megadrive_test2
annotate src/io.h @ 7:108ecc582a11
defined all the I/O register addresses in io.h
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Jun 2017 06:49:50 +0300 |
parents | df2c6b3c6f2e |
children | 403367d5df5a |
rev | line source |
---|---|
nuclear@6 | 1 #ifndef MEGADRIVE_IO_H_ |
nuclear@6 | 2 #define MEGADRIVE_IO_H_ |
nuclear@6 | 3 |
nuclear@7 | 4 #include <stdint.h> |
nuclear@7 | 5 |
nuclear@7 | 6 #define IO_REG_VER *((volatile uint8_t*)0xa10001) |
nuclear@7 | 7 #define IO_REG_DATA1 *((volatile uint8_t*)0xa10003) |
nuclear@7 | 8 #define IO_REG_DATA2 *((volatile uint8_t*)0xa10005) |
nuclear@7 | 9 #define IO_REG_DATA3 *((volatile uint8_t*)0xa10007) |
nuclear@7 | 10 #define IO_REG_CTRL1 *((volatile uint8_t*)0xa10009) |
nuclear@7 | 11 #define IO_REG_CTRL2 *((volatile uint8_t*)0xa1000b) |
nuclear@7 | 12 #define IO_REG_CTRL3 *((volatile uint8_t*)0xa1000d) |
nuclear@7 | 13 #define IO_REG_TXDATA1 *((volatile uint8_t*)0xa1000f) |
nuclear@7 | 14 #define IO_REG_RXDATA1 *((volatile uint8_t*)0xa10011) |
nuclear@7 | 15 #define IO_REG_S_CTRL1 *((volatile uint8_t*)0xa10013) |
nuclear@7 | 16 #define IO_REG_TXDATA2 *((volatile uint8_t*)0xa10015) |
nuclear@7 | 17 #define IO_REG_RXDATA2 *((volatile uint8_t*)0xa10017) |
nuclear@7 | 18 #define IO_REG_S_CTRL2 *((volatile uint8_t*)0xa10013) |
nuclear@7 | 19 #define IO_REG_TXDATA3 *((volatile uint8_t*)0xa1001b) |
nuclear@7 | 20 #define IO_REG_RXDATA3 *((volatile uint8_t*)0xa1001d) |
nuclear@7 | 21 #define IO_REG_S_CTRL3 *((volatile uint8_t*)0xa1001f) |
nuclear@7 | 22 #define IO_REG_LOCK *((volatile uint8_t*)0xa14000) |
nuclear@7 | 23 #define IO_REG_TMSS *((volatile uint8_t*)0xa14101) |
nuclear@7 | 24 |
nuclear@6 | 25 |
nuclear@6 | 26 enum { |
nuclear@6 | 27 IO_VER_VERSION_MASK = 0x0f, |
nuclear@6 | 28 IO_VER_EXP = 0x20, |
nuclear@6 | 29 IO_VER_PAL = 0x40, |
nuclear@6 | 30 IO_VER_NONJP = 0x80 |
nuclear@6 | 31 }; |
nuclear@6 | 32 |
nuclear@6 | 33 #endif /* MEGADRIVE_IO_H_ */ |