OR1K support
|
Macros | |
#define | REG8(add) *((volatile unsigned char *) (add)) |
#define | REG16(add) *((volatile unsigned short *) (add)) |
#define | REG32(add) *((volatile unsigned long *) (add)) |
#define REG16 | ( | add | ) | *((volatile unsigned short *) (add)) |
Access halfword-sized memory mapped register
Used to access a 16 byte-sized memory mapped register. It avoids usage errors when not defining register addresses volatile and handles casting correctly.
See REG8() for an example.
add | Register address |
#define REG32 | ( | add | ) | *((volatile unsigned long *) (add)) |
Access word-sized memory mapped register
Used to access a word-sized memory mapped register. It avoids usage errors when not defining register addresses volatile and handles casting correctly.
See REG8() for an example.
add | Register address |
#define REG8 | ( | add | ) | *((volatile unsigned char *) (add)) |
Access byte-sized memory mapped register
Used to access a byte-sized memory mapped register. It avoids usage errors when not defining register addresses volatile and handles casting correctly.
Example for both read and write:
add | Register address |