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