From 9f17335c19a6ae91a450e267b5313148644a7a14 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 16 Nov 2020 18:20:32 -0700 Subject: Add DMA header file which defines the DMA registers and add testing_harness with fake environment to allow testing on x86 development machines. --- 02-usart/include/arch/arm/arch.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 02-usart/include/arch/arm/arch.h (limited to '02-usart/include/arch/arm/arch.h') 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_ */ -- cgit