2008-01-29 04:43:05 -05:00
|
|
|
/*
|
2005-07-27 14:44:44 -04:00
|
|
|
* Read/write register macros used by *_defs.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef reg_rdwr_h
|
|
|
|
#define reg_rdwr_h
|
|
|
|
|
2008-01-29 04:43:05 -05:00
|
|
|
#ifndef REG_READ
|
|
|
|
#define REG_READ(type, addr) (*((volatile type *) (addr)))
|
|
|
|
#endif
|
2005-07-27 14:44:44 -04:00
|
|
|
|
2008-01-29 04:43:05 -05:00
|
|
|
#ifndef REG_WRITE
|
2005-07-27 14:44:44 -04:00
|
|
|
#define REG_WRITE(type, addr, val) \
|
|
|
|
do { *((volatile type *) (addr)) = (val); } while(0)
|
2008-01-29 04:43:05 -05:00
|
|
|
#endif
|
2005-07-27 14:44:44 -04:00
|
|
|
|
|
|
|
#endif
|