Skip to content
Snippets Groups Projects
Unverified Commit eb9e2dad authored by Koen Zandberg's avatar Koen Zandberg
Browse files

encx24j600: add link status support

parent 8735adee
No related branches found
No related tags found
No related merge requests found
......@@ -401,6 +401,14 @@ static int _get(netdev_t *dev, netopt_t opt, void *value, size_t max_len)
res = ETHERNET_ADDR_LEN;
}
break;
case NETOPT_LINK_CONNECTED:
if (reg_get((encx24j600_t *)dev, ENC_ESTAT) & ENC_PHYLNK) {
*((netopt_enable_t *)value) = NETOPT_ENABLE;
}
else {
*((netopt_enable_t *)value) = NETOPT_DISABLE;
}
return sizeof(netopt_enable_t);
default:
res = netdev_eth_get(dev, opt, value, max_len);
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment