Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of GT20L16J1Y_font by
GT20L16J1Y_font.h@1:cacab63ea210, 2014-04-20 (annotated)
- Committer:
- MACRUM
- Date:
- Sun Apr 20 05:36:32 2014 +0000
- Revision:
- 1:cacab63ea210
- Parent:
- 0:61b32e34bcbf
- Child:
- 2:aed20a7685b9
Update API document
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MACRUM | 0:61b32e34bcbf | 1 | #include "mbed.h" |
| MACRUM | 1:cacab63ea210 | 2 | /** |
| MACRUM | 1:cacab63ea210 | 3 | * GT20L16J1Y font ROM access class |
| MACRUM | 1:cacab63ea210 | 4 | */ |
| MACRUM | 0:61b32e34bcbf | 5 | class GT20L16J1Y_FONT { |
| MACRUM | 0:61b32e34bcbf | 6 | public: |
| MACRUM | 1:cacab63ea210 | 7 | /** Default constructor |
| MACRUM | 1:cacab63ea210 | 8 | */ |
| MACRUM | 0:61b32e34bcbf | 9 | GT20L16J1Y_FONT(); |
| MACRUM | 1:cacab63ea210 | 10 | |
| MACRUM | 1:cacab63ea210 | 11 | /** Destructor |
| MACRUM | 1:cacab63ea210 | 12 | */ |
| MACRUM | 0:61b32e34bcbf | 13 | virtual ~GT20L16J1Y_FONT() {}; |
| MACRUM | 0:61b32e34bcbf | 14 | |
| MACRUM | 0:61b32e34bcbf | 15 | /** Create a GT20L16J1Y font ROM connected to the specified pins |
| MACRUM | 0:61b32e34bcbf | 16 | * |
| MACRUM | 0:61b32e34bcbf | 17 | * @param mosi Serial data output pin to connect to |
| MACRUM | 0:61b32e34bcbf | 18 | * @param moso Serial data input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 19 | * @param sclk Serial clock input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 20 | * @param cs Chip enable input pin to connect to |
| MACRUM | 0:61b32e34bcbf | 21 | */ |
| MACRUM | 0:61b32e34bcbf | 22 | GT20L16J1Y_FONT(PinName mosi, PinName miso, PinName sclk, PinName cs) : _spi(mosi, miso, sclk), _CS(cs) {}; |
| MACRUM | 0:61b32e34bcbf | 23 | |
| MACRUM | 0:61b32e34bcbf | 24 | /** Read font data from SJIS code |
| MACRUM | 0:61b32e34bcbf | 25 | * |
| MACRUM | 0:61b32e34bcbf | 26 | * @param code Japanese Kanji font code (Shift JIS code) |
| MACRUM | 0:61b32e34bcbf | 27 | */ |
| MACRUM | 0:61b32e34bcbf | 28 | void read(unsigned short code); |
| MACRUM | 0:61b32e34bcbf | 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 | }; |
