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