Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/stm32/eth: fix and improve ETH defines #21072

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cpu/stm32/include/periph/cpu_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
*/
#define RX_DESC_STAT_FL (0x3FFF0000) /* bits 16-29 */
#define RX_DESC_STAT_DE (BIT14) /**< If set, a frame too large to fit buffers given by descriptors was received */
#define RX_DESC_STAT_ES (BIT14) /**< If set, an error occurred during RX */
#define RX_DESC_STAT_ES (BIT15) /**< If set, an error occurred during RX */
#define RX_DESC_STAT_OWN (BIT31) /**< If set, descriptor is owned by DMA, otherwise by CPU */
/** @} */
/**
Expand All @@ -117,10 +117,10 @@
* @{
*/
#define TX_DESC_STAT_UF (BIT1) /**< If set, an underflow occurred while sending */
#define TX_DESC_STAT_EC (BIT8) /**< If set, TX was aborted due to excessive collisions (half-duplex only) */

Check warning on line 120 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_NC (BIT10) /**< If set, no carrier was detected (TX aborted) */
#define TX_DESC_STAT_ES (BIT15) /**< If set, one or more error occurred */
#define TX_DESC_STAT_TTSS (BIT17) /**< If set, the descriptor contains a valid PTP timestamp */

Check warning on line 123 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
/**
* @brief Indicates if TDES3 points to the next DMA descriptor (1), or to a second buffer (0)
*
Expand All @@ -129,7 +129,7 @@
* always set by the driver
*/
#define TX_DESC_STAT_TCH (BIT20)
#define TX_DESC_STAT_TER (BIT21) /**< If set, DMA will return to first descriptor in ring afterwards */

Check warning on line 132 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
/**
* @brief Checksum insertion control
*
Expand All @@ -140,10 +140,14 @@
* | `0b10` | Calculate and insert IPv4 checksum, insert pre-calculated payload checksum |
* | `0b11 | Calculated and insert both IPv4 and payload checksum |
*/
#define TX_DESC_STAT_CIC (BIT22 | BIT23)
#define TX_DESC_STAT_CIC (BIT22 | BIT23)
#define TX_DESC_STAT_CIC_NO_HW_CHECKSUM (0) /**< Do not compute checksums in hardware */

Check warning on line 144 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_CIC_HW_CHECKSUM_IPV4 (BIT22) /**< Compute the IPv4 header checksum in hardware */

Check warning on line 145 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_CIC_HW_CHECKSUM_BOTH (BIT22 | BIT32) /**< Compute the IPv4 header and payload checksum in hardware */

Check warning on line 146 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters

#define TX_DESC_STAT_TTSE (BIT25) /**< If set, an PTP timestamp is added to the descriptor after TX completed */

Check warning on line 148 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_FS (BIT28) /**< If set, buffer contains first segment of frame to transmit */

Check warning on line 149 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_LS (BIT29) /**< If set, buffer contains last segment of frame to transmit */

Check warning on line 150 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
#define TX_DESC_STAT_IC (BIT30) /**< If set, trigger IRQ on completion */
#define TX_DESC_STAT_OWN (BIT31) /**< If set, descriptor is owned by DMA, otherwise by CPU */
/** @} */
Expand All @@ -156,7 +160,7 @@
void stm32_eth_common_init(void);
#endif /* MODULE_PERIPH_ETH_COMMON */


Check warning on line 163 in cpu/stm32/include/periph/cpu_eth.h

View workflow job for this annotation

GitHub Actions / static-tests

too many consecutive empty lines
#ifdef __cplusplus
}
#endif
Expand Down
Loading