Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dma pin <io> list #13233

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/cli/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -5334,7 +5334,7 @@ dmaoptEntry_t dmaoptEntryTable[] = {
#define DMA_OPT_UI_INDEX(i) ((i) + 1)
#define DMA_OPT_STRING_BUFSIZE 5

#if defined(STM32H7) || defined(STM32G4)
#if defined(STM32H7) || defined(STM32G4) || defined(AT32F435)
#define DMA_CHANREQ_STRING "Request"
#else
#define DMA_CHANREQ_STRING "Channel"
Expand Down
4 changes: 2 additions & 2 deletions src/main/drivers/at32/dma_reqmap_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static const dmaTimerMapping_t dmaTimerMapping[] = {
#undef TC
#undef REQMAP_TIM

#define DMA(d, c) { DMA_CODE(d, 0, c), (dmaResource_t *) DMA ## d ## _CHANNEL ## c , 0 }
#define DMA(d, c) { DMA_CODE(d, c, 0), (dmaResource_t *) DMA ## d ## _CHANNEL ## c , 0 }

static dmaChannelSpec_t dmaChannelSpec[MAX_PERIPHERAL_DMA_OPTIONS] = {
DMA(1, 1),
Expand Down Expand Up @@ -232,7 +232,7 @@ dmaoptValue_t dmaoptByTag(ioTag_t ioTag)

const dmaChannelSpec_t *dmaGetChannelSpecByTimerValue(TIM_TypeDef *tim, uint8_t channel, dmaoptValue_t dmaopt)
{
if (dmaopt < 0 || dmaopt >= MAX_TIMER_DMA_OPTIONS) {
if (dmaopt < 0 || dmaopt >= MAX_PERIPHERAL_DMA_OPTIONS) {
return NULL;
}

Expand Down