mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #551 from sg-/enet_status
Net: K64F - Add phy_link_status() to link status in emac driverpull/557/head
commit
18b494b682
|
|
@ -723,6 +723,13 @@ typedef struct {
|
|||
enet_phy_duplex_t duplex;
|
||||
} PHY_STATE;
|
||||
|
||||
int phy_link_status() {
|
||||
bool connection_status;
|
||||
enet_dev_if_t * enetIfPtr = (enet_dev_if_t*)&enetDevIf[BOARD_DEBUG_ENET_INSTANCE];
|
||||
phy_get_link_status(enetIfPtr, &connection_status);
|
||||
return (int)connection_status;
|
||||
}
|
||||
|
||||
static void k64f_phy_task(void *data) {
|
||||
struct netif *netif = (struct netif*)data;
|
||||
bool connection_status;
|
||||
|
|
|
|||
|
|
@ -44,5 +44,15 @@
|
|||
|
||||
#define ENET_ETH_MAX_FLEN (1522) // recommended size for a VLAN frame
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int phy_link_status(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // #define K64F_EMAC_CONFIG_H__
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue