Test MQTT Protocol with a Temperature Sensore
Dependencies: EthernetInterface LM75A MQTT mbed-rtos mbed
Fork of HelloMQTT by
Notebook info: HERE
K64F.h@17:0811bdbdd78a, 2015-07-27 (annotated)
- Committer:
- icraggs
- Date:
- Mon Jul 27 09:16:08 2015 +0000
- Revision:
- 17:0811bdbdd78a
Make sure QoS 2 works
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icraggs | 17:0811bdbdd78a | 1 | /******************************************************************************* |
icraggs | 17:0811bdbdd78a | 2 | * Copyright (c) 2014 IBM Corp. |
icraggs | 17:0811bdbdd78a | 3 | * |
icraggs | 17:0811bdbdd78a | 4 | * All rights reserved. This program and the accompanying materials |
icraggs | 17:0811bdbdd78a | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
icraggs | 17:0811bdbdd78a | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
icraggs | 17:0811bdbdd78a | 7 | * |
icraggs | 17:0811bdbdd78a | 8 | * The Eclipse Public License is available at |
icraggs | 17:0811bdbdd78a | 9 | * http://www.eclipse.org/legal/epl-v10.html |
icraggs | 17:0811bdbdd78a | 10 | * and the Eclipse Distribution License is available at |
icraggs | 17:0811bdbdd78a | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
icraggs | 17:0811bdbdd78a | 12 | * |
icraggs | 17:0811bdbdd78a | 13 | * Contributors: |
icraggs | 17:0811bdbdd78a | 14 | * Ian Craggs - initial implementation |
icraggs | 17:0811bdbdd78a | 15 | * Sam Grove - added method to check the status of the Ethernet cable |
icraggs | 17:0811bdbdd78a | 16 | *******************************************************************************/ |
icraggs | 17:0811bdbdd78a | 17 | |
icraggs | 17:0811bdbdd78a | 18 | #if !defined(K64F_H) |
icraggs | 17:0811bdbdd78a | 19 | #define K64F_H |
icraggs | 17:0811bdbdd78a | 20 | |
icraggs | 17:0811bdbdd78a | 21 | C12832 lcd(D11, D13, D12, D7, D10); |
icraggs | 17:0811bdbdd78a | 22 | BusOut led2 (LED_BLUE); |
icraggs | 17:0811bdbdd78a | 23 | BusOut r (D5); |
icraggs | 17:0811bdbdd78a | 24 | BusOut g (D9); |
icraggs | 17:0811bdbdd78a | 25 | BusOut b (D8); |
icraggs | 17:0811bdbdd78a | 26 | DigitalIn Up(A2); DigitalIn Down(A3); DigitalIn Right(A4); DigitalIn Left(A5); DigitalIn Click(D4); |
icraggs | 17:0811bdbdd78a | 27 | AnalogIn ain1(A0); AnalogIn ain2(A1); |
icraggs | 17:0811bdbdd78a | 28 | |
icraggs | 17:0811bdbdd78a | 29 | #define LED2_OFF 1 |
icraggs | 17:0811bdbdd78a | 30 | #define LED2_ON 0 |
icraggs | 17:0811bdbdd78a | 31 | |
icraggs | 17:0811bdbdd78a | 32 | #define DEFAULT_TYPE_NAME "iotsample-mbed-k64f" |
icraggs | 17:0811bdbdd78a | 33 | |
icraggs | 17:0811bdbdd78a | 34 | //#include "lpc_phy.h" |
icraggs | 17:0811bdbdd78a | 35 | // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods |
icraggs | 17:0811bdbdd78a | 36 | static uint32_t linkStatus(void) |
icraggs | 17:0811bdbdd78a | 37 | { |
icraggs | 17:0811bdbdd78a | 38 | return (1); |
icraggs | 17:0811bdbdd78a | 39 | } |
icraggs | 17:0811bdbdd78a | 40 | |
icraggs | 17:0811bdbdd78a | 41 | #endif |