Mobile Life IoT project using the AT&T IoT Starter Kit Software and files for my device to monitor the status or our Airstream travel trailer RV. A full description of the project is at Hackster.IO here as part of the Realtime AT&T IoT Starter Kit Challenge: https://www.hackster.io/Anubus/mobile-life-iot-9c10be
Dependencies: FXOS8700CQ MODSERIAL mbed
hardware.h@0:bd276b1f1249, 2017-04-02 (annotated)
- Committer:
- Anubus
- Date:
- Sun Apr 02 12:28:21 2017 +0000
- Revision:
- 0:bd276b1f1249
public version commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Anubus | 0:bd276b1f1249 | 1 | /* =================================================================== |
Anubus | 0:bd276b1f1249 | 2 | Copyright © 2016, AVNET Inc. |
Anubus | 0:bd276b1f1249 | 3 | |
Anubus | 0:bd276b1f1249 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
Anubus | 0:bd276b1f1249 | 5 | you may not use this file except in compliance with the License. |
Anubus | 0:bd276b1f1249 | 6 | You may obtain a copy of the License at |
Anubus | 0:bd276b1f1249 | 7 | |
Anubus | 0:bd276b1f1249 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
Anubus | 0:bd276b1f1249 | 9 | |
Anubus | 0:bd276b1f1249 | 10 | Unless required by applicable law or agreed to in writing, |
Anubus | 0:bd276b1f1249 | 11 | software distributed under the License is distributed on an |
Anubus | 0:bd276b1f1249 | 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
Anubus | 0:bd276b1f1249 | 13 | either express or implied. See the License for the specific |
Anubus | 0:bd276b1f1249 | 14 | language governing permissions and limitations under the License. |
Anubus | 0:bd276b1f1249 | 15 | |
Anubus | 0:bd276b1f1249 | 16 | ======================================================================== */ |
Anubus | 0:bd276b1f1249 | 17 | |
Anubus | 0:bd276b1f1249 | 18 | #ifndef Hardware_H_ |
Anubus | 0:bd276b1f1249 | 19 | #define Hardware_H_ |
Anubus | 0:bd276b1f1249 | 20 | #include "MODSERIAL.h" |
Anubus | 0:bd276b1f1249 | 21 | |
Anubus | 0:bd276b1f1249 | 22 | extern I2C i2c; //SDA, SCL -- define the I2C pins being used |
Anubus | 0:bd276b1f1249 | 23 | extern MODSERIAL pc; //UART to USB host |
Anubus | 0:bd276b1f1249 | 24 | extern MODSERIAL mdm; //UART to WNC modem |
Anubus | 0:bd276b1f1249 | 25 | //extern SerialBuffered mdm; //UART to WNC modem |
Anubus | 0:bd276b1f1249 | 26 | |
Anubus | 0:bd276b1f1249 | 27 | //Un-comment the definition below if you want to use the USB rx for another purpose. |
Anubus | 0:bd276b1f1249 | 28 | //otherwise the USB rx will be used to receive virtual sensor data from Avnet's |
Anubus | 0:bd276b1f1249 | 29 | //"Sensor Simulator Dashboard" utility |
Anubus | 0:bd276b1f1249 | 30 | #define USE_VIRTUAL_SENSORS |
Anubus | 0:bd276b1f1249 | 31 | |
Anubus | 0:bd276b1f1249 | 32 | // comment out the following line if color is not supported on the terminal |
Anubus | 0:bd276b1f1249 | 33 | #define USE_COLOR |
Anubus | 0:bd276b1f1249 | 34 | #ifdef USE_COLOR |
Anubus | 0:bd276b1f1249 | 35 | #define BLK "\033[30m" |
Anubus | 0:bd276b1f1249 | 36 | #define RED "\033[31m" |
Anubus | 0:bd276b1f1249 | 37 | #define GRN "\033[32m" |
Anubus | 0:bd276b1f1249 | 38 | #define YEL "\033[33m" |
Anubus | 0:bd276b1f1249 | 39 | #define BLU "\033[34m" |
Anubus | 0:bd276b1f1249 | 40 | #define MAG "\033[35m" |
Anubus | 0:bd276b1f1249 | 41 | #define CYN "\033[36m" |
Anubus | 0:bd276b1f1249 | 42 | #define WHT "\033[37m" |
Anubus | 0:bd276b1f1249 | 43 | #define DEF "\033[39m" |
Anubus | 0:bd276b1f1249 | 44 | #else |
Anubus | 0:bd276b1f1249 | 45 | #define BLK |
Anubus | 0:bd276b1f1249 | 46 | #define RED |
Anubus | 0:bd276b1f1249 | 47 | #define GRN |
Anubus | 0:bd276b1f1249 | 48 | #define YEL |
Anubus | 0:bd276b1f1249 | 49 | #define BLU |
Anubus | 0:bd276b1f1249 | 50 | #define MAG |
Anubus | 0:bd276b1f1249 | 51 | #define CYN |
Anubus | 0:bd276b1f1249 | 52 | #define WHT |
Anubus | 0:bd276b1f1249 | 53 | #define DEF |
Anubus | 0:bd276b1f1249 | 54 | #endif |
Anubus | 0:bd276b1f1249 | 55 | |
Anubus | 0:bd276b1f1249 | 56 | #ifdef _ULINK_PRINT |
Anubus | 0:bd276b1f1249 | 57 | #include "itm_output.h" |
Anubus | 0:bd276b1f1249 | 58 | #else |
Anubus | 0:bd276b1f1249 | 59 | #define PRINTF pc.printf |
Anubus | 0:bd276b1f1249 | 60 | #define PUTS pc.puts |
Anubus | 0:bd276b1f1249 | 61 | #endif |
Anubus | 0:bd276b1f1249 | 62 | |
Anubus | 0:bd276b1f1249 | 63 | |
Anubus | 0:bd276b1f1249 | 64 | #endif |