src/maryoled.h
説明を見る。
00001 /*
00002  * MARYOLED.h
00003  *
00004  *  Created on: 2011/08/01
00005  *      Author: lynxeyed
00006  */
00007 
00008 #ifndef MARYOLED_H_
00009 #define MARYOLED_H_
00010 
00011 /**************************************************************************/
00035 #include "ssp.h"
00036 #include "gpio.h"
00037 
00038 typedef enum {OLED,Nokia6610,Nokia6100,PCF8833} LCD_DEVICES; // Defaults:OLED
00039 
00040 class MARYOLED {
00041 private:
00042         LCD_DEVICES device;
00043         int _row;
00044         int _column;
00045         int _foreground;
00046         int _background;
00047         int _width;
00048         int _height;
00049 
00051         enum {
00052                 SET_DISPLAY_MODE_ALL_OFF                = 0xA4,
00053                 SET_COMMAND_LOCK                        = 0xFD,
00054                 SET_SLEEP_MODE_ON                       = 0xAE,
00055                 FRONT_CLOCK_DRIVER_OSC_FREQ             = 0xB3,
00056                 SET_MUX_RATIO                           = 0xCA,
00057                 SET_DISPAY_OFFSET                       = 0xA2,
00058                 SET_DISPAY_START_LINE                   = 0xA1,
00059                 SET_REMAP_COLOR_DEPTH                   = 0xA0,
00060                 SET_GPIO                                = 0xB5,
00061                 FUNCTION_SELECTION                      = 0xAB,
00062                 SET_SEGMENT_LOW_VOLTAGE                 = 0xB4,
00063                 SET_CONTRAST_CURRENT_FOR_COLOR_ABC      = 0xC1,
00064                 MASTER_CONTRAST_CURRENT_CONTROL         = 0xC7,
00065                 LOOKUP_TABLE_FOR_GRAYSCALE_PULSE_WIDTH  = 0xB8,
00066                 SET_RESET_PRECHARGE_PERIOD              = 0xB1,
00067                 ENHANCE_DRIVING_SCHEME_CAPABILITY       = 0xB2,
00068                 SET_PRECHARGE_VOLTAGE                   = 0xBB,
00069                 SET_SECOND_PRECHARGE_VOLTAGE            = 0xB6,
00070                 SET_VCOMH_VOLTAGE                       = 0xBE,
00071                 SET_DISPLAY_MODE_RESET                  = 0xA6,
00072                 SET_COLUMN_ADDRESS                      = 0x15,
00073                 SET_ROW_ADDRESS                         = 0x75,
00074                 WRITE_RAM_COMMAND                       = 0x5C,
00075                 SET_SLEEP_MODE_OFF                      = 0xAF
00076         };
00078     enum  {
00079         OFF   = 0,  
00080         ON          
00081     };
00082 
00083 
00084 public:
00085         MARYOLED();             // announce the constructor to initialize
00086         ~MARYOLED();
00087 
00088         void reset();
00089         void command( int value );
00090         void data( int value );
00091         void _window( int x, int y, int width, int height );
00092         void locate(int column, int row);
00093         void newline();
00094         void _putp( int colour );
00095         int  _putc( int value );
00096         void cls( void );
00097         void window( int x, int y, int width, int height );
00098         void putp( int colour );
00099         void pixel( int x, int y, int colour );
00100         void fill( int x, int y, int width, int height, int colour );
00101         void blit( int x, int y, int width, int height, const int* colour );
00102         void bitblit( int x, int y, int width, int height, const char* bitstream );
00103         void foreground(int c);
00104         void background(int c);
00105         int  width();
00106         int  height();
00107         int  columns();
00108         int  rows();
00109 };
00110 
00111 
00112 
00113 #endif /* MARYOLED_H_ */
 全て クラス ファイル 関数 変数 列挙型 列挙型の値 マクロ定義