Skip to content

Commit cb8f00c

Browse files
xuan97z1aggarg
andauthored
Updated RX portable layer for backward compatibility (#1182)
* Updated RX portable layer for backward compatibility Signed-off-by: RESG_XX <[email protected]> * Fix formatting and spell check Signed-off-by: Gaurav Aggarwal <[email protected]> --------- Signed-off-by: RESG_XX <[email protected]> Signed-off-by: Gaurav Aggarwal <[email protected]> Co-authored-by: Gaurav Aggarwal <[email protected]>
1 parent d701079 commit cb8f00c

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

source/portable/NetworkInterface/RX/NetworkInterface.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ void prvLinkStatusChange( BaseType_t xStatus );
101101

102102
/*-----------------------------------------------------------*/
103103

104-
NetworkInterface_t * pxRX_FillInterfaceDescriptor( BaseType_t xEMACIndex,
105-
NetworkInterface_t * pxInterface );
104+
#if ( ipconfigIPv4_BACKWARD_COMPATIBLE != 0 )
105+
NetworkInterface_t * pxRX_FillInterfaceDescriptor( BaseType_t xEMACIndex,
106+
NetworkInterface_t * pxInterface );
107+
#endif
106108

107109
/* Function to initialise the network interface */
108110
BaseType_t xRX_NetworkInterfaceInitialise( NetworkInterface_t * pxInterface );
@@ -136,6 +138,14 @@ NetworkInterface_t * pxRX_FillInterfaceDescriptor( BaseType_t xEMACIndex,
136138
return pxInterface;
137139
}
138140

141+
#if ( ipconfigIPv4_BACKWARD_COMPATIBLE != 0 )
142+
NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
143+
NetworkInterface_t * pxInterface )
144+
{
145+
return pxRX_FillInterfaceDescriptor( xEMACIndex, pxInterface );
146+
}
147+
#endif
148+
139149
/***********************************************************************************************************************
140150
* Function Name: xRX_NetworkInterfaceInitialise ()
141151
* Description : Initialization of Ethernet driver.

test/unit-test/FreeRTOS_TCP_Reception/FreeRTOS_TCP_Reception_utest.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ void test_prvCheckRxData_URG_On( void )
786786
TEST_ASSERT_EQUAL( 4, result );
787787
}
788788

789-
/* Test for prvStorexData function. */
789+
/* Test for prvStoreRxData function. */
790790
void test_prvStoreRxData_Happy_Path( void )
791791
{
792792
int32_t result;
@@ -827,7 +827,7 @@ void test_prvStoreRxData_Happy_Path( void )
827827
TEST_ASSERT_EQUAL( 0, xResult );
828828
}
829829

830-
/* Test for prvStorexData function. */
830+
/* Test for prvStoreRxData function. */
831831
void test_prvStoreRxData_Wrong_State( void )
832832
{
833833
int32_t result;
@@ -859,7 +859,7 @@ void test_prvStoreRxData_Wrong_State( void )
859859
TEST_ASSERT_EQUAL( 0, xResult );
860860
}
861861

862-
/* Test for prvStorexData function. */
862+
/* Test for prvStoreRxData function. */
863863
void test_prvStoreRxData_Zero_Length( void )
864864
{
865865
int32_t result;
@@ -901,7 +901,7 @@ void test_prvStoreRxData_Zero_Length( void )
901901
}
902902

903903

904-
/* Test for prvStorexData function. */
904+
/* Test for prvStoreRxData function. */
905905
void test_prvStoreRxData_Null_RxStream( void )
906906
{
907907
int32_t result;
@@ -938,7 +938,7 @@ void test_prvStoreRxData_Null_RxStream( void )
938938
TEST_ASSERT_EQUAL( -1, xResult );
939939
}
940940

941-
/* Test for prvStorexData function. */
941+
/* Test for prvStoreRxData function. */
942942
void test_prvStoreRxData_Negative_Offset( void )
943943
{
944944
int32_t result;
@@ -975,7 +975,7 @@ void test_prvStoreRxData_Negative_Offset( void )
975975
TEST_ASSERT_EQUAL( 0, xResult );
976976
}
977977

978-
/* Test for prvStorexData function. */
978+
/* Test for prvStoreRxData function. */
979979
void test_prvStoreRxData_None_Zero_Skipcount( void )
980980
{
981981
int32_t result;

0 commit comments

Comments
 (0)