NXP LPC1768 Ethernet driver for lwip and CMSIS-RTOS

Dependents:   EthernetInterface EthernetInterface EthernetInterface_RSF EthernetInterface ... more

Legacy Networking Libraries

This is an mbed 2 networking library. For mbed 5, the networking libraries have been revised to better support additional network stacks and thread safety here.

This library is based on the code of the NXP LPC port of the Lightweight TCP/IP Stack

Copyright(C) 2011, NXP Semiconductor
All rights reserved.

Software that is described herein is for illustrative purposes only
which provides customers with programming information regarding the
products. This software is supplied "AS IS" without any warranties.
NXP Semiconductors assumes no responsibility or liability for the
use of the software, conveys no license or title under any patent,
copyright, or mask work right to the product. NXP Semiconductors
reserves the right to make changes in the software without
notification. NXP Semiconductors also make no representation or
warranty that such application will be suitable for the specified
use without further testing or modification.

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Mon Oct 13 07:15:17 2014 +0100
Parent:
20:620d381e7f4c
Child:
22:fa7e1e2c6eb3
Commit message:
Synchronized with git revision 18b494b682ee3f3a1436f115ad1cde2bcfafecc2

Full URL: https://github.com/mbedmicro/mbed/commit/18b494b682ee3f3a1436f115ad1cde2bcfafecc2/

Net: K64F - Add phy_link_status() to link status in emac driver

Changed in this revision

arch/TARGET_Freescale/k64f_emac.c Show annotated file Show diff for this revision Revisions of this file
arch/TARGET_Freescale/k64f_emac_config.h Show annotated file Show diff for this revision Revisions of this file
--- a/arch/TARGET_Freescale/k64f_emac.c	Mon Sep 22 17:30:30 2014 +0100
+++ b/arch/TARGET_Freescale/k64f_emac.c	Mon Oct 13 07:15:17 2014 +0100
@@ -723,6 +723,13 @@
     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;
--- a/arch/TARGET_Freescale/k64f_emac_config.h	Mon Sep 22 17:30:30 2014 +0100
+++ b/arch/TARGET_Freescale/k64f_emac_config.h	Mon Oct 13 07:15:17 2014 +0100
@@ -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__