Richard Osterloh / Mbed 2 deprecated WiFi_Scanner

Dependencies:   C027_Support SWO mbed-rtos mbed picojson

Fork of lpc4088_ebb_ublox_Cellular_PubNubDemo_rtos by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DeviceIO.cpp Source File

DeviceIO.cpp

00001 #include "DeviceIO.h"
00002 
00003 #define DEF "\033[39m"
00004 #define GRE "\033[32m"
00005 #define CYA "\033[36m"
00006 
00007 DeviceIO::DeviceIO(GPSI2C& gps) :
00008     _userButton(PC_13),
00009     _analog1(A0),
00010     _analog2(A1),
00011     _led1(PA_5),
00012     _gpsTracker(gps),
00013     _deviceFeedback(_led1)
00014 {
00015 }
00016 
00017 bool DeviceIO::userButtonPressed()
00018 {
00019     return _userButton;
00020 }
00021 
00022 GPSTracker& DeviceIO::gpsTracker()
00023 {
00024     return _gpsTracker;
00025 }
00026 
00027 DeviceFeedback& DeviceIO::deviceFeedback()
00028 {
00029     return _deviceFeedback;
00030 }
00031 
00032 AnalogIn& DeviceIO::analog1()
00033 {
00034     return _analog1;
00035 }
00036 
00037 AnalogIn& DeviceIO::analog2()
00038 {
00039     return _analog2;
00040 }
00041 
00042 void DeviceIO::debugPrint(const char *line)
00043 {
00044     _debug.printf(GRE "io::debugPrint" DEF "\r\n");
00045     _debug.printf(GRE "> " CYA "%s\r\n" DEF, line);
00046 }