Add support JIS X 0201.
Fork of GT20L16J1Y_font by
GT20L16J1Y_font.h@2:aed20a7685b9, 2014-09-04 (annotated)
- Committer:
- MACRUM
- Date:
- Thu Sep 04 06:54:40 2014 +0000
- Revision:
- 2:aed20a7685b9
- Parent:
- 1:cacab63ea210
- Child:
- 3:48c4a173bdab
Added read_kuten() function to support kuten code
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MACRUM | 0:61b32e34bcbf | 1 | #include "mbed.h" |
| MACRUM | 2:aed20a7685b9 | 2 | |
| MACRUM | 0:61b32e34bcbf | 3 | class GT20L16J1Y_FONT { |
| MACRUM | 0:61b32e34bcbf | 4 | public: |
| MACRUM | 0:61b32e34bcbf | 5 | GT20L16J1Y_FONT(); |
| MACRUM | 0:61b32e34bcbf | 6 | virtual ~GT20L16J1Y_FONT() {}; |
| MACRUM | 0:61b32e34bcbf | 7 | |
| MACRUM | 0:61b32e34bcbf | 8 | /** Create a GT20L16J1Y font ROM connected to the specified pins |
| MACRUM | 0:61b32e34bcbf | 9 | * |
| MACRUM | 0:61b32e34bcbf | 10 | * @param mosi Serial data output pin to connect to |
| MACRUM | 0:61b32e34bcbf | 11 | * @param moso Serial data input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 12 | * @param sclk Serial clock input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 13 | * @param cs Chip enable input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 14 | */ |
| MACRUM | 2:aed20a7685b9 | 15 | GT20L16J1Y_FONT(PinName mosi, PinName miso, PinName sclk, PinName cs); |
| MACRUM | 0:61b32e34bcbf | 16 | |
| MACRUM | 0:61b32e34bcbf | 17 | /** Read font data from SJIS code |
| MACRUM | 0:61b32e34bcbf | 18 | * |
| MACRUM | 0:61b32e34bcbf | 19 | * @param code Japanese Kanji font code (Shift JIS code) |
| MACRUM | 0:61b32e34bcbf | 20 | */ |
| MACRUM | 0:61b32e34bcbf | 21 | void read(unsigned short code); |
| MACRUM | 0:61b32e34bcbf | 22 | |
| MACRUM | 2:aed20a7685b9 | 23 | /** Read font data from Ku-Ten code |
| MACRUM | 2:aed20a7685b9 | 24 | * |
| MACRUM | 2:aed20a7685b9 | 25 | * @param code Japanese Kanji font code (Kuten code [15:8] Ku, [7:0] Ten) |
| MACRUM | 2:aed20a7685b9 | 26 | * @return font width (8 or 16) |
| MACRUM | 2:aed20a7685b9 | 27 | */ |
| MACRUM | 2:aed20a7685b9 | 28 | int read_kuten(unsigned short code); |
| MACRUM | 2:aed20a7685b9 | 29 | |
| MACRUM | 0:61b32e34bcbf | 30 | unsigned char bitmap[32]; |
| MACRUM | 0:61b32e34bcbf | 31 | |
| MACRUM | 0:61b32e34bcbf | 32 | private: |
| MACRUM | 0:61b32e34bcbf | 33 | SPI _spi; |
| MACRUM | 0:61b32e34bcbf | 34 | DigitalOut _CS; |
| MACRUM | 0:61b32e34bcbf | 35 | }; |
ban4jp -
