Skip to content

Commit

Permalink
Merge pull request #964 from tony-josi-aws/fix_stm32f_port_build
Browse files Browse the repository at this point in the history
Update debug log levels and fix STM32F port build when `ipconfigSUPPORT_NETWORK_DOWN_EVENT` is enabled
  • Loading branch information
tony-josi-aws authored Jul 19, 2023
2 parents 8197dde + 615da6f commit 0277044
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions source/FreeRTOS_Routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ struct xIPv6_Couple
/* This was only for debugging. */
if( pxEndPoint == NULL )
{
FreeRTOS_printf( ( "FreeRTOS_FindEndPointOnNetMask[%d]: No match for %xip\n",
( unsigned ) ulWhere, ( unsigned ) FreeRTOS_ntohl( ulIPAddress ) ) );
FreeRTOS_debug_printf( ( "FreeRTOS_FindEndPointOnNetMask[%d]: No match for %xip\n",
( unsigned ) ulWhere, ( unsigned ) FreeRTOS_ntohl( ulIPAddress ) ) );
}

return pxEndPoint;
Expand Down Expand Up @@ -766,9 +766,9 @@ struct xIPv6_Couple

if( xGatewayTarget == pdTRUE )
{
FreeRTOS_printf( ( " GW address %pip to %pip\n",
pxIPAddressFrom->xIP_IPv6.ucBytes,
pxIPAddressTo->xIP_IPv6.ucBytes ) );
FreeRTOS_debug_printf( ( " GW address %pip to %pip\n",
pxIPAddressFrom->xIP_IPv6.ucBytes,
pxIPAddressTo->xIP_IPv6.ucBytes ) );
}

xTargetGlobal = ( xIPv6_GetIPType( &( pxIPAddressTo->xIP_IPv6 ) ) == eIPv6_Global ) ? pdTRUE : pdFALSE;
Expand Down Expand Up @@ -872,13 +872,13 @@ struct xIPv6_Couple
pcBufferFrom,
sizeof( pcBufferFrom ) );

FreeRTOS_printf( ( "EasyFit[%x]: %d %d %d ( %s ->%s ) BAD\n",
usFrameType,
( unsigned ) xCount[ 0 ],
( unsigned ) xCount[ 1 ],
( unsigned ) xCount[ 2 ],
( xRetNtopFrom == NULL ) ? "INVALID" : pcBufferFrom,
( xRetNtopTo == NULL ) ? "INVALID" : pcBufferTo ) );
FreeRTOS_debug_printf( ( "EasyFit[%x]: %d %d %d ( %s ->%s ) BAD\n",
usFrameType,
( unsigned ) xCount[ 0 ],
( unsigned ) xCount[ 1 ],
( unsigned ) xCount[ 2 ],
( xRetNtopFrom == NULL ) ? "INVALID" : pcBufferFrom,
( xRetNtopTo == NULL ) ? "INVALID" : pcBufferTo ) );
}
#endif /* ( ipconfigHAS_PRINTF != 0 ) */

Expand Down Expand Up @@ -984,7 +984,7 @@ struct xIPv6_Couple
/* do nothing, coverity happy */
}

FreeRTOS_printf( ( "pxEasyFit: ARP %xip -> %xip\n", ( unsigned ) FreeRTOS_ntohl( xIPAddressFrom.ulIP_IPv4 ), ( unsigned ) FreeRTOS_ntohl( xIPAddressTo.ulIP_IPv4 ) ) );
FreeRTOS_debug_printf( ( "pxEasyFit: ARP %xip -> %xip\n", ( unsigned ) FreeRTOS_ntohl( xIPAddressFrom.ulIP_IPv4 ), ( unsigned ) FreeRTOS_ntohl( xIPAddressTo.ulIP_IPv4 ) ) );
}
xDoProcessPacket = pdTRUE;
#endif /* ( ipconfigUSE_IPv4 != 0 ) */
Expand Down
6 changes: 3 additions & 3 deletions source/portable/NetworkInterface/STM32Fxx/NetworkInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ static BaseType_t xMayAcceptPacket( uint8_t * pucEthernetBuffer )
#endif
( *ipLOCAL_IP_ADDRESS_POINTER != 0 ) )
{
FreeRTOS_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) );
FreeRTOS_debug_printf( ( "Drop IP %lxip\n", FreeRTOS_ntohl( ulDestinationIPAddress ) ) );
return pdFALSE;
}

Expand Down Expand Up @@ -1503,9 +1503,9 @@ static void prvEMACHandlerTask( void * pvParameters )

#if ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 )
{
if( xGetPhyLinkStatus() == pdFALSE )
if( xGetPhyLinkStatus( pxMyInterface ) == pdFALSE )
{
FreeRTOS_NetworkDown();
FreeRTOS_NetworkDown( pxMyInterface );
}
}
#endif /* ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 ) */
Expand Down

0 comments on commit 0277044

Please sign in to comment.