summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/device.h b/device.h
index da65a37..fed820e 100644
--- a/device.h
+++ b/device.h
@@ -55,6 +55,7 @@ struct io_register {
};
#define REG_TO_OFF(reg) ((reg) * sizeof(uint32_t))
+#define OFF_TO_REG(off) ((off) / sizeof(uint32_t))
extern void io_register_init(struct io_register *reg, uint32_t addr,
uint32_t valid, uint32_t readonly, uint32_t value);