--- a/src/mmio.h Sun Apr 30 01:49:45 2006 +0000 +++ b/src/mmio.h Thu Jun 15 10:25:45 2006 +0000 @@ -1,5 +1,5 @@ /** - * $Id: mmio.h,v 1.4 2006-04-30 01:49:45 nkeynes Exp $ + * $Id: mmio.h,v 1.5 2006-06-15 10:25:42 nkeynes Exp $ * * mmio.h defines a complicated batch of macros used to build up the * memory-mapped I/O regions in a reasonably readable fashion. @@ -83,6 +83,11 @@ io_rgn[mid]->index[(r)>>2]->desc : "Undefined register" ) #define MMIO_NAME_BYNUM( mid ) (io_rgn[mid]->id) +#define MMIO_REGID_IOBYNUM( io, r ) (io->index[(r)>>2] != NULL ? \ + io->index[(r)>>2]->id : "" ) +#define MMIO_REGDESC_IOBYNUM( io, r ) (io->index[(r)>>2] != NULL ? \ + io->index[(r)>>2]->desc : "Undefined register" ) + #ifdef __cplusplus } #endif