aboutsummaryrefslogtreecommitdiff
path: root/02-usart/include/common.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-11-16 21:02:48 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-11-16 21:02:48 -0700
commitc0e1b4cdf20c55f2cbbdf3a5889f447974135fd8 (patch)
tree003c27f4551f02de304da28cc60314a4516c40ed /02-usart/include/common.h
parentcd115ba47253ce8d2680178248116d251abacb23 (diff)
downloadstm32l4-c0e1b4cdf20c55f2cbbdf3a5889f447974135fd8.tar.gz
stm32l4-c0e1b4cdf20c55f2cbbdf3a5889f447974135fd8.tar.bz2
stm32l4-c0e1b4cdf20c55f2cbbdf3a5889f447974135fd8.zip
Got the DMA to send a simple message through UART2.
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 */