IoT Example
Dependencies: C12832 LM75B MMA7660 MQTT mbed-rtos mbed
Fork of IBMIoTClientEthernetExample by
Revision 7:2fb7a98b559c, committed 2014-09-25
- Comitter:
- sam_grove
- Date:
- Thu Sep 25 18:22:51 2014 +0000
- Parent:
- 6:1a37fe371ee0
- Child:
- 8:7bf351c1b125
- Commit message:
- Add linkStatus for K64F not currently implemented but doesnt break cross platform support
Changed in this revision
--- a/C027.h Wed Sep 24 21:47:40 2014 +0000 +++ b/C027.h Thu Sep 25 18:22:51 2014 +0000 @@ -12,6 +12,7 @@ * * Contributors: * Ian Craggs - initial implementation + * Sam Grove - added mehtod to check the status of the Ethernet cable *******************************************************************************/ #if !defined(K64F_H) @@ -29,4 +30,11 @@ #define DEFAULT_TYPE_NAME "iotsample-mbed-c027" +#include "lpc_phy.h" +// need a wrapper since K64F and LPC1768 wont have the same name for mii read methods +static uint32_t linkStatus(void) +{ + return (lpc_mii_read_data() & 1); +} + #endif \ No newline at end of file
--- a/K64F.h Wed Sep 24 21:47:40 2014 +0000 +++ b/K64F.h Thu Sep 25 18:22:51 2014 +0000 @@ -12,6 +12,7 @@ * * Contributors: * Ian Craggs - initial implementation + * Sam Grove - added mehtod to check the status of the Ethernet cable *******************************************************************************/ #if !defined(K64F_H) @@ -32,4 +33,11 @@ #define DEFAULT_TYPE_NAME "iotsample-mbed-k64f" +//#include "lpc_phy.h" +// need a wrapper since K64F and LPC1768 wont have the same name for mii read methods +static uint32_t linkStatus(void) +{ + return (1); +} + #endif \ No newline at end of file
--- a/main.cpp Wed Sep 24 21:47:40 2014 +0000 +++ b/main.cpp Thu Sep 25 18:22:51 2014 +0000 @@ -13,6 +13,7 @@ * Contributors: * Sam Danbury - initial implementation * Ian Craggs - refactoring to remove STL and other changes + * Sam Grove - added check for Ethernet cable. *******************************************************************************/ #include "LM75B.h"