FUNCTIONAL Update from mbed v49: Add APIs for setName/getName so device is name addressible. Also APIs for getting link stats. Also, minor derivative to reduce compiler warnings and tag read-only parameters as const.
Dependencies: Socket lwip-eth lwip-sys lwip
Dependents: WattEye X10Svr SSDP_Server
Fork of EthernetInterface by
Diff: EthernetInterface_Mods.hxx
- Revision:
- 55:3adba67dc7df
- Parent:
- 50:957161ecdd16
--- a/EthernetInterface_Mods.hxx Thu Sep 08 23:41:58 2016 +0000 +++ b/EthernetInterface_Mods.hxx Sun Jun 10 22:19:36 2018 +0000 @@ -62,4 +62,18 @@ uint32_t EthernetInterface::mii_read_data(void) { return lpc_mii_read_data(); // 16-bit MRDD - address 0x2008 4030 -} \ No newline at end of file +} + +void EthernetInterface::LinkBlinkOnTraffic(int BlinkIt) +{ + uint32_t data; + + if (lpc_mii_read(0x19, &data) == ERR_OK) { + data &= ~(1 << 5); // Mode 2, link status blinks on data + if (!BlinkIt) + data |= (1 << 5); // Mode 1, link status only + if (lpc_mii_write(0x19, data) != ERR_OK) { + printf("LED Reconfig attempt failed.\r\n"); + } + } +}