diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-16 18:20:32 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-16 18:20:32 -0700 |
commit | 9f17335c19a6ae91a450e267b5313148644a7a14 (patch) | |
tree | f1ae946ada62148913a8cc10bc985f8de926a4a0 /02-usart/include/arch/arm/arch.h | |
parent | 4767c73fb2e1f96469fe24a83b443c1774b01d86 (diff) | |
download | stm32l4-9f17335c19a6ae91a450e267b5313148644a7a14.tar.gz stm32l4-9f17335c19a6ae91a450e267b5313148644a7a14.tar.bz2 stm32l4-9f17335c19a6ae91a450e267b5313148644a7a14.zip |
Add DMA header file which defines the DMA registers and add
testing_harness with fake environment to allow testing on x86
development machines.
Diffstat (limited to '02-usart/include/arch/arm/arch.h')
-rw-r--r-- | 02-usart/include/arch/arm/arch.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/02-usart/include/arch/arm/arch.h b/02-usart/include/arch/arm/arch.h new file mode 100644 index 0000000..904cbdb --- /dev/null +++ b/02-usart/include/arch/arm/arch.h @@ -0,0 +1,20 @@ +#ifndef ARCH_H_ +#define ARCH_H_ + + +#define ARCH_STM32L4 + +#define enable_interrupts() \ + asm volatile(" cpsie i ") + +#define DMA1_BASE (0x40020000) +#define DMA2_BASE (0x40020400) + +#define USART1_BASE (0x40013800) +#define USART2_BASE (0x40004400) + +#define GPIOA_BASE (0x48000000) +#define GPIOB_BASE (0x48000400) +#define GPIOC_BASE (0x48000800) + +#endif /* ARCH_H_ */ |