Michael Kuchnik / Mbed 2 deprecated uLCD_Multiscreen

Dependencies:   4DGL-uLCD-SE mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ScreenUpdater.h Source File

ScreenUpdater.h

00001 #ifndef SCREENUPDATER_H
00002 #define SCREENUPDATER_H
00003 #include <queue>
00004 #include "rtos.h"
00005 #include "uLCD_4DGL.h"
00006 #include "Command.h"
00007 /**
00008  * Attaches a thread to a physical screen and makes it operate on all input instructions.
00009  */
00010 class ScreenUpdater {
00011     private:
00012         uLCD_4DGL *uLCD;
00013         Thread *uLCD_thread;
00014         std::queue<Command*> commands;
00015         Mutex commands_mutex;
00016     public:
00017         /**
00018          * Attaches an LCD to the updater.
00019          */
00020         ScreenUpdater(uLCD_4DGL *uLCD);
00021         /**
00022          * Add a command to the queue.
00023          */
00024         void addCommand(Command *_command);
00025         /**
00026          * Destructor. 
00027          */
00028         ~ScreenUpdater();
00029 };
00030 typedef struct uLCD_Thread_Args {
00031     uLCD_4DGL* uLCD;
00032     std::queue<Command*>* commands;
00033     Mutex* commands_mutex;
00034 } uLCD_Thread_Args;
00035 #endif