blob: afeaed54c42b4f7732464776fe89fc384bcdc70a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#pragma once
#include <stdint.h>
#include <mmio/mmio.h>
struct STM32_DMA_channel_reg_v1_t {
volatile uint32_t CR;
volatile uint32_t NDTR;
volatile uint32_t PAR;
volatile uint32_t MAR;
uint32_t _reserved;
};
struct STM32_DMA_reg_v1_t {
volatile uint32_t ISR;
volatile uint32_t IFCR;
STM32_DMA_channel_reg_v1_t C[7];
};
struct STM32_DMA_stream_reg_v2_t {
volatile uint32_t CR;
volatile uint32_t NDTR;
volatile uint32_t PAR;
volatile uint32_t M0AR;
volatile uint32_t M1AR;
volatile uint32_t FCR;
};
struct STM32_DMA_reg_v2_t {
volatile uint32_t LISR;
volatile uint32_t HISR;
volatile uint32_t LIFCR;
volatile uint32_t HIFCR;
STM32_DMA_stream_reg_v2_t S[8];
};
template <typename T>
class STM32_DMA_t : public mmio_ptr<T> {
public:
using mmio_ptr<T>::ptr;
};
|