Sample MQTT-SN program

Dependencies:   C12832 MQTTSN mbed-rtos mbed

Committer:
icraggs
Date:
Thu Feb 26 23:53:26 2015 +0000
Revision:
1:3e4e55b1e6dd
Parent:
0:7bd27f2e3fb3
Sample MQTT-SN program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
icraggs 0:7bd27f2e3fb3 1 /*******************************************************************************
icraggs 0:7bd27f2e3fb3 2 * Copyright (c) 2014 IBM Corp.
icraggs 0:7bd27f2e3fb3 3 *
icraggs 0:7bd27f2e3fb3 4 * All rights reserved. This program and the accompanying materials
icraggs 0:7bd27f2e3fb3 5 * are made available under the terms of the Eclipse Public License v1.0
icraggs 0:7bd27f2e3fb3 6 * and Eclipse Distribution License v1.0 which accompany this distribution.
icraggs 0:7bd27f2e3fb3 7 *
icraggs 0:7bd27f2e3fb3 8 * The Eclipse Public License is available at
icraggs 0:7bd27f2e3fb3 9 * http://www.eclipse.org/legal/epl-v10.html
icraggs 0:7bd27f2e3fb3 10 * and the Eclipse Distribution License is available at
icraggs 0:7bd27f2e3fb3 11 * http://www.eclipse.org/org/documents/edl-v10.php.
icraggs 0:7bd27f2e3fb3 12 *
icraggs 0:7bd27f2e3fb3 13 * Contributors:
icraggs 0:7bd27f2e3fb3 14 * Ian Craggs - initial implementation
icraggs 0:7bd27f2e3fb3 15 * Sam Grove - added method to check the status of the Ethernet cable
icraggs 0:7bd27f2e3fb3 16 *******************************************************************************/
icraggs 0:7bd27f2e3fb3 17
icraggs 0:7bd27f2e3fb3 18 #if !defined(K64F_H)
icraggs 0:7bd27f2e3fb3 19 #define K64F_H
icraggs 0:7bd27f2e3fb3 20
icraggs 0:7bd27f2e3fb3 21 C12832 lcd(D11, D13, D12, D7, D10);
icraggs 0:7bd27f2e3fb3 22 BusOut led2 (LED_BLUE);
icraggs 0:7bd27f2e3fb3 23 BusOut r (D5);
icraggs 0:7bd27f2e3fb3 24 BusOut g (D9);
icraggs 0:7bd27f2e3fb3 25 BusOut b (D8);
icraggs 0:7bd27f2e3fb3 26 //MMA7660 MMA(PTE25, PTE24);
icraggs 0:7bd27f2e3fb3 27 //LM75B sensor(PTE25, PTE24);
icraggs 0:7bd27f2e3fb3 28 DigitalIn Up(A2); DigitalIn Down(A3); DigitalIn Right(A4); DigitalIn Left(A5); DigitalIn Click(D4);
icraggs 0:7bd27f2e3fb3 29 AnalogIn ain1(A0); AnalogIn ain2(A1);
icraggs 0:7bd27f2e3fb3 30
icraggs 0:7bd27f2e3fb3 31 #define LED2_OFF 1
icraggs 0:7bd27f2e3fb3 32 #define LED2_ON 0
icraggs 0:7bd27f2e3fb3 33
icraggs 0:7bd27f2e3fb3 34 #define DEFAULT_TYPE_NAME "iotsample-mbed-k64f"
icraggs 0:7bd27f2e3fb3 35
icraggs 0:7bd27f2e3fb3 36 //#include "lpc_phy.h"
icraggs 0:7bd27f2e3fb3 37 // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods
icraggs 0:7bd27f2e3fb3 38 static uint32_t linkStatus(void)
icraggs 0:7bd27f2e3fb3 39 {
icraggs 0:7bd27f2e3fb3 40 return (1);
icraggs 0:7bd27f2e3fb3 41 }
icraggs 0:7bd27f2e3fb3 42
icraggs 0:7bd27f2e3fb3 43 #endif