Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Oct 10, 2023
1 parent 77ecaef commit e2a9134
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions Libraries/CMSIS/Device/Maxim/MAX32665/Include/max32665.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,9 @@ typedef enum {
((i) == 7) ? DMA15_IRQn : \
0))

#define MXC_DMA_CH_GET_IRQ(i) \
(((i) > (MXC_DMA_CH_OFFSET - 1)) ? MXC_DMA1_CH_GET_IRQ(i % MXC_DMA_CH_OFFSET) : MXC_DMA0_CH_GET_IRQ(i))
#define MXC_DMA_CH_GET_IRQ(i) \
(((i) > (MXC_DMA_CH_OFFSET - 1)) ? MXC_DMA1_CH_GET_IRQ(i % MXC_DMA_CH_OFFSET) : \
MXC_DMA0_CH_GET_IRQ(i))

/* Create alias for MXC_DMA0 for backwards compatibility with code that was
written for parts that only had one DMA instance. */
Expand Down
18 changes: 9 additions & 9 deletions Libraries/PeriphDrivers/Source/UART/uart_reva.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void MXC_UART_RevA_DMA_SetupAutoHandlers(mxc_dma_regs_t *dma_instance, unsigned
#endif // MXC_DMA_INSTANCES > 1

#else
// TODO(JC): RISC-V
// TODO(JC): RISC-V

#endif // __arm__
}
Expand All @@ -620,7 +620,7 @@ int MXC_UART_RevA_ReadRXFIFODMA(mxc_uart_reva_regs_t *uart, mxc_dma_regs_t *dma,
return E_NULL_PTR;
}

if (states[uart_num].auto_dma_handlers) {
if (states[uart_num].auto_dma_handlers) {
/* Acquire channel */
#if TARGET_NUM == 32665
channel = MXC_DMA_AcquireChannel(dma);
Expand Down Expand Up @@ -649,7 +649,7 @@ int MXC_UART_RevA_ReadRXFIFODMA(mxc_uart_reva_regs_t *uart, mxc_dma_regs_t *dma,

srcdst.ch = channel;
srcdst.dest = bytes;
srcdst.len = len;
srcdst.len = len;

MXC_DMA_ConfigChannel(config, srcdst);
MXC_DMA_SetCallback(channel, MXC_UART_DMACallback);
Expand Down Expand Up @@ -700,7 +700,7 @@ int MXC_UART_RevA_SetTXDMAChannel(mxc_uart_reva_regs_t *uart, unsigned int chann
int n = MXC_UART_GET_IDX((mxc_uart_regs_t *)uart);
if (n < 0)
return E_BAD_PARAM;

states[n].channelTx = channel;

return E_NO_ERROR;
Expand All @@ -711,7 +711,7 @@ int MXC_UART_RevA_GetTXDMAChannel(mxc_uart_reva_regs_t *uart)
int n = MXC_UART_GET_IDX((mxc_uart_regs_t *)uart);
if (n < 0)
return E_BAD_PARAM;

return states[n].channelTx;
}

Expand All @@ -720,7 +720,7 @@ int MXC_UART_RevA_SetRXDMAChannel(mxc_uart_reva_regs_t *uart, unsigned int chann
int n = MXC_UART_GET_IDX((mxc_uart_regs_t *)uart);
if (n < 0)
return E_BAD_PARAM;

states[n].channelRx = channel;

return E_NO_ERROR;
Expand All @@ -731,7 +731,7 @@ int MXC_UART_RevA_GetRXDMAChannel(mxc_uart_reva_regs_t *uart)
int n = MXC_UART_GET_IDX((mxc_uart_regs_t *)uart);
if (n < 0)
return E_BAD_PARAM;

return states[n].channelRx;
}

Expand Down Expand Up @@ -1139,8 +1139,8 @@ void MXC_UART_RevA_DMACallback(int ch, int error)
if (ch == states[i].channelRx)
states[i].channelRx = -1;
else
states[i].channelTx = -1;
}
states[i].channelTx = -1;
}

break;
}
Expand Down

0 comments on commit e2a9134

Please sign in to comment.