Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
dma.h
Go to the documentation of this file.
1
5#pragma once
6#include "hal.h"
7
8namespace DMA {
9
10 struct HW {
12 struct Conf {
13 DMA_Stream_TypeDef *stream;
14 DMA_InitTypeDef init;
15 };
16
18 HW(const Conf &conf) {
19 handle.Instance = conf.stream;
20 handle.Init = conf.init;
21 while (HAL_DMA_Init(&handle) != HAL_OK);
22 }
23
25 void irqHandler() {
26 HAL_DMA_IRQHandler(&handle);
27 }
28
30 DMA_HandleTypeDef handle{};
31 };
32}
Copyright (c) 2020 IACE.
DMA configuration structure.
Definition dma.h:12