A program for IoT demonstration with mbed, EnOcean and MQTT.

Dependencies:   IBMIoTClientEthernetExample C12832 EthernetInterface MQTT USB400Serial USBHost mbed

Fork of IBMIoTClientEthernetExample by IBM Watson IoT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LPC1768.h Source File

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 led1(LED1);
00023 DigitalOut led2(LED2);
00024 DigitalOut led3(LED3);
00025 DigitalOut led4(LED4);
00026 PwmOut r(p23);
00027 PwmOut g(p24);
00028 PwmOut b(p25);
00029 //MMA7660 MMA(p28, p27);
00030 //LM75B sensor(p28, p27);
00031 DigitalIn Down(p12);
00032 DigitalIn Left(p13);
00033 DigitalIn Click(p14);
00034 DigitalIn Up(p15);
00035 DigitalIn Right(p16);
00036 AnalogIn ain1(p19);
00037 AnalogIn ain2(p20);
00038 
00039 #define LED2_OFF 0
00040 #define LED2_ON 1
00041 
00042 #define DEFAULT_TYPE_NAME "iotsample-mbed-lpc1768"
00043 
00044 #include "lpc_phy.h"
00045 // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods
00046 static uint32_t linkStatus(void)
00047 {
00048     return (lpc_mii_read_data() & 1);
00049 }
00050 
00051 #endif