Add support JIS X 0201.

Fork of GT20L16J1Y_font by Toyomasa Watarai

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GT20L16J1Y_font.h Source File

GT20L16J1Y_font.h

00001 #include "mbed.h"
00002 
00003 class GT20L16J1Y_FONT {
00004   public:
00005     GT20L16J1Y_FONT();
00006     virtual ~GT20L16J1Y_FONT() {};
00007     
00008     /** Create a GT20L16J1Y font ROM connected to the specified pins
00009      *
00010      *  @param mosi Serial data output pin to connect to
00011      *  @param moso Serial data input pin to connect to
00012      *  @param sclk Serial clock input pin to connect to
00013      *  @param cs Chip enable input pin to connect to
00014      */
00015     GT20L16J1Y_FONT(PinName mosi, PinName miso, PinName sclk, PinName cs);
00016 
00017     /** Read font data from SJIS code
00018      *
00019      *  @param code Japanese Kanji font code (Shift JIS code)
00020      *  @return font width (8 or 16)
00021      */
00022     int read(unsigned short code);
00023     
00024     /** Read font data from Ku-Ten code
00025      *
00026      *  @param code Japanese Kanji font code (Kuten code [15:8] Ku, [7:0] Ten)
00027      *  @return font width (8 or 16)
00028      */
00029     int read_kuten(unsigned short code);
00030 
00031     /** Read font data from ROM address
00032      *
00033      *  @param address Japanese Kanji font ROM Address
00034      */
00035     void read_direct(unsigned long address);
00036 
00037     unsigned char bitmap[32];
00038 
00039   private:
00040     SPI _spi;
00041     DigitalOut _CS;
00042 };