Skip to content

Commit b7c55ee

Browse files
committed
After formatting code
1 parent 52fa68c commit b7c55ee

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

source/portable/NetworkInterface/Zynq/x_emacpsif.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
extern XEmacPs_Config mac_configs[ XPAR_XEMACPS_NUM_INSTANCES ];
6262

63-
63+
*
6464
void xemacpsif_setmac( uint32_t index,
6565
uint8_t * addr );
6666
uint8_t * xemacpsif_getmac( uint32_t index );
@@ -116,7 +116,7 @@
116116
volatile int txHead, txTail;
117117

118118
/* txMutex is replacing the earlier int variable 'txBusy'. */
119-
SemaphoreHandle_t txMutex; /* Replacing the earlier variable 'volatile int txBusy'. */
119+
SemaphoreHandle_t txMutex; /* Replacing the earlier variable 'volatile int txBusy'. */
120120

121121
volatile uint32_t isr_events;
122122

@@ -171,7 +171,7 @@
171171
void vInitialiseOnIndex( BaseType_t xIndex );
172172

173173
#ifdef __cplusplus
174-
} /* extern "C" */
174+
} /* extern "C" */
175175
#endif
176176

177177
#endif /* __NETIF_XAXIEMACIF_H__ */

source/portable/NetworkInterface/Zynq/x_emacpsif_dma.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)