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

io/LCDDisplay.h

Committer:
xinlei
Date:
2015-04-13
Revision:
93:0acd11870c6a
Child:
94:61d44636f020

File content as of revision 93:0acd11870c6a:

#ifndef LCDDISPLAY_H
#define LCDDISPLAY_H
#include <string.h>
#include "C12832.h"
#include "rtos.h"
#define DISPLAY_LEN 28

class LCDDisplay
{
public:
        LCDDisplay(): firstLine(""), secondLine(""), thirdLine(""),
                      _lcd(D11, D13, D12, D7, D10) {}
        void setFirstLine(const char* p);
        const char *getFirstLine() const { return firstLine; }
        void setSecondLine(const char* p);
        const char *getSecondLine() const { return secondLine; }
        void setThirdLine(const char* p);
        const char *getThirdLine() const { return thirdLine; }
        void setLines(const char *p1, const char *p2=NULL, const char *p3=NULL);
        void clear();
        virtual ~LCDDisplay() {}

protected:
        void lcdPrint(const char*, const char* = NULL, const char* = NULL);
        void _setLine(char *dest, const char* src, size_t n);

private:
        char firstLine[DISPLAY_LEN];
        char secondLine[DISPLAY_LEN];
        char thirdLine[DISPLAY_LEN];
        C12832 _lcd;
        Mutex lcdLock;
};

#endif /* LCDDISPLAY_H */