mbgtools-lx
4.2.8
|
Go to the source code of this file.
Macros | |
#define | _ext extern |
Functions | |
static __mbg_inline uint32_t | get_supp_ptp_role_mask (uint32_t flags) |
Derive a "supported PTP roles" bit mask from PTP_CFG_INFO::supp_flags. More... | |
void | mac_from_ptp_clock_id (MBG_MAC_ADDR *p_mac_addr, const PTP_CLOCK_ID *p_clock_id) |
Get the MAC addr from a PTP clock ID. More... | |
void | ptp_clock_id_from_mac (PTP_CLOCK_ID *p_clock_id, const MBG_MAC_ADDR *p_mac_addr) |
Get the PTP clock ID from the MAC addr. More... | |
void | ptp_clock_id_from_str (PTP_CLOCK_ID *p_clock_id, const char *p_str) |
Get the PTP clock ID from a string. More... | |
#define _ext extern |
Definition at line 44 of file ptp_util.h.
|
static |
Derive a "supported PTP roles" bit mask from PTP_CFG_INFO::supp_flags.
The relevant bits used with PTP_CFG_INFO::supp_flags have not been defined sequentially, so we need to test them individually to put a supported roles bit mask together.
flags | bit mask from PTP_CFG_INFO::supp_flags, see PTP_CFG_FLAG_MASKS |
Definition at line 82 of file ptp_util.h.
References mac_from_ptp_clock_id(), PTP_CFG_MSK_CAN_BE_BOTH_MASTER, PTP_CFG_MSK_CAN_BE_MULTICAST_AUTO, PTP_CFG_MSK_CAN_BE_MULTICAST_MASTER, PTP_CFG_MSK_CAN_BE_MULTICAST_SLAVE, PTP_CFG_MSK_CAN_BE_TIME_MONITOR, PTP_CFG_MSK_CAN_BE_UNICAST_MASTER, PTP_CFG_MSK_CAN_BE_UNICAST_SLAVE, PTP_CFG_MSK_CAN_BE_V1_MASTER, PTP_CFG_MSK_CAN_BE_V1_SLAVE, PTP_CFG_MSK_NTP_HW_TS_MASTER, PTP_CFG_MSK_NTP_HW_TS_SLAVE, PTP_CFG_MSK_SUPP_MCAST_SLAVE_FLAG, ptp_clock_id_from_mac(), ptp_clock_id_from_str(), PTP_ROLE_MSK_BOTH_MASTER, PTP_ROLE_MSK_MULTICAST_AUTO, PTP_ROLE_MSK_MULTICAST_MASTER, PTP_ROLE_MSK_MULTICAST_SLAVE, PTP_ROLE_MSK_NTP_CLIENT, PTP_ROLE_MSK_NTP_SERVER, PTP_ROLE_MSK_TIME_MONITOR, PTP_ROLE_MSK_UNICAST_MASTER, PTP_ROLE_MSK_UNICAST_SLAVE, PTP_ROLE_MSK_V1_MASTER, and PTP_ROLE_MSK_V1_SLAVE.
Referenced by set_ptp_cfg().
void mac_from_ptp_clock_id | ( | MBG_MAC_ADDR * | p_mac_addr, |
const PTP_CLOCK_ID * | p_clock_id | ||
) |
Get the MAC addr from a PTP clock ID.
The clock ID is usually the MAC ID with 2 octets 0xFF and 0xFE inserted in the middle.
p_mac_addr | The MAC ID to be filled up |
p_clock_id | The PTP clock ID |
Referenced by get_supp_ptp_role_mask().
void ptp_clock_id_from_mac | ( | PTP_CLOCK_ID * | p_clock_id, |
const MBG_MAC_ADDR * | p_mac_addr | ||
) |
Get the PTP clock ID from the MAC addr.
The clock ID is usually the MAC ID with 2 octets 0xFF and 0xFE inserted in the middle.
p_clock_id | The PTP clock ID |
p_mac_addr | The MAC ID to be filled up |
Referenced by get_supp_ptp_role_mask().
void ptp_clock_id_from_str | ( | PTP_CLOCK_ID * | p_clock_id, |
const char * | p_str | ||
) |
Get the PTP clock ID from a string.
The clock ID is usually the MAC ID with 2 octets 0xFF and 0xFE inserted in the middle.
p_clock_id | The PTP clock ID |
p_str | The UUID as string with format e.g. 0050C2FFFED287DE |
Referenced by get_supp_ptp_role_mask().