this is a test
Dependencies: C12832 EthernetInterface MQTT mbed-rtos mbed
Fork of HelloMQTT by
LPC1768.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 mehtod to check the status of the Ethernet cable |
icraggs | 17:0811bdbdd78a | 16 | *******************************************************************************/ |
icraggs | 17:0811bdbdd78a | 17 | |
icraggs | 17:0811bdbdd78a | 18 | #if !defined(LPC1768_H) |
icraggs | 17:0811bdbdd78a | 19 | #define LPC1768_H |
icraggs | 17:0811bdbdd78a | 20 | |
icraggs | 17:0811bdbdd78a | 21 | C12832 lcd(p5, p7, p6, p8, p11); |
icraggs | 17:0811bdbdd78a | 22 | DigitalOut led2(LED2); |
icraggs | 17:0811bdbdd78a | 23 | PwmOut r(p23); |
icraggs | 17:0811bdbdd78a | 24 | PwmOut g(p24); |
icraggs | 17:0811bdbdd78a | 25 | PwmOut b(p25); |
icraggs | 17:0811bdbdd78a | 26 | DigitalIn Down(p12); |
icraggs | 17:0811bdbdd78a | 27 | DigitalIn Left(p13); |
icraggs | 17:0811bdbdd78a | 28 | DigitalIn Click(p14); |
icraggs | 17:0811bdbdd78a | 29 | DigitalIn Up(p15); |
icraggs | 17:0811bdbdd78a | 30 | DigitalIn Right(p16); |
icraggs | 17:0811bdbdd78a | 31 | AnalogIn ain1(p19); |
icraggs | 17:0811bdbdd78a | 32 | AnalogIn ain2(p20); |
icraggs | 17:0811bdbdd78a | 33 | |
icraggs | 17:0811bdbdd78a | 34 | #define LED2_OFF 0 |
icraggs | 17:0811bdbdd78a | 35 | #define LED2_ON 1 |
icraggs | 17:0811bdbdd78a | 36 | |
icraggs | 17:0811bdbdd78a | 37 | #define DEFAULT_TYPE_NAME "iotsample-mbed-lpc1768" |
icraggs | 17:0811bdbdd78a | 38 | |
icraggs | 17:0811bdbdd78a | 39 | #include "lpc_phy.h" |
icraggs | 17:0811bdbdd78a | 40 | // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods |
icraggs | 17:0811bdbdd78a | 41 | static uint32_t linkStatus(void) |
icraggs | 17:0811bdbdd78a | 42 | { |
icraggs | 17:0811bdbdd78a | 43 | return (lpc_mii_read_data() & 1); |
icraggs | 17:0811bdbdd78a | 44 | } |
icraggs | 17:0811bdbdd78a | 45 | |
icraggs | 17:0811bdbdd78a | 46 | #endif |