@@ -222,8 +222,8 @@ void emacps_send_handler( void * arg )
222222 */
223223 xemacpsif -> isr_events |= EMAC_IF_TX_EVENT ;
224224
225- /* Take the mutex without blocking. */
226- xSemaphoreGiveFromISR ( xemacpsif -> txMutex , & xHigherPriorityTaskWoken );
225+ /* Take the mutex without blocking. */
226+ xSemaphoreGiveFromISR ( xemacpsif -> txMutex , & xHigherPriorityTaskWoken );
227227
228228 if ( xEMACTaskHandles [ xEMACIndex ] != NULL )
229229 {
@@ -327,24 +327,24 @@ XStatus emacps_send_message( xemacpsif_s * xemacpsif,
327327 * accessed as little as possible. */
328328 xemacpsif -> txHead = txHead ;
329329
330- if ( xSemaphoreTake ( xemacpsif -> txMutex , 200U ) == pdFALSE )
331- {
332- FreeRTOS_printf ( ( "emacps_send_message: mutex can not be taken, something is really wrong.\n" ) );
333- /* There is no risk in continuing here. */
334- }
330+ if ( xSemaphoreTake ( xemacpsif -> txMutex , 200U ) == pdFALSE )
331+ {
332+ FreeRTOS_printf ( ( "emacps_send_message: mutex can not be taken, something is really wrong.\n" ) );
333+ /* There is no risk in continuing here. */
334+ }
335335
336336 /* Data Synchronization Barrier */
337337 dsb ();
338338
339339 {
340- /* Make STARTTX high */
341- uint32_t ulValue = XEmacPs_ReadReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET );
342- /* Set the Start transmit bit. */
343- ulValue |= XEMACPS_NWCTRL_STARTTX_MASK ;
344- XEmacPs_WriteReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET , ulValue );
345- /* Read back the register to make sure the data is flushed. */
346- ( void ) XEmacPs_ReadReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET );
347- /* The mutex will be given later on in emacps_send_handler(). */
340+ /* Make STARTTX high */
341+ uint32_t ulValue = XEmacPs_ReadReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET );
342+ /* Set the Start transmit bit. */
343+ ulValue |= XEMACPS_NWCTRL_STARTTX_MASK ;
344+ XEmacPs_WriteReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET , ulValue );
345+ /* Read back the register to make sure the data is flushed. */
346+ ( void ) XEmacPs_ReadReg ( ulBaseAddress , XEMACPS_NWCTRL_OFFSET );
347+ /* The mutex will be given later on in emacps_send_handler(). */
348348 }
349349
350350 dsb ();
@@ -690,14 +690,14 @@ XStatus init_dma( xemacpsif_s * xemacpsif )
690690 configASSERT ( xTXDescriptorSemaphores [ xEMACIndex ] );
691691 }
692692
693- if ( xemacpsif -> txMutex == NULL )
694- {
695- /* txMutex can always be taken, except between sending a packet
696- * and receiving the TX RX interrupt. */
697- xemacpsif -> txMutex = xSemaphoreCreateBinary ();
698- xSemaphoreGive ( xemacpsif -> txMutex );
699- configASSERT ( xemacpsif -> txMutex != NULL );
700- }
693+ if ( xemacpsif -> txMutex == NULL )
694+ {
695+ /* txMutex can always be taken, except between sending a packet
696+ * and receiving the TX RX interrupt. */
697+ xemacpsif -> txMutex = xSemaphoreCreateBinary ();
698+ configASSERT ( xemacpsif -> txMutex != NULL );
699+ xSemaphoreGive ( xemacpsif -> txMutex );
700+ }
701701
702702 /*
703703 * Allocate RX descriptors, 1 RxBD at a time.
0 commit comments