From: Greg King Date: Tue, 6 Feb 2018 13:52:36 +0000 (-0500) Subject: Normalized the definitions of structs in . X-Git-Tag: V2.17~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e9cbd42b18510e0de5c7f6c563a6eed643db33ff;p=cc65 Normalized the definitions of structs in . The change matches the way that I/O register structures are defined in other headers. The names are defined as "struct", instead of as "pointer to struct". --- diff --git a/include/supervision.h b/include/supervision.h index f3ae1c25e..cce037910 100644 --- a/include/supervision.h +++ b/include/supervision.h @@ -54,28 +54,28 @@ struct __sv_lcd { unsigned char xpos; unsigned char ypos; }; -#define SV_LCD ((struct __sv_lcd*)0x2000) +#define SV_LCD (*(struct __sv_lcd*)0x2000) struct __sv_tone { unsigned delay; unsigned char control; unsigned char timer; }; -#define SV_RIGHT ((struct __sv_tone*)0x2010) -#define SV_LEFT ((struct __sv_tone*)0x2014) +#define SV_RIGHT (*(struct __sv_tone*)0x2010) +#define SV_LEFT (*(struct __sv_tone*)0x2014) struct __sv_noise { unsigned char volume; /* and frequency */ unsigned char timer; unsigned char control; }; -#define SV_NOISE ((struct __sv_noise*)0x2028) +#define SV_NOISE (*(struct __sv_noise*)0x2028) struct __io_port { unsigned char in; unsigned char out; }; -#define IO_PORT ((struct __io_port*)(0x2021) +#define IO_PORT (*(struct __io_port*)0x2021) struct __sv_dma { unsigned start; @@ -83,7 +83,7 @@ struct __sv_dma { unsigned char control; unsigned char on; }; -#define SV_DMA ((struct __sv_dma*)0x2018) +#define SV_DMA (*(struct __sv_dma*)0x2018) #define SV_CONTROL (*(unsigned char*)0x2020)