@@ -163,7 +163,7 @@ void rsi_hal_board_init(void)
163
163
}
164
164
165
165
/*****************************************************************************
166
- *@fn static bool rx_dma_complete (unsigned int channel, unsigned int sequenceNo, void *userParam)
166
+ *@fn static bool tx_rx_dma_complete (unsigned int channel, unsigned int sequenceNo, void *userParam)
167
167
*
168
168
*@brief
169
169
* DMA transfer completion callback. Called by the DMA interrupt handler.
@@ -176,7 +176,7 @@ void rsi_hal_board_init(void)
176
176
* @return
177
177
* None
178
178
******************************************************************************/
179
- static bool rx_dma_complete (unsigned int channel , unsigned int sequenceNo , void * userParam )
179
+ static bool tx_rx_dma_complete (unsigned int channel , unsigned int sequenceNo , void * userParam )
180
180
{
181
181
BaseType_t xHigherPriorityTaskWoken = pdFALSE ;
182
182
// uint8_t *buf = (void *)userParam;
@@ -220,7 +220,7 @@ static void receiveDMA(uint8_t * rx_buf, uint16_t xlen)
220
220
221
221
// Start receive DMA
222
222
DMADRV_PeripheralMemory (rx_dma_channel , MY_USART_RX_SIGNAL , (void * ) rx_buf , (void * ) & (MY_USART -> RXDATA ), true, xlen ,
223
- dmadrvDataSize1 , rx_dma_complete , NULL );
223
+ dmadrvDataSize1 , tx_rx_dma_complete , NULL );
224
224
225
225
// Start transmit DMA.
226
226
DMADRV_MemoryPeripheral (tx_dma_channel , MY_USART_TX_SIGNAL , (void * ) & (MY_USART -> TXDATA ), (void * ) & (dummy_data ), false, xlen ,
@@ -268,7 +268,7 @@ static void transmitDMA(uint8_t * rx_buf, uint8_t * tx_buf, uint16_t xlen)
268
268
269
269
// Start receive DMA
270
270
DMADRV_PeripheralMemory (rx_dma_channel , MY_USART_RX_SIGNAL , buf , (void * ) & (MY_USART -> RXDATA ), srcinc , xlen , dmadrvDataSize1 ,
271
- rx_dma_complete , buf );
271
+ tx_rx_dma_complete , buf );
272
272
// Start transmit DMA.
273
273
DMADRV_MemoryPeripheral (tx_dma_channel , MY_USART_TX_SIGNAL , (void * ) & (MY_USART -> TXDATA ), (void * ) tx_buf , true, xlen ,
274
274
dmadrvDataSize1 , NULL , NULL );
@@ -308,7 +308,7 @@ int16_t rsi_spi_transfer(uint8_t * tx_buf, uint8_t * rx_buf, uint16_t xlen, uint
308
308
* receiveDMA() and transmitDMA() are asynchronous
309
309
* Our application design assumes that this function is synchronous
310
310
* To make it synchronous, we wait to re-acquire the semaphore before exiting this function
311
- * rx_dma_complete () gives back the semaphore when the SPI transfer is done
311
+ * tx_rx_dma_complete () gives back the semaphore when the SPI transfer is done
312
312
*/
313
313
if (xSemaphoreTake (spi_sem , pdMS_TO_TICKS (RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS )) == pdTRUE )
314
314
{
0 commit comments