ATT example code

Dependencies:   WNCInterface mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers hardware.h Source File

hardware.h

00001 /* ===================================================================
00002 Copyright © 2016, AVNET Inc.  
00003 
00004 Licensed under the Apache License, Version 2.0 (the "License"); 
00005 you may not use this file except in compliance with the License.
00006 You may obtain a copy of the License at
00007 
00008    http://www.apache.org/licenses/LICENSE-2.0
00009 
00010 Unless required by applicable law or agreed to in writing, 
00011 software distributed under the License is distributed on an 
00012 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
00013 either express or implied. See the License for the specific 
00014 language governing permissions and limitations under the License.
00015 
00016 ======================================================================== */
00017 
00018 #ifndef Hardware_H_
00019 #define Hardware_H_
00020 #include "MODSERIAL.h"
00021 
00022 extern I2C i2c;     //SDA, SCL -- define the I2C pins being used
00023 extern MODSERIAL pc;    // tx, rx with default tx, rx buffer sizes
00024 
00025 // comment out the following line if color is not supported on the terminal
00026 #define USE_COLOR
00027 #ifdef USE_COLOR
00028  #define BLK "\033[30m"
00029  #define RED "\033[31m"
00030  #define GRN "\033[32m"
00031  #define YEL "\033[33m"
00032  #define BLU "\033[34m"
00033  #define MAG "\033[35m"
00034  #define CYN "\033[36m"
00035  #define WHT "\033[37m"
00036  #define DEF "\033[39m"
00037 #else
00038  #define BLK
00039  #define RED
00040  #define GRN
00041  #define YEL
00042  #define BLU
00043  #define MAG
00044  #define CYN
00045  #define WHT
00046  #define DEF
00047 #endif
00048 
00049 #define CTOF(x)  ((x)*1.8+32)
00050 
00051 #ifdef _ULINK_PRINT
00052 #include "itm_output.h"
00053 #else
00054 #define PRINTF printf
00055 #define PUTS   puts
00056 #endif
00057 #endif