Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of HelloMQTT by
C027.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 | *******************************************************************************/ | 
| icraggs | 17:0811bdbdd78a | 16 | |
| icraggs | 17:0811bdbdd78a | 17 | #if !defined(K64F_H) | 
| icraggs | 17:0811bdbdd78a | 18 | #define K64F_H | 
| icraggs | 17:0811bdbdd78a | 19 | |
| icraggs | 17:0811bdbdd78a | 20 | C12832 lcd(D11, D13, D12, D7, D10); | 
| icraggs | 17:0811bdbdd78a | 21 | PwmOut r(D5); | 
| icraggs | 17:0811bdbdd78a | 22 | PwmOut g(D9); | 
| icraggs | 17:0811bdbdd78a | 23 | PwmOut b(D8); | 
| icraggs | 17:0811bdbdd78a | 24 | DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); | 
| icraggs | 17:0811bdbdd78a | 25 | DigitalIn Up(A2); DigitalIn Down(A3); DigitalIn Left(A4); DigitalIn Right(A5); DigitalIn Click(D4); | 
| icraggs | 17:0811bdbdd78a | 26 | AnalogIn ain1 (A0); AnalogIn ain2 (A1); | 
| icraggs | 17:0811bdbdd78a | 27 | |
| icraggs | 17:0811bdbdd78a | 28 | #define LED2_OFF 0 | 
| icraggs | 17:0811bdbdd78a | 29 | #define LED2_ON 1 | 
| icraggs | 17:0811bdbdd78a | 30 | |
| icraggs | 17:0811bdbdd78a | 31 | #define DEFAULT_TYPE_NAME "iotsample-mbed-c027" | 
| icraggs | 17:0811bdbdd78a | 32 | |
| icraggs | 17:0811bdbdd78a | 33 | #include "lpc_phy.h" | 
| icraggs | 17:0811bdbdd78a | 34 | // need a wrapper since K64F and LPC1768 wont have the same name for mii read methods | 
| icraggs | 17:0811bdbdd78a | 35 | static uint32_t linkStatus(void) | 
| icraggs | 17:0811bdbdd78a | 36 | { | 
| icraggs | 17:0811bdbdd78a | 37 | return (lpc_mii_read_data() & 1); | 
| icraggs | 17:0811bdbdd78a | 38 | } | 
| icraggs | 17:0811bdbdd78a | 39 | |
| icraggs | 17:0811bdbdd78a | 40 | #endif | 
