megadrive_test2

changeset 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
files src/io.h
diffstat 1 files changed, 21 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/io.h	Wed Jun 21 06:32:10 2017 +0300
     1.2 +++ b/src/io.h	Wed Jun 21 06:49:50 2017 +0300
     1.3 @@ -1,7 +1,27 @@
     1.4  #ifndef MEGADRIVE_IO_H_
     1.5  #define MEGADRIVE_IO_H_
     1.6  
     1.7 -#define IO_REG_VER	*((volatile uint8_t*)0xa10001)
     1.8 +#include <stdint.h>
     1.9 +
    1.10 +#define IO_REG_VER		*((volatile uint8_t*)0xa10001)
    1.11 +#define IO_REG_DATA1	*((volatile uint8_t*)0xa10003)
    1.12 +#define IO_REG_DATA2	*((volatile uint8_t*)0xa10005)
    1.13 +#define IO_REG_DATA3	*((volatile uint8_t*)0xa10007)
    1.14 +#define IO_REG_CTRL1	*((volatile uint8_t*)0xa10009)
    1.15 +#define IO_REG_CTRL2	*((volatile uint8_t*)0xa1000b)
    1.16 +#define IO_REG_CTRL3	*((volatile uint8_t*)0xa1000d)
    1.17 +#define IO_REG_TXDATA1	*((volatile uint8_t*)0xa1000f)
    1.18 +#define IO_REG_RXDATA1	*((volatile uint8_t*)0xa10011)
    1.19 +#define IO_REG_S_CTRL1	*((volatile uint8_t*)0xa10013)
    1.20 +#define IO_REG_TXDATA2	*((volatile uint8_t*)0xa10015)
    1.21 +#define IO_REG_RXDATA2	*((volatile uint8_t*)0xa10017)
    1.22 +#define IO_REG_S_CTRL2	*((volatile uint8_t*)0xa10013)
    1.23 +#define IO_REG_TXDATA3	*((volatile uint8_t*)0xa1001b)
    1.24 +#define IO_REG_RXDATA3	*((volatile uint8_t*)0xa1001d)
    1.25 +#define IO_REG_S_CTRL3	*((volatile uint8_t*)0xa1001f)
    1.26 +#define IO_REG_LOCK		*((volatile uint8_t*)0xa14000)
    1.27 +#define IO_REG_TMSS		*((volatile uint8_t*)0xa14101)
    1.28 +
    1.29  
    1.30  enum {
    1.31  	IO_VER_VERSION_MASK = 0x0f,