From 4f4afd790d17475676877afe77fe0c5f328c053c Mon Sep 17 00:00:00 2001 From: Denis Zaikin Date: Wed, 12 Mar 2025 13:27:22 +0300 Subject: [PATCH 1/4] Added the ability to use an alternative function to copy data in stream buffers. Useful for optimization in systems that allow DMA to be used only in some memory areas. --- source/FreeRTOS_Stream_Buffer.c | 8 ++++---- source/include/FreeRTOSIPConfigDefaults.h | 25 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/source/FreeRTOS_Stream_Buffer.c b/source/FreeRTOS_Stream_Buffer.c index 5f0d08f5bc..38adb36f93 100644 --- a/source/FreeRTOS_Stream_Buffer.c +++ b/source/FreeRTOS_Stream_Buffer.c @@ -293,7 +293,7 @@ size_t uxStreamBufferAdd( StreamBuffer_t * const pxBuffer, const size_t uxFirst = FreeRTOS_min_size_t( uxLength - uxNextHead, uxCount ); /* Write as many bytes as can be written in the first write. */ - ( void ) memcpy( &( pxBuffer->ucArray[ uxNextHead ] ), pucData, uxFirst ); + ( void ) pvPortMemCpyStreamBuffer( &( pxBuffer->ucArray[ uxNextHead ] ), pucData, uxFirst ); /* If the number of bytes written was less than the number that * could be written in the first write... */ @@ -301,7 +301,7 @@ size_t uxStreamBufferAdd( StreamBuffer_t * const pxBuffer, { /* ...then write the remaining bytes to the start of the * buffer. */ - ( void ) memcpy( pxBuffer->ucArray, &( pucData[ uxFirst ] ), uxCount - uxFirst ); + ( void ) pvPortMemCpyStreamBuffer( pxBuffer->ucArray, &( pucData[ uxFirst ] ), uxCount - uxFirst ); } } @@ -394,14 +394,14 @@ size_t uxStreamBufferGet( StreamBuffer_t * const pxBuffer, /* Obtain the number of bytes it is possible to obtain in the first * read. */ - ( void ) memcpy( pucData, &( pxBuffer->ucArray[ uxNextTail ] ), uxFirst ); + ( void ) pvPortMemCpyStreamBuffer( pucData, &( pxBuffer->ucArray[ uxNextTail ] ), uxFirst ); /* If the total number of wanted bytes is greater than the number * that could be read in the first read... */ if( uxCount > uxFirst ) { /* ...then read the remaining bytes from the start of the buffer. */ - ( void ) memcpy( &( pucData[ uxFirst ] ), pxBuffer->ucArray, uxCount - uxFirst ); + ( void ) pvPortMemCpyStreamBuffer( &( pucData[ uxFirst ] ), pxBuffer->ucArray, uxCount - uxFirst ); } } diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index 77ae9e9c8c..f777388c6f 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -2151,10 +2151,33 @@ STATIC_ASSERT( ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME <= portMAX_DELAY ); #define vPortFreeSocket( ptr ) vPortFree( ptr ) #endif +/*===========================================================================*/ +/* SOCKET CONFIG */ +/*===========================================================================*/ +/*---------------------------------------------------------------------------*/ +/*===========================================================================*/ +/*---------------------------------------------------------------------------*/ +/*===========================================================================*/ +/* STREAM BUFFER CONFIG */ +/*===========================================================================*/ + +/*---------------------------------------------------------------------------*/ + +/* + * pvPortMemCpyStreamBuffer + * + * Function to copy data into the stream buffer when sending + * and copy data from the stream buffer when receiving. + */ + + #ifndef pvPortMemCpyStreamBuffer + #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) + #endif + /*---------------------------------------------------------------------------*/ /*===========================================================================*/ -/* SOCKET CONFIG */ +/* STREAM BUFFER CONFIG */ /*===========================================================================*/ /*---------------------------------------------------------------------------*/ /*===========================================================================*/ From 22105bc1da64e1b335791a369c4ac7875eaf1c01 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 13 Mar 2025 06:56:51 +0000 Subject: [PATCH 2/4] Uncrustify: triggered by comment. --- source/include/FreeRTOSIPConfigDefaults.h | 8 +- .../STM32/Drivers/F4/stm32f4xx_hal_eth.h | 86 +++++++++---------- .../STM32/Drivers/F7/stm32f7xx_hal_eth.c | 2 +- .../STM32/Drivers/F7/stm32f7xx_hal_eth.h | 86 +++++++++---------- .../STM32/Drivers/H5/stm32h5xx_hal_eth.c | 2 +- .../STM32/Drivers/H5/stm32h5xx_hal_eth.h | 52 +++++------ .../STM32/Drivers/H7/stm32h7xx_hal_eth.c | 2 +- .../STM32/Drivers/H7/stm32h7xx_hal_eth.h | 52 +++++------ 8 files changed, 145 insertions(+), 145 deletions(-) diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index f777388c6f..e9d8a1c7b3 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -2166,13 +2166,13 @@ STATIC_ASSERT( ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME <= portMAX_DELAY ); /* * pvPortMemCpyStreamBuffer * - * Function to copy data into the stream buffer when sending + * Function to copy data into the stream buffer when sending * and copy data from the stream buffer when receiving. */ - #ifndef pvPortMemCpyStreamBuffer - #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) - #endif +#ifndef pvPortMemCpyStreamBuffer + #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) +#endif /*---------------------------------------------------------------------------*/ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h index 92692ed52e..e92c50f66f 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h @@ -237,7 +237,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -290,9 +290,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -305,9 +305,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -444,7 +444,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -463,23 +463,23 @@ */ typedef struct { - uint32_t Timestamp; /*!< Enable Timestamp */ - uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ - uint32_t TimestampInitialize; /*!< Initialize Timestamp */ - uint32_t TimestampUpdate; /*!< Timestamp Update */ - uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ - uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ - uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ - uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ - uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ - uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ - uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ - uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ - uint32_t TimestampClockType; /*!< Time stamp clock node type */ - uint32_t TimestampAddend; /*!< Timestamp addend value */ - uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ + uint32_t Timestamp; /*!< Enable Timestamp */ + uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ + uint32_t TimestampInitialize; /*!< Initialize Timestamp */ + uint32_t TimestampUpdate; /*!< Timestamp Update */ + uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ + uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ + uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ + uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ + uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ + uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ + uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ + uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ + uint32_t TimestampClockType; /*!< Time stamp clock node type */ + uint32_t TimestampAddend; /*!< Timestamp addend value */ + uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ } ETH_PTP_ConfigTypeDef; /** @@ -499,7 +499,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -520,7 +520,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ /** * @@ -545,26 +545,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -627,7 +627,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -855,7 +855,7 @@ #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ 0x00000300U /* DelayReq message * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP 0x00000400U /* DelayResp message - * (all clock types) */ + * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE 0x00000500U /* PdelayReq message * (peer-to-peer transparent clock) * or Announce message (Ordinary @@ -875,9 +875,9 @@ #define ETH_DMAPTPRXDESC_IPHE 0x00000008U /* IP Header Error */ #define ETH_DMAPTPRXDESC_IPPT 0x00000007U /* IP Payload Type */ #define ETH_DMAPTPRXDESC_IPPT_UDP 0x00000001U /* UDP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_TCP 0x00000002U /* TCP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_ICMP 0x00000003U /* ICMP payload encapsulated in * the IP datagram */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c index e976a83fca..1cedbecf7a 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c @@ -1531,7 +1531,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h index d46fe251dc..eee2b5691f 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h @@ -236,7 +236,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -289,9 +289,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -304,9 +304,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -443,7 +443,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -462,23 +462,23 @@ */ typedef struct { - uint32_t Timestamp; /*!< Enable Timestamp */ - uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ - uint32_t TimestampInitialize; /*!< Initialize Timestamp */ - uint32_t TimestampUpdate; /*!< Timestamp Update */ - uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ - uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ - uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ - uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ - uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ - uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ - uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ - uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ - uint32_t TimestampClockType; /*!< Time stamp clock node type */ - uint32_t TimestampAddend; /*!< Timestamp addend value */ - uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ + uint32_t Timestamp; /*!< Enable Timestamp */ + uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ + uint32_t TimestampInitialize; /*!< Initialize Timestamp */ + uint32_t TimestampUpdate; /*!< Timestamp Update */ + uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ + uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ + uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ + uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ + uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ + uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ + uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ + uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ + uint32_t TimestampClockType; /*!< Time stamp clock node type */ + uint32_t TimestampAddend; /*!< Timestamp addend value */ + uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ } ETH_PTP_ConfigTypeDef; /** @@ -498,7 +498,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -519,7 +519,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ /** * @@ -544,26 +544,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -626,7 +626,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -853,7 +853,7 @@ #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ 0x00000300U /* DelayReq message * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP 0x00000400U /* DelayResp message - * (all clock types) */ + * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE 0x00000500U /* PdelayReq message * (peer-to-peer transparent clock) * or Announce message (Ordinary @@ -873,9 +873,9 @@ #define ETH_DMAPTPRXDESC_IPHE 0x00000008U /* IP Header Error */ #define ETH_DMAPTPRXDESC_IPPT 0x00000007U /* IP Payload Type */ #define ETH_DMAPTPRXDESC_IPPT_UDP 0x00000001U /* UDP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_TCP 0x00000002U /* TCP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_ICMP 0x00000003U /* ICMP payload encapsulated in * the IP datagram */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c index 6c548f14b9..f574957fa3 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c @@ -1487,7 +1487,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h index 376486aa14..3a8071ec7c 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h @@ -243,7 +243,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -299,9 +299,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -314,9 +314,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -401,8 +401,8 @@ */ typedef enum { - HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ - HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ + HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ + HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ } ETH_MediaInterfaceTypeDef; /** @@ -436,7 +436,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -494,7 +494,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -515,7 +515,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ /** * @@ -540,26 +540,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -624,7 +624,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -1665,7 +1665,7 @@ ( __INTERRUPT__ ) ) == ( __INTERRUPT__ ) ) /*!< External interrupt line 46 Connected to the ETH wakeup EXTI Line */ - #define ETH_WAKEUP_EXTI_LINE 0x00004000U/* !< 46 - 32 = 14 */ + #define ETH_WAKEUP_EXTI_LINE 0x00004000U /* !< 46 - 32 = 14 */ /** * @brief Enable the ETH WAKEUP Exti Line. diff --git a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c index a6682eb57e..e52c00871c 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c @@ -1487,7 +1487,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h index eed010e395..2612a41c88 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h @@ -243,7 +243,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -299,9 +299,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -314,9 +314,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -401,8 +401,8 @@ */ typedef enum { - HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ - HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ + HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ + HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ } ETH_MediaInterfaceTypeDef; /** @@ -436,7 +436,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -494,7 +494,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -515,7 +515,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ /** * @@ -540,26 +540,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -624,7 +624,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -1665,7 +1665,7 @@ ( __INTERRUPT__ ) ) == ( __INTERRUPT__ ) ) /*!< External interrupt line 86 Connected to the ETH wakeup EXTI Line */ - #define ETH_WAKEUP_EXTI_LINE 0x00400000U/* !< 86 - 64 = 22 */ + #define ETH_WAKEUP_EXTI_LINE 0x00400000U /* !< 86 - 64 = 22 */ /** * @brief Enable the ETH WAKEUP Exti Line. From 1c52f6727a8fb06c0826a9454ae5b147cf82c308 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Thu, 13 Mar 2025 12:35:06 +0530 Subject: [PATCH 3/4] Revert "Uncrustify: triggered by comment." This reverts commit 22105bc1da64e1b335791a369c4ac7875eaf1c01. --- source/include/FreeRTOSIPConfigDefaults.h | 8 +- .../STM32/Drivers/F4/stm32f4xx_hal_eth.h | 86 +++++++++---------- .../STM32/Drivers/F7/stm32f7xx_hal_eth.c | 2 +- .../STM32/Drivers/F7/stm32f7xx_hal_eth.h | 86 +++++++++---------- .../STM32/Drivers/H5/stm32h5xx_hal_eth.c | 2 +- .../STM32/Drivers/H5/stm32h5xx_hal_eth.h | 52 +++++------ .../STM32/Drivers/H7/stm32h7xx_hal_eth.c | 2 +- .../STM32/Drivers/H7/stm32h7xx_hal_eth.h | 52 +++++------ 8 files changed, 145 insertions(+), 145 deletions(-) diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index e9d8a1c7b3..f777388c6f 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -2166,13 +2166,13 @@ STATIC_ASSERT( ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME <= portMAX_DELAY ); /* * pvPortMemCpyStreamBuffer * - * Function to copy data into the stream buffer when sending + * Function to copy data into the stream buffer when sending * and copy data from the stream buffer when receiving. */ -#ifndef pvPortMemCpyStreamBuffer - #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) -#endif + #ifndef pvPortMemCpyStreamBuffer + #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) + #endif /*---------------------------------------------------------------------------*/ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h index e92c50f66f..92692ed52e 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/F4/stm32f4xx_hal_eth.h @@ -237,7 +237,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -290,9 +290,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -305,9 +305,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -444,7 +444,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -463,23 +463,23 @@ */ typedef struct { - uint32_t Timestamp; /*!< Enable Timestamp */ - uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ - uint32_t TimestampInitialize; /*!< Initialize Timestamp */ - uint32_t TimestampUpdate; /*!< Timestamp Update */ - uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ - uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ - uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ - uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ - uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ - uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ - uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ - uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ - uint32_t TimestampClockType; /*!< Time stamp clock node type */ - uint32_t TimestampAddend; /*!< Timestamp addend value */ - uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ + uint32_t Timestamp; /*!< Enable Timestamp */ + uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ + uint32_t TimestampInitialize; /*!< Initialize Timestamp */ + uint32_t TimestampUpdate; /*!< Timestamp Update */ + uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ + uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ + uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ + uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ + uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ + uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ + uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ + uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ + uint32_t TimestampClockType; /*!< Time stamp clock node type */ + uint32_t TimestampAddend; /*!< Timestamp addend value */ + uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ } ETH_PTP_ConfigTypeDef; /** @@ -499,7 +499,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -520,7 +520,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ /** * @@ -545,26 +545,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -627,7 +627,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -855,7 +855,7 @@ #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ 0x00000300U /* DelayReq message * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP 0x00000400U /* DelayResp message - * (all clock types) */ + * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE 0x00000500U /* PdelayReq message * (peer-to-peer transparent clock) * or Announce message (Ordinary @@ -875,9 +875,9 @@ #define ETH_DMAPTPRXDESC_IPHE 0x00000008U /* IP Header Error */ #define ETH_DMAPTPRXDESC_IPPT 0x00000007U /* IP Payload Type */ #define ETH_DMAPTPRXDESC_IPPT_UDP 0x00000001U /* UDP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_TCP 0x00000002U /* TCP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_ICMP 0x00000003U /* ICMP payload encapsulated in * the IP datagram */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c index 1cedbecf7a..e976a83fca 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.c @@ -1531,7 +1531,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h index eee2b5691f..d46fe251dc 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/F7/stm32f7xx_hal_eth.h @@ -236,7 +236,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -289,9 +289,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -304,9 +304,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -443,7 +443,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -462,23 +462,23 @@ */ typedef struct { - uint32_t Timestamp; /*!< Enable Timestamp */ - uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ - uint32_t TimestampInitialize; /*!< Initialize Timestamp */ - uint32_t TimestampUpdate; /*!< Timestamp Update */ - uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ - uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ - uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ - uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ - uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ - uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ - uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ - uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ - uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ - uint32_t TimestampClockType; /*!< Time stamp clock node type */ - uint32_t TimestampAddend; /*!< Timestamp addend value */ - uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ + uint32_t Timestamp; /*!< Enable Timestamp */ + uint32_t TimestampUpdateMode; /*!< Fine or Coarse Timestamp Update */ + uint32_t TimestampInitialize; /*!< Initialize Timestamp */ + uint32_t TimestampUpdate; /*!< Timestamp Update */ + uint32_t TimestampAddendUpdate; /*!< Timestamp Addend Update */ + uint32_t TimestampAll; /*!< Enable Timestamp for All Packets */ + uint32_t TimestampRolloverMode; /*!< Timestamp Digital or Binary Rollover Control */ + uint32_t TimestampV2; /*!< Enable PTP Packet Processing for Version 2 Format */ + uint32_t TimestampEthernet; /*!< Enable Processing of PTP over Ethernet Packets */ + uint32_t TimestampIPv6; /*!< Enable Processing of PTP Packets Sent over IPv6-UDP */ + uint32_t TimestampIPv4; /*!< Enable Processing of PTP Packets Sent over IPv4-UDP */ + uint32_t TimestampEvent; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampMaster; /*!< Enable Timestamp Snapshot for Event Messages */ + uint32_t TimestampFilter; /*!< Enable MAC Address for PTP Packet Filtering */ + uint32_t TimestampClockType; /*!< Time stamp clock node type */ + uint32_t TimestampAddend; /*!< Timestamp addend value */ + uint32_t TimestampSubsecondInc; /*!< Subsecond Increment */ } ETH_PTP_ConfigTypeDef; /** @@ -498,7 +498,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -519,7 +519,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ /** * @@ -544,26 +544,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -626,7 +626,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -853,7 +853,7 @@ #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ 0x00000300U /* DelayReq message * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP 0x00000400U /* DelayResp message - * (all clock types) */ + * (all clock types) */ #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE 0x00000500U /* PdelayReq message * (peer-to-peer transparent clock) * or Announce message (Ordinary @@ -873,9 +873,9 @@ #define ETH_DMAPTPRXDESC_IPHE 0x00000008U /* IP Header Error */ #define ETH_DMAPTPRXDESC_IPPT 0x00000007U /* IP Payload Type */ #define ETH_DMAPTPRXDESC_IPPT_UDP 0x00000001U /* UDP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_TCP 0x00000002U /* TCP payload encapsulated in - * the IP datagram */ + * the IP datagram */ #define ETH_DMAPTPRXDESC_IPPT_ICMP 0x00000003U /* ICMP payload encapsulated in * the IP datagram */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c index f574957fa3..6c548f14b9 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.c @@ -1487,7 +1487,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h index 3a8071ec7c..376486aa14 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/H5/stm32h5xx_hal_eth.h @@ -243,7 +243,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -299,9 +299,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -314,9 +314,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -401,8 +401,8 @@ */ typedef enum { - HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ - HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ + HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ + HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ } ETH_MediaInterfaceTypeDef; /** @@ -436,7 +436,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -494,7 +494,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -515,7 +515,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ /** * @@ -540,26 +540,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -624,7 +624,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -1665,7 +1665,7 @@ ( __INTERRUPT__ ) ) == ( __INTERRUPT__ ) ) /*!< External interrupt line 46 Connected to the ETH wakeup EXTI Line */ - #define ETH_WAKEUP_EXTI_LINE 0x00004000U /* !< 46 - 32 = 14 */ + #define ETH_WAKEUP_EXTI_LINE 0x00004000U/* !< 46 - 32 = 14 */ /** * @brief Enable the ETH WAKEUP Exti Line. diff --git a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c index e52c00871c..a6682eb57e 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c +++ b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.c @@ -1487,7 +1487,7 @@ #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ heth->txFreeCallback( dmatxdesclist->PacketAddress[ idx ] ); - #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ + #else /* if ( USE_HAL_ETH_REGISTER_CALLBACKS == 1 ) */ /* Call callbacks */ #ifdef HAL_ETH_USE_PTP /* Handle Ptp */ diff --git a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h index 2612a41c88..eed010e395 100644 --- a/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h +++ b/source/portable/NetworkInterface/STM32/Drivers/H7/stm32h7xx_hal_eth.h @@ -243,7 +243,7 @@ ChecksumOffload; /*!< Enables or Disable the checksum checking for received packet payloads TCP, UDP or ICMP headers */ uint32_t InterPacketGapVal; /*!< Sets the minimum IPG between Packet during transmission. - * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ + * This parameter can be a value of @ref ETH_Inter_Packet_Gap */ FunctionalState GiantPacketSizeLimitControl; /*!< Enables or disables the Giant Packet Size Limit Control. */ @@ -299,9 +299,9 @@ uint32_t GiantPacketSizeLimit; /*!< Specifies the packet size that the MAC will declare it as Giant, If it's size is - * greater than the value programmed in this field in units of bytes - * This parameter must be a number between - * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ + * greater than the value programmed in this field in units of bytes + * This parameter must be a number between + * Min_Data = 0x618 (1518 byte) and Max_Data = 0x3FFF (32 Kbyte). */ FunctionalState ExtendedInterPacketGap; /*!< Enable or disables the extended inter packet gap. */ @@ -314,9 +314,9 @@ * This parameter can be a value of @ref ETH_Watchdog_Timeout */ uint32_t - PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. - * This parameter must be a number between - * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ + PauseTime; /*!< This field holds the value to be used in the Pause Time field in the transmit control packet. + * This parameter must be a number between + * Min_Data = 0x0 and Max_Data = 0xFFFF.*/ FunctionalState ZeroQuantaPause; /*!< Enable or disables the automatic generation of Zero Quanta Pause Control packets.*/ @@ -401,8 +401,8 @@ */ typedef enum { - HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ - HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ + HAL_ETH_MII_MODE = 0x00U, /*!< Media Independent Interface */ + HAL_ETH_RMII_MODE = 0x01U /*!< Reduced Media Independent Interface */ } ETH_MediaInterfaceTypeDef; /** @@ -436,7 +436,7 @@ ETH_MediaInterfaceTypeDef MediaInterface; /*!< Selects the MII interface or the RMII interface. */ ETH_DMADescTypeDef - * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ + * TxDesc; /*!< Provides the address of the first DMA Tx descriptor in the list */ ETH_DMADescTypeDef * RxDesc; /*!< Provides the address of the first DMA Rx descriptor in the list */ @@ -494,7 +494,7 @@ /** * @brief HAL ETH Rx Get Buffer Function definition */ - typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer ); /*!< pointer to an ETH Rx Get Buffer Function */ + typedef void (* pETH_rxAllocateCallbackTypeDef)( uint8_t ** buffer );/*!< pointer to an ETH Rx Get Buffer Function */ /** * @@ -515,7 +515,7 @@ /** * @brief HAL ETH Tx Free Function definition */ - typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer ); /*!< pointer to an ETH Tx Free function */ + typedef void (* pETH_txFreeCallbackTypeDef)( uint32_t * buffer );/*!< pointer to an ETH Tx Free function */ /** * @@ -540,26 +540,26 @@ typedef struct #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ { - ETH_TypeDef * Instance; /*!< Register base address */ + ETH_TypeDef * Instance; /*!< Register base address */ - ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ + ETH_InitTypeDef Init; /*!< Ethernet Init Configuration */ - ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list - * addresses and current descriptor index */ + ETH_TxDescListTypeDef TxDescList; /*!< Tx descriptor wrapper: holds all Tx descriptors list + * addresses and current descriptor index */ - ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list - * addresses and current descriptor index */ + ETH_RxDescListTypeDef RxDescList; /*!< Rx descriptor wrapper: holds all Rx descriptors list + * addresses and current descriptor index */ #ifdef HAL_ETH_USE_PTP - ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ + ETH_TimeStampTypeDef TxTimestamp; /*!< Tx Timestamp */ #endif /* HAL_ETH_USE_PTP */ - __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management - * and also related to Tx operations. This parameter can - * be a value of @ref ETH_State_Codes */ + __IO HAL_ETH_StateTypeDef gState; /*!< ETH state information related to global Handle management + * and also related to Tx operations. This parameter can + * be a value of @ref ETH_State_Codes */ - __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine - * This parameter can be a value of @ref ETH_Error_Code.*/ + __IO uint32_t ErrorCode; /*!< Holds the global Error code of the ETH HAL status machine + * This parameter can be a value of @ref ETH_Error_Code.*/ __IO uint32_t DMAErrorCode; /*!< Holds the DMA Rx Tx Error code when a DMA AIS interrupt occurs @@ -624,7 +624,7 @@ /** * @brief HAL ETH Callback pointer definition */ - typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth ); /*!< pointer to an ETH callback function */ + typedef void (* pETH_CallbackTypeDef)( ETH_HandleTypeDef * heth );/*!< pointer to an ETH callback function */ #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ @@ -1665,7 +1665,7 @@ ( __INTERRUPT__ ) ) == ( __INTERRUPT__ ) ) /*!< External interrupt line 86 Connected to the ETH wakeup EXTI Line */ - #define ETH_WAKEUP_EXTI_LINE 0x00400000U /* !< 86 - 64 = 22 */ + #define ETH_WAKEUP_EXTI_LINE 0x00400000U/* !< 86 - 64 = 22 */ /** * @brief Enable the ETH WAKEUP Exti Line. From 15640c4adc58e439ee0c5a6fb2487d3e59b18217 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Thu, 13 Mar 2025 12:35:42 +0530 Subject: [PATCH 4/4] Fix formatting --- source/include/FreeRTOSIPConfigDefaults.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index f777388c6f..e9d8a1c7b3 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -2166,13 +2166,13 @@ STATIC_ASSERT( ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME <= portMAX_DELAY ); /* * pvPortMemCpyStreamBuffer * - * Function to copy data into the stream buffer when sending + * Function to copy data into the stream buffer when sending * and copy data from the stream buffer when receiving. */ - #ifndef pvPortMemCpyStreamBuffer - #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) - #endif +#ifndef pvPortMemCpyStreamBuffer + #define pvPortMemCpyStreamBuffer( dst, src, count ) memcpy( dst, src, count ) +#endif /*---------------------------------------------------------------------------*/