Library to drive DogM16x text displays
DogM16x.h
- Committer:
- FrankWeissenborn
- Date:
- 2011-01-12
- Revision:
- 0:c8d5f35830ce
- Child:
- 1:7557380ce11e
File content as of revision 0:c8d5f35830ce:
#ifndef __DOGM16X_H #define __DOGM16X_H #include "defines.h" #include "mbed.h" typedef enum DogM16x_LINE { DogM16x_LINE_ONE = 0, /*!< Line 1 */ DogM16x_LINE_TWO = 1, /*!< Line 2 */ DogM16x_LINE_THREE = 2, /*!< Line 3; if exist */ } DogM16x_LINE; typedef enum DogM16x_TYPE { DogM16x_DogM161 = 0, /*!< Line 1 */ DogM16x_DogM162 = 1, /*!< Line 2 */ DogM16x_DogM163 = 2, /*!< Line 3; if exist */ } DogM16x_TYPE; class DogM16x { public: DogM16x(PinName db0, PinName db1, PinName db2, PinName db3, PinName rw, PinName rs, PinName enable, PinName reset, DogM16x_TYPE); void Clear(); void SetPosition(unsigned char x, DogM16x_LINE line); void WriteCharacter(char character); void WriteCharacter(char character, unsigned char x, DogM16x_LINE line); void WriteString(char* string); void WriteString(char* string, unsigned char x, DogM16x_LINE line); private: BusOut _d; DigitalOut _rw; DigitalOut _rs; DigitalOut _enable; DigitalOut _reset; DogM16x_TYPE _type; void Init(); void WriteCommandByte(int cmd); void WriteDataByte(int cmd); void SetData(int data); }; #endif