aboutsummaryrefslogtreecommitdiff
path: root/02-usart/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to '02-usart/include/common.h')
-rw-r--r--02-usart/include/common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/02-usart/include/common.h b/02-usart/include/common.h
index 01b6a47..8e0cb06 100644
--- a/02-usart/include/common.h
+++ b/02-usart/include/common.h
@@ -31,6 +31,9 @@
#define RESERVE(type) \
__IO type RESERVED_MACRO_CONCAT(_r, __COUNTER__)
-typedef uint32_t bits_t;
+#define ptr2reg(ptr) \
+ ((uint32_t) (ptrdiff_t) (ptr))
+
+typedef __IO uint32_t bits_t;
#endif /* COMMON_H */