mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Fix LED_STRIP feature // Add DMA drivers // UART fixes
This commit is contained in:
parent
2af929797d
commit
3a156f98ab
17 changed files with 309 additions and 196 deletions
35
src/main/drivers/dma.h
Normal file
35
src/main/drivers/dma.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* This file is part of Cleanflight.
|
||||
*
|
||||
* Cleanflight is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Cleanflight is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
typedef void (*dmaCallbackHandlerFuncPtr)(DMA_Channel_TypeDef *channel);
|
||||
|
||||
typedef enum {
|
||||
DMA1_CH2_HANDLER = 0,
|
||||
DMA1_CH3_HANDLER,
|
||||
DMA1_CH6_HANDLER,
|
||||
DMA1_CH7_HANDLER,
|
||||
} dmaHandlerIdentifier_e;
|
||||
|
||||
typedef struct dmaHandlers_s {
|
||||
dmaCallbackHandlerFuncPtr dma1Channel2IRQHandler;
|
||||
dmaCallbackHandlerFuncPtr dma1Channel3IRQHandler;
|
||||
dmaCallbackHandlerFuncPtr dma1Channel6IRQHandler;
|
||||
dmaCallbackHandlerFuncPtr dma1Channel7IRQHandler;
|
||||
} dmaHandlers_t;
|
||||
|
||||
void dmaInit(void);
|
||||
void dmaSetHandler(dmaHandlerIdentifier_e identifier, dmaCallbackHandlerFuncPtr callback);
|
Loading…
Add table
Add a link
Reference in a new issue