diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-20 09:24:04 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-20 09:24:04 -0700 |
commit | d82837cb93b8675a6e589548e157f31e41aaa039 (patch) | |
tree | 4ea6bfb8ed9e49db45cf455f7bb9a7ff94894d10 /02-usart/include/common.h | |
parent | 0c4468b1fa0e50f618f5e3150b3c24c324e5956c (diff) | |
download | stm32l4-d82837cb93b8675a6e589548e157f31e41aaa039.tar.gz stm32l4-d82837cb93b8675a6e589548e157f31e41aaa039.tar.bz2 stm32l4-d82837cb93b8675a6e589548e157f31e41aaa039.zip |
Added NVIC definition
Diffstat (limited to '02-usart/include/common.h')
-rw-r--r-- | 02-usart/include/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/02-usart/include/common.h b/02-usart/include/common.h index 2f14e42..653279e 100644 --- a/02-usart/include/common.h +++ b/02-usart/include/common.h @@ -44,4 +44,7 @@ typedef __IO uint32_t bits_t; #define regset(reg, mask, val) \ ((reg) = ((reg) & ~mask) | (val << CTZ(mask))) +#define regget(reg, mask) \ + (((reg) & mask) >> (CTZ(mask))) + #endif /* COMMON_H */ |