Skip to content

Commit 54b9bf8

Browse files
committed
drivers: ethernet: phy: add PHY_LINK_IS_SPEED_10M macro
add PHY_LINK_IS_SPEED_10M macro to check if the link speed is 10M. Signed-off-by: Fin Maaß <[email protected]>
1 parent bdddae1 commit 54b9bf8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/zephyr/net/phy.h

+10
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ enum phy_link_speed {
8888
#define PHY_LINK_IS_SPEED_100M(x) \
8989
(x & (LINK_HALF_100BASE_T | LINK_FULL_100BASE_T | LINK_FULL_100BASE_X))
9090

91+
/**
92+
* @brief Check if phy link speed is 10 Mbit/sec.
93+
*
94+
* @param x Link capabilities
95+
*
96+
* @return True if link is 10 Mbit/sec, false if not.
97+
*/
98+
#define PHY_LINK_IS_SPEED_10M(x) \
99+
(x & (LINK_HALF_10BASE_T | LINK_FULL_10BASE_T | LINK_FULL_10BASE_X))
100+
91101
/** @brief Link state */
92102
struct phy_link_state {
93103
/** Link speed */

0 commit comments

Comments
 (0)