
Contains example code to connect the mbed LPC1768 or FRDM-K64F devices to the IBM Internet of Things Cloud service via ethernet.
Dependencies: C12832 MQTT LM75B MMA7660
Dependents: MFT_IoT_demo_USB400 IBM_RFID
LPC1768.h
00001 /******************************************************************************* 00002 * Copyright (c) 2014 IBM Corp. 00003 * 00004 * All rights reserved. This program and the accompanying materials 00005 * are made available under the terms of the Eclipse Public License v1.0 00006 * and Eclipse Distribution License v1.0 which accompany this distribution. 00007 * 00008 * The Eclipse Public License is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * and the Eclipse Distribution License is available at 00011 * http://www.eclipse.org/org/documents/edl-v10.php. 00012 * 00013 * Contributors: 00014 * Ian Craggs - initial implementation 00015 * Sam Grove - added mehtod to check the status of the Ethernet cable 00016 *******************************************************************************/ 00017 00018 #if !defined(LPC1768_H) 00019 #define LPC1768_H 00020 00021 C12832 lcd(p5, p7, p6, p8, p11); 00022 DigitalOut led2(LED2); 00023 PwmOut r(p23); 00024 PwmOut g(p24); 00025 PwmOut b(p25); 00026 MMA7660 MMA(p28, p27); 00027 LM75B sensor(p28, p27); 00028 DigitalIn Down(p12); 00029 DigitalIn Left(p13); 00030 DigitalIn Click(p14); 00031 DigitalIn Up(p15); 00032 DigitalIn Right(p16); 00033 AnalogIn ain1(p19); 00034 AnalogIn ain2(p20); 00035 00036 #define LED2_OFF 0 00037 #define LED2_ON 1 00038 00039 #define DEFAULT_TYPE_NAME "iotsample-mbed-lpc1768" 00040 00041 #include "lpc_phy.h" 00042 // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods 00043 static uint32_t linkStatus(void) 00044 { 00045 return (lpc_mii_read_data() & 1); 00046 } 00047 00048 #endif
Generated on Thu Jul 14 2022 03:22:23 by
