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.
Dependencies: mbed-STM32F103C8T6 mbed
epd.h
00001 #ifndef EPD_H 00002 #define EPD_H 00003 00004 // Display resolution 00005 #define EPD_WIDTH 128 00006 #define EPD_HEIGHT 296 00007 00008 // EPD2IN9 commands 00009 #define DRIVER_OUTPUT_CONTROL 0x01 00010 #define BOOSTER_SOFT_START_CONTROL 0x0C 00011 #define GATE_SCAN_START_POSITION 0x0F 00012 #define DEEP_SLEEP_MODE 0x10 00013 #define DATA_ENTRY_MODE_SETTING 0x11 00014 #define SW_RESET 0x12 00015 #define TEMPERATURE_SENSOR_CONTROL 0x1A 00016 #define MASTER_ACTIVATION 0x20 00017 #define DISPLAY_UPDATE_CONTROL_1 0x21 00018 #define DISPLAY_UPDATE_CONTROL_2 0x22 00019 #define WRITE_RAM 0x24 00020 #define WRITE_VCOM_REGISTER 0x2C 00021 #define WRITE_LUT_REGISTER 0x32 00022 #define SET_DUMMY_LINE_PERIOD 0x3A 00023 #define SET_GATE_TIME 0x3B 00024 #define BORDER_WAVEFORM_CONTROL 0x3C 00025 #define SET_RAM_X_ADDRESS_START_END_POSITION 0x44 00026 #define SET_RAM_Y_ADDRESS_START_END_POSITION 0x45 00027 #define SET_RAM_X_ADDRESS_COUNTER 0x4E 00028 #define SET_RAM_Y_ADDRESS_COUNTER 0x4F 00029 #define TERMINATE_FRAME_READ_WRITE 0xFF 00030 00031 #define BACKGROUND_BLACK 0x00 00032 #define BACKGROUND_WHITE 0xFF 00033 00034 const unsigned char lut_full_update[] = 00035 { 00036 0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 00037 0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 00038 0x00, 0x00, 0x00, 0x00, 0xF8, 0xB4, 0x13, 0x51, 00039 0x35, 0x51, 0x51, 0x19, 0x01, 0x00 00040 }; 00041 00042 const unsigned char lut_partial_update[] = 00043 { 00044 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 00045 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00046 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 00047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 00048 }; 00049 00050 /*static unsigned char lut_full_update[] = {0x32,0x02,0x02,0x01,0x11,0x12,0x12,0x22,0x22,0x66,0x69,0x69,0x59,0x58,0x99,0x99,0x88,0x00,0x00,0x00 00051 ,0x00,0xF8,0xB4,0x13,0x51,0x35,0x51,0x51,0x19,0x01,0x00}; 00052 static unsigned char lut_partial_update[] = {0x32,0x10,0x18,0x18,0x08,0x18,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 00053 ,0x00,0x13,0x14,0x44,0x12,0x00,0x00,0x00,0x00,0x00,0x00};*/ 00054 00055 const unsigned char FONT8x8[97][8] = { 00056 0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00, // columns, rows, num_bytes_per_char 00057 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // space 0x20 00058 0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00, // ! 00059 0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00, // " 00060 0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00, // # 00061 0x18,0x3E,0x60,0x3C,0x06,0x7C,0x18,0x00, // $ 00062 0x00,0x63,0x66,0x0C,0x18,0x33,0x63,0x00, // % 00063 0x1C,0x36,0x1C,0x3B,0x6E,0x66,0x3B,0x00, // & 00064 0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00, // ' 00065 0x0C,0x18,0x30,0x30,0x30,0x18,0x0C,0x00, // ( 00066 0x30,0x18,0x0C,0x0C,0x0C,0x18,0x30,0x00, // ) 00067 0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00, // * 00068 0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00, // + 00069 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30, // , 00070 0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00, // - 00071 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, // . 00072 0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00, // / (forward slash) 00073 0x3E,0x63,0x63,0x6B,0x63,0x63,0x3E,0x00, // 0 0x30 00074 0x18,0x38,0x58,0x18,0x18,0x18,0x7E,0x00, // 1 00075 0x3C,0x66,0x06,0x1C,0x30,0x66,0x7E,0x00, // 2 00076 0x3C,0x66,0x06,0x1C,0x06,0x66,0x3C,0x00, // 3 00077 0x0E,0x1E,0x36,0x66,0x7F,0x06,0x0F,0x00, // 4 00078 0x7E,0x60,0x7C,0x06,0x06,0x66,0x3C,0x00, // 5 00079 0x1C,0x30,0x60,0x7C,0x66,0x66,0x3C,0x00, // 6 00080 0x7E,0x66,0x06,0x0C,0x18,0x18,0x18,0x00, // 7 00081 0x3C,0x66,0x66,0x3C,0x66,0x66,0x3C,0x00, // 8 00082 0x3C,0x66,0x66,0x3E,0x06,0x0C,0x38,0x00, // 9 00083 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00, // : 00084 0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30, // ; 00085 0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00, // < 00086 0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00, // = 00087 0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00, // > 00088 0x3C,0x66,0x06,0x0C,0x18,0x00,0x18,0x00, // ? 00089 0x3E,0x63,0x6F,0x69,0x6F,0x60,0x3E,0x00, // @ 0x40 00090 0x18,0x3C,0x66,0x66,0x7E,0x66,0x66,0x00, // A 00091 0x7E,0x33,0x33,0x3E,0x33,0x33,0x7E,0x00, // B 00092 0x1E,0x33,0x60,0x60,0x60,0x33,0x1E,0x00, // C 00093 0x7C,0x36,0x33,0x33,0x33,0x36,0x7C,0x00, // D 00094 0x7F,0x31,0x34,0x3C,0x34,0x31,0x7F,0x00, // E 00095 0x7F,0x31,0x34,0x3C,0x34,0x30,0x78,0x00, // F 00096 0x1E,0x33,0x60,0x60,0x67,0x33,0x1F,0x00, // G 00097 0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00, // H 00098 0x3C,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // I 00099 0x0F,0x06,0x06,0x06,0x66,0x66,0x3C,0x00, // J 00100 0x73,0x33,0x36,0x3C,0x36,0x33,0x73,0x00, // K 00101 0x78,0x30,0x30,0x30,0x31,0x33,0x7F,0x00, // L 00102 0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00, // M 00103 0x63,0x73,0x7B,0x6F,0x67,0x63,0x63,0x00, // N 00104 0x3E,0x63,0x63,0x63,0x63,0x63,0x3E,0x00, // O 00105 0x7E,0x33,0x33,0x3E,0x30,0x30,0x78,0x00, // P 0x50 00106 0x3C,0x66,0x66,0x66,0x6E,0x3C,0x0E,0x00, // Q 00107 0x7E,0x33,0x33,0x3E,0x36,0x33,0x73,0x00, // R 00108 0x3C,0x66,0x30,0x18,0x0C,0x66,0x3C,0x00, // S 00109 0x7E,0x5A,0x18,0x18,0x18,0x18,0x3C,0x00, // T 00110 0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x00, // U 00111 0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00, // V 00112 0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00, // W 00113 0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00, // X 00114 0x66,0x66,0x66,0x3C,0x18,0x18,0x3C,0x00, // Y 00115 0x7F,0x63,0x46,0x0C,0x19,0x33,0x7F,0x00, // Z 00116 0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00, // [ 00117 0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00, // \ (back slash) 00118 0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00, // ] 00119 0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00, // ^ 00120 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, // _ 00121 0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00, // ` 0x60 00122 0x00,0x00,0x3C,0x06,0x3E,0x66,0x3B,0x00, // a 00123 0x70,0x30,0x3E,0x33,0x33,0x33,0x6E,0x00, // b 00124 0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x00, // c 00125 0x0E,0x06,0x3E,0x66,0x66,0x66,0x3B,0x00, // d 00126 0x00,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00, // e 00127 0x1C,0x36,0x30,0x78,0x30,0x30,0x78,0x00, // f 00128 0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x7C, // g 00129 0x70,0x30,0x36,0x3B,0x33,0x33,0x73,0x00, // h 00130 0x18,0x00,0x38,0x18,0x18,0x18,0x3C,0x00, // i 00131 0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3C, // j 00132 0x70,0x30,0x33,0x36,0x3C,0x36,0x73,0x00, // k 00133 0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00, // l 00134 0x00,0x00,0x66,0x7F,0x7F,0x6B,0x63,0x00, // m 00135 0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x00, // n 00136 0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x00, // o 00137 0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78, // p 00138 0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F, // q 00139 0x00,0x00,0x6E,0x3B,0x33,0x30,0x78,0x00, // r 00140 0x00,0x00,0x3E,0x60,0x3C,0x06,0x7C,0x00, // s 00141 0x08,0x18,0x3E,0x18,0x18,0x1A,0x0C,0x00, // t 00142 0x00,0x00,0x66,0x66,0x66,0x66,0x3B,0x00, // u 00143 0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x00, // v 00144 0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00, // w 00145 0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00, // x 00146 0x00,0x00,0x66,0x66,0x66,0x3E,0x06,0x7C, // y 00147 0x00,0x00,0x7E,0x4C,0x18,0x32,0x7E,0x00, // z 00148 0x0E,0x18,0x18,0x70,0x18,0x18,0x0E,0x00, // { 00149 0x0C,0x0C,0x0C,0x00,0x0C,0x0C,0x0C,0x00, // | 00150 0x70,0x18,0x18,0x0E,0x18,0x18,0x70,0x00, // } 00151 0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00, // ~ 00152 0x1C,0x36,0x36,0x1C,0x00,0x00,0x00,0x00}; // DEL 00153 00154 unsigned char img[EPD_WIDTH][EPD_HEIGHT]; 00155 00156 #endif /* EPD2IN9_H */
Generated on Wed Jul 13 2022 21:41:22 by
1.7.2