1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

USE_DMA_SPEC not needed on RP2350 as DMA channel use is unrestricted (#14513)

* USE_DMA_SPEC not needed on RP2350 as DMA channel use is unrestricted

* Removed src/config stuff
This commit is contained in:
Steve Evans 2025-07-08 00:40:44 +01:00 committed by GitHub
parent babfff336d
commit 1743a43d19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 137 deletions

View file

@ -5758,7 +5758,9 @@ static void cliDma(const char *cmdName, char* cmdline)
#if defined(USE_DMA_SPEC)
cliDmaopt(cmdName, cmdline);
#else
cliShowParseError(cmdName);
UNUSED(cmdName);
// the only option is show, so make that the default behaviour
showDma();
#endif
}
#endif

View file

@ -25,7 +25,7 @@
#include "drivers/dma.h"
#include "drivers/timer.h"
#ifdef USE_DMA
#ifdef USE_DMA_SPEC
#include "dma_reqmap_mcu.h"
#endif

View file

@ -1,108 +0,0 @@
/*
* This file is part of Betaflight.
*
* Betaflight is free software. You can redistribute this software
* and/or modify this software 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.
*
* Betaflight 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 this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include "platform.h"
#ifdef USE_DMA_SPEC
#include "timer_def.h"
#include "drivers/adc.h"
#include "drivers/bus_spi.h"
#include "drivers/dma_reqmap.h"
#include "drivers/serial.h"
#include "drivers/serial_uart.h"
#include "drivers/serial_uart_impl.h"
#include "pg/timerio.h"
#define DMA(c) { (c), (dmaResource_t *) dma_hw->ch[c] , 0 }
static dmaChannelSpec_t dmaChannelSpec[MAX_PERIPHERAL_DMA_OPTIONS] = {
DMA(1),
DMA(2),
DMA(3),
DMA(4),
DMA(5),
DMA(6),
DMA(7),
DMA(8),
DMA(9),
DMA(10),
DMA(11),
DMA(12),
#ifdef RP2350
DMA(13),
DMA(14),
DMA(15),
DMA(16),
#endif
};
#undef DMA
const dmaChannelSpec_t *dmaGetChannelSpecByPeripheral(dmaPeripheral_e device, uint8_t index, int8_t opt)
{
UNUSED(device);
UNUSED(index);
UNUSED(opt);
//TODO : Implementation for PICO
return NULL;
}
dmaoptValue_t dmaoptByTag(ioTag_t ioTag)
{
UNUSED(ioTag);
//TODO : Implementation for PICO
return DMA_OPT_UNUSED;
}
const dmaChannelSpec_t *dmaGetChannelSpecByTimerValue(TIM_TypeDef *tim, uint8_t channel, dmaoptValue_t dmaopt)
{
//TODO : Implementation for PICO
return NULL;
}
const dmaChannelSpec_t *dmaGetChannelSpecByTimer(const timerHardware_t *timer)
{
if (!timer) {
return NULL;
}
//TODO : Implementation for PICO
return NULL;
}
// dmaGetOptionByTimer is called by pgResetFn_timerIOConfig to find out dmaopt for pre-configured timer.
dmaoptValue_t dmaGetOptionByTimer(const timerHardware_t *timer)
{
//TODO : Implementation for PICO
return DMA_OPT_UNUSED;
}
// A variant of dmaGetOptionByTimer that looks for matching dmaTimUPRef
dmaoptValue_t dmaGetUpOptionByTimer(const timerHardware_t *timer)
{
//TODO : Implementation for PICO
return DMA_OPT_UNUSED;
}
#endif // USE_DMA_SPEC

View file

@ -1,27 +0,0 @@
/*
* This file is part of Betaflight.
*
* Betaflight is free software. You can redistribute this software
* and/or modify this software 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.
*
* Betaflight 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 this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define MAX_PERIPHERAL_DMA_OPTIONS 14
#define MAX_TIMER_DMA_OPTIONS 22
#define USE_DMA_MUX