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.
LCDGraphics.h
00001 00002 /** 00003 Author : Roqyun KO 00004 Electronics / Computer Science - Embedded System (EISE) 00005 EISE 4 - Industrial Project 1. 00006 Polytech Paris Sorbonne 00007 00008 Library related to the graphics. 00009 **/ 00010 00011 #ifndef _CITRON_MERANGUE_LCDGRAPHICS_H 00012 #define _CITRON_MERANGUE_LCDGRAPHICS_H 00013 00014 #include <stdint.h> 00015 00016 00017 #define A_CIRCONFLEX_MAJ 129 00018 #define A_CIRCONFLEX_MIN 130 00019 #define A_GRAVE_MAJ 131 00020 #define A_GRAVE_MIN 132 00021 #define AE_MAJ 133 00022 #define AE_MIN 134 00023 #define CEDILE_MAJ 135 00024 #define CEDILE_MIN 136 00025 #define E_GRAVE_MAJ 137 00026 #define E_GRAVE_MIN 138 00027 #define E_AIGU_MAJ 139 00028 #define E_AIGU_MIN 140 00029 #define E_CIRCONFLEX_MAJ 141 00030 #define E_CIRCONFLEX_MIN 142 00031 #define E_TREMA_MAJ 143 00032 #define E_TREMA_MIN 144 00033 #define I_CIRCONFLEX_MAJ 145 00034 #define I_CIRCONFLEX_MIN 146 00035 #define I_TREMA_MAJ 147 00036 #define I_TREMA_MIN 148 00037 #define O_CIRCONFLEX_MIN 149 00038 #define O_TREMA_MIN 150 00039 #define U_CIRCONFLEX_MIN 151 00040 #define U_CIRCONFLEX_MAJ 152 00041 #define U_GRAVE_MAJ 153 00042 #define U_GRAVE_MIN 154 00043 #define U_TREMA_MIN 155 00044 #define O_CIRCONFLEX_MAJ 156 00045 #define O_TREMA_MAJ 157 00046 #define U_TREMA_MAJ 158 00047 #define DEGREE 159 00048 #define EURO 160 00049 00050 #define FONT_SIZE_64_48 00051 00052 #ifdef FONT_SIZE_64_48 00053 #define FONT_WIDTH 48 00054 #define FONT_HEIGHT 64 00055 #endif 00056 00057 class LCDGraphics 00058 { 00059 00060 public: 00061 LCDGraphics(); 00062 LCDGraphics(uint16_t width, uint16_t height, uint8_t page); 00063 void setPixel(uint16_t x,uint16_t y, uint8_t color); 00064 void setFontSize(float size); // parameter size takes in a value between 0.1f ~ 1.0f (10 ~ 100%). 100% font size is 48x48. 00065 void setFontSpacing(int8_t spacing); // Set horizontal spacing between each character. 00066 void write(char c, uint8_t x, uint8_t y); 00067 void print(const char *str, const uint8_t *pchEx = (uint8_t*)0, int numEx = 0); 00068 //void append(const char *str, uint8_t *pchEx = (uint8_t*)0, int numEx = 0); not supported yet. 00069 private : 00070 const uint8_t* index_of_char(uint8_t c); 00071 uint8_t *chBuffer; 00072 float sizeFont; 00073 uint8_t fontWidth; 00074 uint8_t fontHeight; 00075 int8_t spacing; 00076 protected : 00077 uint16_t width; 00078 uint16_t height; 00079 uint16_t page; 00080 uint16_t com_per_page; 00081 uint8_t **screen; 00082 00083 }; 00084 #endif
Generated on Wed Aug 17 2022 05:29:14 by
1.7.2