diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-16 21:02:48 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-16 21:02:48 -0700 |
commit | c0e1b4cdf20c55f2cbbdf3a5889f447974135fd8 (patch) | |
tree | 003c27f4551f02de304da28cc60314a4516c40ed /02-usart/include/arch | |
parent | cd115ba47253ce8d2680178248116d251abacb23 (diff) | |
download | stm32l4-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/arch')
-rw-r--r-- | 02-usart/include/arch/arm/arch.h | 7 | ||||
-rw-r--r-- | 02-usart/include/arch/x86_64/arch.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/02-usart/include/arch/arm/arch.h b/02-usart/include/arch/arm/arch.h index 904cbdb..6c10213 100644 --- a/02-usart/include/arch/arm/arch.h +++ b/02-usart/include/arch/arm/arch.h @@ -7,6 +7,7 @@ #define enable_interrupts() \ asm volatile(" cpsie i ") + #define DMA1_BASE (0x40020000) #define DMA2_BASE (0x40020400) @@ -17,4 +18,10 @@ #define GPIOB_BASE (0x48000400) #define GPIOC_BASE (0x48000800) +#define SRAM1_BASE (0x20000000) +#define SRAM2_BASE (0x2000C000) + +#include <stdint.h> +_Static_assert(sizeof(void*) == sizeof(uint32_t), "Pointers must be 32 bits"); + #endif /* ARCH_H_ */ diff --git a/02-usart/include/arch/x86_64/arch.h b/02-usart/include/arch/x86_64/arch.h index 43f6077..2b99239 100644 --- a/02-usart/include/arch/x86_64/arch.h +++ b/02-usart/include/arch/x86_64/arch.h @@ -16,4 +16,7 @@ #define GPIOB_BASE (load_fake_ahb2__() + 0x400) #define GPIOC_BASE (load_fake_ahb2__() + 0x800) +#define SRAM1_BASE (load_fake_sram1__() + 0x0) +#define SRAM2_BASE (load_fake_sram2__() + 0x0) + #endif /* ARCH_H_ */ |