Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Committer:
xinlei
Date:
Mon Aug 08 11:05:57 2016 +0000
Revision:
139:f8ab852e83e7
Parent:
96:5dfdc8568e9f
Etisalat and Teleena APN.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xinlei 93:0acd11870c6a 1 #ifndef LCDDISPLAY_H
xinlei 93:0acd11870c6a 2 #define LCDDISPLAY_H
xinlei 93:0acd11870c6a 3 #include <string.h>
xinlei 93:0acd11870c6a 4 #include "C12832.h"
xinlei 93:0acd11870c6a 5 #include "rtos.h"
xinlei 94:61d44636f020 6 #define DISPLAY_LEN 27
xinlei 93:0acd11870c6a 7
xinlei 93:0acd11870c6a 8 class LCDDisplay
xinlei 93:0acd11870c6a 9 {
xinlei 96:5dfdc8568e9f 10 private:
xinlei 93:0acd11870c6a 11 LCDDisplay(): firstLine(""), secondLine(""), thirdLine(""),
xinlei 93:0acd11870c6a 12 _lcd(D11, D13, D12, D7, D10) {}
xinlei 96:5dfdc8568e9f 13 LCDDisplay(LCDDisplay const&);
xinlei 96:5dfdc8568e9f 14 void operator=(LCDDisplay const&);
xinlei 96:5dfdc8568e9f 15 public:
xinlei 96:5dfdc8568e9f 16 static LCDDisplay& inst() {
xinlei 96:5dfdc8568e9f 17 static LCDDisplay _ref;
xinlei 96:5dfdc8568e9f 18 return _ref;
xinlei 96:5dfdc8568e9f 19 }
xinlei 93:0acd11870c6a 20 void setFirstLine(const char* p);
xinlei 93:0acd11870c6a 21 const char *getFirstLine() const { return firstLine; }
xinlei 93:0acd11870c6a 22 void setSecondLine(const char* p);
xinlei 93:0acd11870c6a 23 const char *getSecondLine() const { return secondLine; }
xinlei 93:0acd11870c6a 24 void setThirdLine(const char* p);
xinlei 93:0acd11870c6a 25 const char *getThirdLine() const { return thirdLine; }
xinlei 93:0acd11870c6a 26 void setLines(const char *p1, const char *p2=NULL, const char *p3=NULL);
xinlei 93:0acd11870c6a 27 void clear();
xinlei 93:0acd11870c6a 28 virtual ~LCDDisplay() {}
xinlei 93:0acd11870c6a 29
xinlei 93:0acd11870c6a 30 protected:
xinlei 93:0acd11870c6a 31 void lcdPrint(const char*, const char* = NULL, const char* = NULL);
xinlei 93:0acd11870c6a 32 void _setLine(char *dest, const char* src, size_t n);
xinlei 93:0acd11870c6a 33
xinlei 93:0acd11870c6a 34 private:
xinlei 93:0acd11870c6a 35 char firstLine[DISPLAY_LEN];
xinlei 93:0acd11870c6a 36 char secondLine[DISPLAY_LEN];
xinlei 93:0acd11870c6a 37 char thirdLine[DISPLAY_LEN];
xinlei 93:0acd11870c6a 38 C12832 _lcd;
xinlei 93:0acd11870c6a 39 Mutex lcdLock;
xinlei 93:0acd11870c6a 40 };
xinlei 93:0acd11870c6a 41
xinlei 93:0acd11870c6a 42 #endif /* LCDDISPLAY_H */