Draw the character of the ASCII code.

Dependents:   mbed-os_Watson-IoT_ZXing_sample mbed-os_Watson-IoT_ZXing_sample MovPlayer GR-PEACH_HVC-P2_sample_client ... more

Fork of AsciiFont by Daiki Kato

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ascii.c Source File

ascii.c

00001 /*******************************************************************************
00002 * DISCLAIMER
00003 * This software is supplied by Renesas Electronics Corporation and is only
00004 * intended for use with Renesas products. No other uses are authorized. This
00005 * software is owned by Renesas Electronics Corporation and is protected under
00006 * all applicable laws, including copyright laws.
00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
00016 * Renesas reserves the right, without notice, to make changes to this software
00017 * and to discontinue the availability of this software. By using this software,
00018 * you agree to the additional terms and conditions found by accessing the
00019 * following link:
00020 * http://www.renesas.com/disclaimer
00021 *
00022 * Copyright (C) 2014 Renesas Electronics Corporation. All rights reserved.
00023 *******************************************************************************/
00024 /*******************************************************************************
00025 * File Name     : ascii.c
00026 * Device(s)     : RZ/A1H (R7S721001)
00027 * Tool-Chain    : GNUARM-NONEv14.02-EABI
00028 * H/W Platform  : RSK+RZA1H CPU Board
00029 * Description   : Defines ascii font table
00030 *******************************************************************************/
00031 /*******************************************************************************
00032 * History       : DD.MM.YYYY Version Description
00033 *               : 21.10.2014 1.00
00034 *******************************************************************************/
00035 
00036 /*******************************************************************************
00037 * User Includes (Project Level Includes)
00038 *******************************************************************************/
00039 /* ASCII header */
00040 #include "ascii.h"
00041 
00042 /*******************************************************************************
00043 * Global Tables
00044 *******************************************************************************/
00045 /* Bytes after this pre-processor are 1-byte aligned */
00046 #pragma pack(1)
00047 
00048 const char g_ascii_table[][6] =
00049 {
00050   { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},      /* ' '*/
00051   { 0x00, 0x00, 0x79, 0x00, 0x00, 0x00},      /* ! */
00052   { 0x00, 0x70, 0x00, 0x70, 0x00, 0x00},      /* " */
00053   { 0x22, 0x7F, 0x22, 0x7F, 0x22, 0x00},      /* # */
00054   { 0x12, 0x2A, 0x7F, 0x2A, 0x24, 0x00},      /* $ */
00055   { 0x62, 0x64, 0x08, 0x13, 0x23, 0x00},      /* % */
00056   { 0x36, 0x49, 0x55, 0x22, 0x05, 0x00},      /* & */
00057   { 0x00, 0x00, 0x60, 0x00, 0x00, 0x00},      /* ' */
00058   { 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00},      /* ( */
00059   { 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00},      /* ) */
00060   { 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00},      /* * */
00061   { 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00},      /* + */
00062   { 0x00, 0x05, 0x06, 0x00, 0x00, 0x00},      /* , */
00063   { 0x08, 0x08, 0x08, 0x08, 0x08, 0x00},      /* - */
00064   { 0x00, 0x03, 0x03, 0x00, 0x00, 0x00},      /* . */
00065   { 0x02, 0x04, 0x08, 0x10, 0x20, 0x00},      /* / */
00066   { 0x3E, 0x45, 0x49, 0x51, 0x3E, 0x00},      /* 0 */
00067   { 0x00, 0x21, 0x7F, 0x01, 0x00, 0x00},      /* 1 */
00068   { 0x21, 0x43, 0x45, 0x49, 0x71, 0x00},      /* 2 */
00069   { 0x42, 0x41, 0x51, 0x69, 0x46, 0x00},      /* 3 */
00070   { 0x0C, 0x14, 0x24, 0x7F, 0x04, 0x00},      /* 4 */
00071   { 0x72, 0x51, 0x51, 0x51, 0x4E, 0x00},      /* 5 */
00072   { 0x1E, 0x29, 0x49, 0x49, 0x06, 0x00},      /* 6 */
00073   { 0x40, 0x47, 0x48, 0x50, 0x60, 0x00},      /* 7 */
00074   { 0x36, 0x49, 0x49, 0x49, 0x36, 0x00},      /* 8 */
00075   { 0x30, 0x49, 0x49, 0x4A, 0x3C, 0x00},      /* 9 */
00076   { 0x00, 0x66, 0x66, 0x00, 0x00, 0x00},      /* : */
00077   { 0x00, 0x35, 0x36, 0x00, 0x00, 0x00},      /* ; */
00078   { 0x08, 0x14, 0x22, 0x41, 0x00, 0x00},      /* < */
00079   { 0x14, 0x14, 0x14, 0x14, 0x14, 0x00},      /* = */
00080   { 0x00, 0x41, 0x22, 0x14, 0x08, 0x00},      /* > */
00081   { 0x20, 0x40, 0x45, 0x48, 0x30, 0x00},      /* ? */
00082   { 0x38, 0x45, 0x5D, 0x59, 0x3E, 0x00},      /* @ */
00083   { 0x1F, 0x24, 0x44, 0x24, 0x1F, 0x00},      /* A */
00084   { 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00},      /* B */
00085   { 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00},      /* C */
00086   { 0x7F, 0x41, 0x41, 0x22, 0x1C, 0x00},      /* D */
00087   { 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00},      /* E */
00088   { 0x7F, 0x48, 0x48, 0x48, 0x40, 0x00},      /* F */
00089   { 0x3E, 0x41, 0x49, 0x49, 0x2F, 0x00},      /* G */
00090   { 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00},      /* H */
00091   { 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00},      /* I */
00092   { 0x02, 0x01, 0x41, 0x7E, 0x40, 0x00},      /* J */
00093   { 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00},      /* K */
00094   { 0x7F, 0x01, 0x01, 0x01, 0x01, 0x00},      /* L */
00095   { 0x7F, 0x20, 0x18, 0x20, 0x7F, 0x00},      /* M */
00096   { 0x7F, 0x10, 0x08, 0x04, 0x7F, 0x00},      /* N */
00097   { 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00},      /* O */
00098   { 0x7F, 0x48, 0x48, 0x48, 0x30, 0x00},      /* P */
00099   { 0x3E, 0x41, 0x45, 0x42, 0x3D, 0x00},      /* Q */
00100   { 0x7F, 0x48, 0x4C, 0x4A, 0x31, 0x00},      /* R */
00101   { 0x32, 0x49, 0x49, 0x49, 0x26, 0x00},      /* S */
00102   { 0x40, 0x40, 0x7F, 0x40, 0x40, 0x00},      /* T */
00103   { 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x00},      /* U */
00104   { 0x7C, 0x02, 0x01, 0x02, 0x7C, 0x00},      /* V */
00105   { 0x7E, 0x01, 0x0E, 0x01, 0x7E, 0x00},      /* W */
00106   { 0x63, 0x14, 0x08, 0x14, 0x63, 0x00},      /* X */
00107   { 0x70, 0x08, 0x07, 0x08, 0x70, 0x00},      /* Y */
00108   { 0x43, 0x45, 0x49, 0x51, 0x61, 0x00},      /* Z */
00109   { 0x00, 0x7F, 0x41, 0x00, 0x00, 0x00},      /* [ */
00110   { 0x20, 0x10, 0x08, 0x04, 0x02, 0x00},      /* "\" */
00111   { 0x00, 0x00, 0x41, 0x7F, 0x00, 0x00},      /* ] */
00112   { 0x00, 0x20, 0x40, 0x20, 0x00, 0x00},      /* ^ */
00113   { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00},      /* _ */
00114   { 0x00, 0x40, 0x20, 0x00, 0x00, 0x00},      /* ' */
00115   { 0x02, 0x15, 0x15, 0x0F, 0x01, 0x00},      /* a */
00116   { 0x00, 0x7F, 0x11, 0x11, 0x0E, 0x00},      /* b */
00117   { 0x00, 0x0E, 0x11, 0x11, 0x11, 0x00},      /* c */
00118   { 0x0E, 0x11, 0x11, 0x7F, 0x00, 0x00},      /* d */
00119   { 0x0E, 0x15, 0x15, 0x15, 0x0C, 0x00},      /* e */
00120   { 0x00, 0x10, 0x3F, 0x50, 0x50, 0x00},      /* f */
00121   { 0x08, 0x15, 0x15, 0x15, 0x1E, 0x00},      /* g */
00122   { 0x00, 0x7F, 0x10, 0x10, 0x0F, 0x00},      /* h */
00123   { 0x00, 0x11, 0x5F, 0x01, 0x00, 0x00},      /* i */
00124   { 0x02, 0x01, 0x01, 0x5E, 0x00, 0x00},      /* j */
00125   { 0x00, 0x7F, 0x04, 0x0A, 0x11, 0x00},      /* k */
00126   { 0x00, 0x41, 0x7F, 0x01, 0x00, 0x00},      /* l */
00127   { 0x1F, 0x10, 0x0F, 0x10, 0x0F, 0x00},      /* m */
00128   { 0x00, 0x1F, 0x10, 0x10, 0x0F, 0x00},      /* n */
00129   { 0x0E, 0x11, 0x11, 0x11, 0x0E, 0x00},      /* 0 */
00130   { 0x1F, 0x14, 0x14, 0x14, 0x08, 0x00},      /* p */
00131   { 0x08, 0x14, 0x14, 0x14, 0x1F, 0x00},      /* q */
00132   { 0x00, 0x1F, 0x08, 0x10, 0x10, 0x00},      /* r */
00133   { 0x09, 0x15, 0x15, 0x15, 0x12, 0x00},      /* s */
00134   { 0x00, 0x10, 0x7E, 0x11, 0x01, 0x00},      /* t */
00135   { 0x00, 0x1E, 0x01, 0x01, 0x1F, 0x00},      /* u */
00136   { 0x1C, 0x02, 0x01, 0x02, 0x1C, 0x00},      /* v */
00137   { 0x1E, 0x01, 0x06, 0x01, 0x1E, 0x00},      /* w */
00138   { 0x11, 0x0A, 0x04, 0x0A, 0x11, 0x00},      /* x */
00139   { 0x18, 0x05, 0x05, 0x1E, 0x00, 0x00},      /* y */
00140   { 0x11, 0x13, 0x15, 0x19, 0x11, 0x00},      /* z */
00141   { 0x00, 0x08, 0x36, 0x41, 0x00, 0x00},      /* { */
00142   { 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00},      /* | */
00143   { 0x00, 0x41, 0x36, 0x08, 0x00, 0x00},      /* } */
00144   { 0x00, 0x20, 0x40, 0x20, 0x40, 0x00}       /* ~ */
00145   };
00146 
00147 /* Bytes after this pre-processor are 4-byte aligned */
00148 #pragma pack(4)
00149