aboutsummaryrefslogtreecommitdiff
path: root/02-usart/include/core/system.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-11-19 00:27:15 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-11-19 00:27:15 -0700
commit0c4468b1fa0e50f618f5e3150b3c24c324e5956c (patch)
tree1d25c8941ed27ab6856057abc965b5261e3a2f5a /02-usart/include/core/system.h
parentc75060eeac2810bd6ffe540e9949952eeb8e41f3 (diff)
downloadstm32l4-0c4468b1fa0e50f618f5e3150b3c24c324e5956c.tar.gz
stm32l4-0c4468b1fa0e50f618f5e3150b3c24c324e5956c.tar.bz2
stm32l4-0c4468b1fa0e50f618f5e3150b3c24c324e5956c.zip
Change the SCB to use regset() macros.
Diffstat (limited to '02-usart/include/core/system.h')
-rw-r--r--02-usart/include/core/system.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/02-usart/include/core/system.h b/02-usart/include/core/system.h
index c836edc..a636729 100644
--- a/02-usart/include/core/system.h
+++ b/02-usart/include/core/system.h
@@ -9,20 +9,12 @@ typedef __IO struct {
uint32_t reserved0;
- union {
- uint32_t stcs_r; /* SysTick Control and Status Register */
- struct {
- bits_t enable:1;
- bits_t tickint:1;
- bits_t clksource:1;
+#define scb_enable (1 << 0)
+#define scb_tickint (1 << 1)
+#define scb_clksource (1 << 2)
+#define scb_countflag (1 << 16)
+ uint32_t stcs_r; /* SysTick Control and Status Register */
- bits_t reserved0:13;
-
- bits_t countflag:1;
-
- bits_t reserved1:15;
- } stcs_bf;
- };
uint32_t strv_r; /* SysTick Reload Value Register */
uint32_t stcv_r; /* SysTick Current Value Register */
uint32_t stc_r; /* SysTick Calibration Value Register */