Skip to content

Commit 2ed9e54

Browse files
committed
modifying the function signature
1 parent 0e31397 commit 2ed9e54

File tree

1 file changed

+5
-5
lines changed
  • examples/platform/silabs/efr32/rs911x/hal

1 file changed

+5
-5
lines changed

examples/platform/silabs/efr32/rs911x/hal/efx_spi.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void rsi_hal_board_init(void)
163163
}
164164

165165
/*****************************************************************************
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)
167167
*
168168
*@brief
169169
* DMA transfer completion callback. Called by the DMA interrupt handler.
@@ -176,7 +176,7 @@ void rsi_hal_board_init(void)
176176
* @return
177177
* None
178178
******************************************************************************/
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)
180180
{
181181
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
182182
// uint8_t *buf = (void *)userParam;
@@ -220,7 +220,7 @@ static void receiveDMA(uint8_t * rx_buf, uint16_t xlen)
220220

221221
// Start receive DMA
222222
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);
224224

225225
// Start transmit DMA.
226226
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)
268268

269269
// Start receive DMA
270270
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);
272272
// Start transmit DMA.
273273
DMADRV_MemoryPeripheral(tx_dma_channel, MY_USART_TX_SIGNAL, (void *) &(MY_USART->TXDATA), (void *) tx_buf, true, xlen,
274274
dmadrvDataSize1, NULL, NULL);
@@ -308,7 +308,7 @@ int16_t rsi_spi_transfer(uint8_t * tx_buf, uint8_t * rx_buf, uint16_t xlen, uint
308308
* receiveDMA() and transmitDMA() are asynchronous
309309
* Our application design assumes that this function is synchronous
310310
* 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
312312
*/
313313
if (xSemaphoreTake(spi_sem, pdMS_TO_TICKS(RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS)) == pdTRUE)
314314
{

0 commit comments

Comments
 (0)