Search
lxdream.org :: lxdream/src/mmio.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/mmio.h
changeset 136:f07efd59604f
prev55:96323c198da3
next156:3b93648a3b07
author nkeynes
date Sun Apr 30 01:49:45 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Add MMIO_READF (read float) macro
file annotate diff log raw
1.1 --- a/src/mmio.h Sun Jan 01 08:09:17 2006 +0000
1.2 +++ b/src/mmio.h Sun Apr 30 01:49:45 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mmio.h,v 1.3 2006-01-01 08:09:17 nkeynes Exp $
1.6 + * $Id: mmio.h,v 1.4 2006-04-30 01:49:45 nkeynes Exp $
1.7 *
1.8 * mmio.h defines a complicated batch of macros used to build up the
1.9 * memory-mapped I/O regions in a reasonably readable fashion.
1.10 @@ -67,6 +67,7 @@
1.11 extern int num_io_rgns;
1.12
1.13 #define MMIO_READ( id, r ) *((int32_t *)(mmio_region_##id.mem + (r)))
1.14 +#define MMIO_READF( id, r ) *((float *)(mmio_region_##id.mem + (r)))
1.15 #define MMIO_WRITE( id, r, v ) *((int32_t *)(mmio_region_##id.mem + (r))) = (v)
1.16 #define MMIO_REG( id, r ) ((int32_t *)(mmio_region_##id.mem + (r)))
1.17 #define MMIO_REGID( mid, r ) (mmio_region_##mid.index[(r)>>2] != NULL ? \
.