GT20L16J1Y 16x16 Japanese font ROM access library
Dependents: UTF-8_test hello_GT20L16J1Y_FONT GSDPlayer Nucleo_AQM1248A ... more
Diff: GT20L16J1Y_font.h
- Revision:
- 0:61b32e34bcbf
- Child:
- 1:cacab63ea210
diff -r 000000000000 -r 61b32e34bcbf GT20L16J1Y_font.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GT20L16J1Y_font.h Tue Jan 14 07:36:32 2014 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + +class GT20L16J1Y_FONT { + public: + GT20L16J1Y_FONT(); + virtual ~GT20L16J1Y_FONT() {}; + + /** Create a GT20L16J1Y font ROM connected to the specified pins + * + * @param mosi Serial data output pin to connect to + * @param moso Serial data input pin to connect to + * @param sclk Serial clock input pin to connect to + * @param cs Chip enable input pin to connect to + */ + GT20L16J1Y_FONT(PinName mosi, PinName miso, PinName sclk, PinName cs) : _spi(mosi, miso, sclk), _CS(cs) {}; + + /** Read font data from SJIS code + * + * @param code Japanese Kanji font code (Shift JIS code) + */ + void read(unsigned short code); + + unsigned char bitmap[32]; + + private: + SPI _spi; + DigitalOut _CS; +};