IBM IoT Client WiFi example using Murata Type-YD WiFi module
Dependencies: C12832_fix LM75B MMA7660 MQTT PowerControl SNICInterface mbed-rtos mbed
Fork of IBMIoTClientWifiExample by
Diff: main.cpp
- Revision:
- 14:1dd53a6d02d2
- Parent:
- 13:2234cf0a8127
- Child:
- 15:fa5357aa190a
--- a/main.cpp Fri Mar 20 16:03:58 2015 +0000 +++ b/main.cpp Sun Mar 22 03:12:30 2015 +0000 @@ -21,6 +21,11 @@ * *******************************************************************************/ +#if defined(TARGET_LPC1768) +// Comment out folloing line when you are not using Seeed Studio Arch Pro +#define TARGET_ARCH_PRO +#endif + #include "LM75B.h" #include "MMA7660.h" #include "MQTTClient.h" @@ -44,12 +49,13 @@ #define MQTT_MAX_PACKET_SIZE 250 -#if defined(TARGET_ARCH_PRO) -#warning "Compiling for mbed ARCH PRO" -#include "RZA1H.h" -#elif defined(TARGET_LPC1768) -#warning "Compiling for mbed LPC1768" -#include "LPC1768.h" +#if defined(TARGET_LPC1768) + #if defined(TARGET_ARCH_PRO) + #warning "Compiling for mbed Arch Pro" + #else + #warning "Compiling for mbed LPC1768" + #endif + #include "LPC1768.h" #elif defined(TARGET_K64F) #warning "Compiling for mbed K64F" #include "K64F.h" @@ -421,3 +427,15 @@ client.yield(10); // allow the MQTT client to receive messages } } + +#if defined(TARGET_ARCH_PRO) | defined(TARGET_RZ_A1H) +extern "C" void mbed_mac_address(char *mac) +{ + mac[0] = 0x00; + mac[1] = 0x02; + mac[2] = 0xF7; + mac[3] = 0xF1; + mac[4] = 0x91; + mac[5] = 0x9F; +}; +#endif