C12832 LCD kanji interface.
Fork of GraphicOLED by
- 8×8 ドット日本語フォント「美咲フォント」
- misaki2cpp.py 美咲フォントをC++コードへ変換。
- app-board-LCD
GraphicOLED.h
- Committer:
- va009039
- Date:
- 2012-04-18
- Revision:
- 1:a104653979bf
- Parent:
- 0:67d983a1ed3e
- Child:
- 2:337a2655f815
File content as of revision 1:a104653979bf:
// GraphicOLED.h #ifndef MBED_GRAPHIC_OLED_H #define MBED_GRAPHIC_OLED_H #include "TextLCD.h" #define iskanji(c) ((c)>=0x81 && (c)<=0x9F || (c)>=0xE0 && (c)<=0xFC) #define iskanji2(c) ((c)>=0x40 && (c)<=0xFC && (c)!=0x7F) /** GraphicOLED interface for WS0010 * * Currently support shift-jis KANJI(misaki font) * * @code * #include "mbed.h" * #include "GraphicOLED.h" * * GraphicOLED oled(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 * * int main() { * oled.printf("Hello World!\n"); * } * @endcode */ class GraphicOLED : public TextLCD { public: /** Create a GraphicOLED interface * * @param rs Instruction/data control line * @param e Enable line (clock) * @param d4-d7 Data lines for using as a 4-bit interface */ GraphicOLED(PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7); void cls(); int columns(); protected: void g_wrtie(int pat, int x, int y); void g_wrtie(char *buf, int len, int x, int y); virtual int _putc(int value); void character(int column, int row, int c); void character2(int column, int row, int c); bool _kanji_flag; int _kanji_1st; }; #endif