Search
lxdream.org :: lxdream :: r136:f07efd59604f
lxdream 0.9.1
released Jun 29
Download Now
changeset136:f07efd59604f
parent135:2b05ea3d87c1
child137:41907543d890
authornkeynes
dateSun Apr 30 01:49:45 2006 +0000 (14 years ago)
Add MMIO_READF (read float) macro
src/mmio.h
1.1 --- a/src/mmio.h Sun Apr 30 01:48:38 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 ? \
.