FlexBook / Mbed 2 deprecated FlexBook171204a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pageoled.h Source File

pageoled.h

00001 //
00002 // Filename: pagedoled.h
00003 //
00004 // Flexbook page for page A3.
00005 //
00006 
00007 // include guards
00008 #ifndef PAGEOLED_H
00009 #define PAGEOLED_H
00010 
00011 #include "page.h"
00012 
00013 #include "mbed.h"
00014 
00015 namespace Flexbook
00016 {
00017 
00018 struct SensorData;
00019 
00020 class PageOLED : public Page
00021 {
00022 public:
00023     // Constructor needs to be explicit.
00024     explicit PageOLED();
00025 
00026     // Destructor.
00027     virtual ~PageOLED();
00028     
00029     // Write data to OLED.
00030     void Write(uint64_t writedata);
00031     
00032     uint64_t Translate(char b1, char b2, char b3, char b4, char b5, char d1);
00033 
00034     void SensorPoll(const SensorData &sensordata);
00035     void DiceRoll(const int dicenr);
00036     
00037     virtual void HandlePageActions ();
00038 
00039 private:
00040     // Disable the copy constructor.
00041     PageOLED(const PageOLED &);
00042 
00043     // Disable assignment.
00044     PageOLED &operator=(const PageOLED &);
00045     
00046     DigitalOut data;
00047     DigitalOut clock;
00048     DigitalOut strobe;
00049     DigitalOut enable;
00050 };
00051 
00052 } // End Flexbook namespace.
00053 
00054 #endif // PAGEOLED_H
00055