From da1e35007aa80aa96b322f61fa0364484449bfa3 Mon Sep 17 00:00:00 2001 From: Vilem Zavodny Date: Thu, 11 Jan 2024 10:17:23 +0100 Subject: [PATCH] lcd: Remove deprecated lcd driver SSD1306 --- .github/workflows/upload_component.yml | 2 +- components/ssd1306/CMakeLists.txt | 5 - components/ssd1306/README.md | 3 - components/ssd1306/idf_component.yml | 5 - components/ssd1306/include/ssd1306.h | 190 ------ components/ssd1306/include/ssd1306_fonts.h | 24 - components/ssd1306/license.txt | 202 ------ components/ssd1306/ssd1306.c | 364 ----------- components/ssd1306/ssd1306_fonts.c | 682 --------------------- test_app/CMakeLists.txt | 2 +- 10 files changed, 2 insertions(+), 1477 deletions(-) delete mode 100644 components/ssd1306/CMakeLists.txt delete mode 100644 components/ssd1306/README.md delete mode 100644 components/ssd1306/idf_component.yml delete mode 100644 components/ssd1306/include/ssd1306.h delete mode 100644 components/ssd1306/include/ssd1306_fonts.h delete mode 100644 components/ssd1306/license.txt delete mode 100644 components/ssd1306/ssd1306.c delete mode 100644 components/ssd1306/ssd1306_fonts.c diff --git a/.github/workflows/upload_component.yml b/.github/workflows/upload_component.yml index e9cbdf9b..0ff5e419 100644 --- a/.github/workflows/upload_component.yml +++ b/.github/workflows/upload_component.yml @@ -18,7 +18,7 @@ jobs: with: directories: > bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1; - components/bh1750;components/ds18b20;components/es8311;components/es7210;components/fbm320;components/hts221;components/mag3110;components/mpu6050;components/ssd1306;components/esp_lvgl_port;components/icm42670; + components/bh1750;components/ds18b20;components/es8311;components/es7210;components/fbm320;components/hts221;components/mag3110;components/mpu6050;components/esp_lvgl_port;components/icm42670; components/lcd_touch/esp_lcd_touch;components/lcd_touch/esp_lcd_touch_ft5x06;components/lcd_touch/esp_lcd_touch_gt911;components/lcd_touch/esp_lcd_touch_tt21100;components/lcd_touch/esp_lcd_touch_gt1151;components/lcd_touch/esp_lcd_touch_cst816s; components/lcd/esp_lcd_gc9a01;components/lcd/esp_lcd_ili9341;components/lcd/esp_lcd_ra8875;components/lcd_touch/esp_lcd_touch_stmpe610;components/lcd/esp_lcd_sh1107;components/lcd/esp_lcd_st7796;components/lcd/esp_lcd_gc9503;components/lcd/esp_lcd_ssd1681;components/lcd/esp_lcd_ili9881c; components/io_expander/esp_io_expander;components/io_expander/esp_io_expander_tca9554;components/io_expander/esp_io_expander_tca95xx_16bit;components/io_expander/esp_io_expander_ht8574; diff --git a/components/ssd1306/CMakeLists.txt b/components/ssd1306/CMakeLists.txt deleted file mode 100644 index 764980ec..00000000 --- a/components/ssd1306/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -idf_component_register( - SRCS "ssd1306.c" "ssd1306_fonts.c" - INCLUDE_DIRS "include" - REQUIRES "driver" -) diff --git a/components/ssd1306/README.md b/components/ssd1306/README.md deleted file mode 100644 index c619567a..00000000 --- a/components/ssd1306/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Component: SSD1306 - -**This driver is DEPRECATED. Please use updated SSD1306 driver from [ESP-IDF](https://github.com/espressif/esp-idf/blob/master/components/esp_lcd/include/esp_lcd_panel_ssd1306.h).** diff --git a/components/ssd1306/idf_component.yml b/components/ssd1306/idf_component.yml deleted file mode 100644 index 82b029ed..00000000 --- a/components/ssd1306/idf_component.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: "1.0.5~1" -description: I2C driver for SSD1306 OLED display -url: https://github.com/espressif/esp-bsp/tree/1452b261c778453c32a98fe897b571561db95bb5/components/ssd1306 -dependencies: - idf : ">=4.0" diff --git a/components/ssd1306/include/ssd1306.h b/components/ssd1306/include/ssd1306.h deleted file mode 100644 index 33b4f66d..00000000 --- a/components/ssd1306/include/ssd1306.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @file - * @brief SSD1306 driver - */ - -#pragma once - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "driver/i2c.h" -#include "stdint.h" -#include "ssd1306_fonts.h" - -/** - * @brief I2C address. - */ -#define SSD1306_I2C_ADDRESS ((uint8_t)0x3C) - -#define SSD1306_WIDTH 128 -#define SSD1306_HEIGHT 64 - -typedef void *ssd1306_handle_t; /*handle of ssd1306*/ - -/** - * @brief device initialization - * - * @param dev object handle of ssd1306 - * - * @return - * - ESP_OK Success - * - ESP_FAIL Fail - */ -esp_err_t ssd1306_init(ssd1306_handle_t dev); - -/** - * @brief Create and initialization device object and return a device handle - * - * @param port I2C port object handle - * @param dev_addr I2C device address of device - * - * @return - * - device object handle of ssd1306 - */ -ssd1306_handle_t ssd1306_create(i2c_port_t port, uint16_t dev_addr) -__attribute__((deprecated("This driver is DEPRECATED. Please use updated SSD1306 driver from ESP-IDF."))); - -/** - * @brief Delete and release a device object - * - * @param dev object handle of ssd1306 - */ -void ssd1306_delete(ssd1306_handle_t dev); - -/** - * @brief draw point on (x, y) - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param chPoint fill point - */ -void ssd1306_fill_point(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chPoint); - -/** - * @brief Draw rectangle on (x1,y1)-(x2,y2) - * - * @param dev object handle of ssd1306 - * @param chXpos1 - * @param chYpos1 - * @param chXpos2 - * @param chYpos2 - * @param chDot fill point - */ -void ssd1306_fill_rectangle(ssd1306_handle_t dev, uint8_t chXpos1, uint8_t chYpos1, - uint8_t chXpos2, uint8_t chYpos2, uint8_t chDot); - -/** - * @brief display char on (x, y),and set size, mode - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param chSize char size - * @param chChr draw char - * @param chMode display mode - */ -void ssd1306_draw_char(ssd1306_handle_t dev, uint8_t chXpos, - uint8_t chYpos, uint8_t chChr, uint8_t chSize, uint8_t chMode); - -/** - * @brief display number on (x, y),and set length, size, mode - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param chNum draw num - * @param chLen length - * @param chSize display size - */ -void ssd1306_draw_num(ssd1306_handle_t dev, uint8_t chXpos, - uint8_t chYpos, uint32_t chNum, uint8_t chLen, uint8_t chSize); - -/** - * @brief display 1616char on (x, y) - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param chChar draw char - */ -void ssd1306_draw_1616char(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chChar); - -/** - * @brief display 3216char on (x, y) - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param chChar draw char - */ -void ssd1306_draw_3216char(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chChar); - -/** - * @brief draw bitmap on (x, y),and set width, height - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param pchBmp point to BMP data - * @param chWidth picture width - * @param chHeight picture heght - */ -void ssd1306_draw_bitmap(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - const uint8_t *pchBmp, uint8_t chWidth, uint8_t chHeight); - -/** - * @brief draw line between two specified points - * - * @param dev object handle of ssd1306 - * @param chXpos1 Specifies the X position of the starting point of the line - * @param chYpos1 Specifies the Y position of the starting point of the line - * @param chXpos2 Specifies the X position of the ending point of the line - * @param chYpos2 Specifies the Y position of the ending point of the line - */ -void ssd1306_draw_line(ssd1306_handle_t dev, int16_t chXpos1, int16_t chYpos1, int16_t chXpos2, int16_t chYpos2); - -/** - * @brief refresh dot matrix panel - * - * @param dev object handle of ssd1306 - - * @return - * - ESP_OK Success - * - ESP_FAIL Fail - **/ -esp_err_t ssd1306_refresh_gram(ssd1306_handle_t dev); - -/** - * @brief Clear screen - * - * @param dev object handle of ssd1306 - * @param chFill whether fill and fill char - **/ -void ssd1306_clear_screen(ssd1306_handle_t dev, uint8_t chFill); - -/** - * @brief Displays a string on the screen - * - * @param dev object handle of ssd1306 - * @param chXpos Specifies the X position - * @param chYpos Specifies the Y position - * @param pchString Pointer to a string to display on the screen - * @param chSize char size - * @param chMode display mode - **/ -void ssd1306_draw_string(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - const uint8_t *pchString, uint8_t chSize, uint8_t chMode); - -#ifdef __cplusplus -} -#endif diff --git a/components/ssd1306/include/ssd1306_fonts.h b/components/ssd1306/include/ssd1306_fonts.h deleted file mode 100644 index 0c4c55ff..00000000 --- a/components/ssd1306/include/ssd1306_fonts.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include "stdint.h" -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ -extern const uint8_t c_chFont1206[95][12]; -extern const uint8_t c_chFont1608[95][16]; -extern const uint8_t c_chFont1612[11][32]; -extern const uint8_t c_chFont3216[11][64]; -extern const uint8_t c_chBmp4016[96]; -extern const uint8_t c_chSingal816[16]; -extern const uint8_t c_chMsg816[16]; -extern const uint8_t c_chBluetooth88[8]; -extern const uint8_t c_chBat816[16]; -extern const uint8_t c_chGPRS88[8]; -extern const uint8_t c_chAlarm88[8]; diff --git a/components/ssd1306/license.txt b/components/ssd1306/license.txt deleted file mode 100644 index d6456956..00000000 --- a/components/ssd1306/license.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/components/ssd1306/ssd1306.c b/components/ssd1306/ssd1306.c deleted file mode 100644 index c78f6a82..00000000 --- a/components/ssd1306/ssd1306.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "driver/i2c.h" -#include "ssd1306.h" -#include "string.h" // for memset - -#define SSD1306_WRITE_CMD (0x00) -#define SSD1306_WRITE_DAT (0x40) - -#define COORDINATE_SWAP(x1, x2, y1, y2) { int16_t temp = x1; x1 = x2, x2 = temp; \ - temp = y1; y1 = y2; y2 = temp; } - -typedef struct { - i2c_port_t bus; - uint16_t dev_addr; - uint8_t s_chDisplayBuffer[128][8]; -} ssd1306_dev_t; - -static uint32_t _pow(uint8_t m, uint8_t n) -{ - uint32_t result = 1; - while (n--) { - result *= m; - } - return result; -} - -static esp_err_t ssd1306_write_data(ssd1306_handle_t dev, const uint8_t *const data, const uint16_t data_len) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - esp_err_t ret; - - i2c_cmd_handle_t cmd = i2c_cmd_link_create(); - ret = i2c_master_start(cmd); - assert(ESP_OK == ret); - ret = i2c_master_write_byte(cmd, device->dev_addr | I2C_MASTER_WRITE, true); - assert(ESP_OK == ret); - ret = i2c_master_write_byte(cmd, SSD1306_WRITE_DAT, true); - assert(ESP_OK == ret); - ret = i2c_master_write(cmd, data, data_len, true); - assert(ESP_OK == ret); - ret = i2c_master_stop(cmd); - assert(ESP_OK == ret); - ret = i2c_master_cmd_begin(device->bus, cmd, 1000 / portTICK_PERIOD_MS); - i2c_cmd_link_delete(cmd); - - return ret; -} - -static esp_err_t ssd1306_write_cmd(ssd1306_handle_t dev, const uint8_t *const data, const uint16_t data_len) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - esp_err_t ret; - - i2c_cmd_handle_t cmd = i2c_cmd_link_create(); - ret = i2c_master_start(cmd); - assert(ESP_OK == ret); - ret = i2c_master_write_byte(cmd, device->dev_addr | I2C_MASTER_WRITE, true); - assert(ESP_OK == ret); - ret = i2c_master_write_byte(cmd, SSD1306_WRITE_CMD, true); - assert(ESP_OK == ret); - ret = i2c_master_write(cmd, data, data_len, true); - assert(ESP_OK == ret); - ret = i2c_master_stop(cmd); - assert(ESP_OK == ret); - ret = i2c_master_cmd_begin(device->bus, cmd, 1000 / portTICK_PERIOD_MS); - i2c_cmd_link_delete(cmd); - - return ret; -} - -static inline esp_err_t ssd1306_write_cmd_byte(ssd1306_handle_t dev, const uint8_t cmd) -{ - return ssd1306_write_cmd(dev, &cmd, 1); -} - -void ssd1306_fill_rectangle(ssd1306_handle_t dev, uint8_t chXpos1, - uint8_t chYpos1, uint8_t chXpos2, uint8_t chYpos2, uint8_t chDot) -{ - uint8_t chXpos, chYpos; - - for (chXpos = chXpos1; chXpos <= chXpos2; chXpos++) { - for (chYpos = chYpos1; chYpos <= chYpos2; chYpos++) { - ssd1306_fill_point(dev, chXpos, chYpos, chDot); - } - } -} - -void ssd1306_draw_num(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - uint32_t chNum, uint8_t chLen, uint8_t chSize) -{ - uint8_t i; - uint8_t chTemp, chShow = 0; - - for (i = 0; i < chLen; i++) { - chTemp = (chNum / _pow(10, chLen - i - 1)) % 10; - if (chShow == 0 && i < (chLen - 1)) { - if (chTemp == 0) { - ssd1306_draw_char(dev, chXpos + (chSize / 2) * i, chYpos, - ' ', chSize, 1); - continue; - } else { - chShow = 1; - } - } - ssd1306_draw_char(dev, chXpos + (chSize / 2) * i, chYpos, - chTemp + '0', chSize, 1); - } -} - -void ssd1306_draw_char(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - uint8_t chChr, uint8_t chSize, uint8_t chMode) -{ - uint8_t i, j; - uint8_t chTemp, chYpos0 = chYpos; - - chChr = chChr - ' '; - for (i = 0; i < chSize; i++) { - if (chSize == 12) { - if (chMode) { - chTemp = c_chFont1206[chChr][i]; - } else { - chTemp = ~c_chFont1206[chChr][i]; - } - } else { - if (chMode) { - chTemp = c_chFont1608[chChr][i]; - } else { - chTemp = ~c_chFont1608[chChr][i]; - } - } - - for (j = 0; j < 8; j++) { - if (chTemp & 0x80) { - ssd1306_fill_point(dev, chXpos, chYpos, 1); - } else { - ssd1306_fill_point(dev, chXpos, chYpos, 0); - } - chTemp <<= 1; - chYpos++; - - if ((chYpos - chYpos0) == chSize) { - chYpos = chYpos0; - chXpos++; - break; - } - } - } -} - -void ssd1306_draw_string(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - const uint8_t *pchString, uint8_t chSize, uint8_t chMode) -{ - while (*pchString != '\0') { - if (chXpos > (SSD1306_WIDTH - chSize / 2)) { - chXpos = 0; - chYpos += chSize; - if (chYpos > (SSD1306_HEIGHT - chSize)) { - chYpos = chXpos = 0; - ssd1306_clear_screen(dev, 0x00); - } - } - ssd1306_draw_char(dev, chXpos, chYpos, *pchString, chSize, chMode); - chXpos += chSize / 2; - pchString++; - } -} - -void ssd1306_fill_point(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chPoint) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - uint8_t chPos, chBx, chTemp = 0; - - if (chXpos > 127 || chYpos > 63) { - return; - } - chPos = 7 - chYpos / 8; - chBx = chYpos % 8; - chTemp = 1 << (7 - chBx); - - if (chPoint) { - device->s_chDisplayBuffer[chXpos][chPos] |= chTemp; - } else { - device->s_chDisplayBuffer[chXpos][chPos] &= ~chTemp; - } -} - -void ssd1306_draw_1616char(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chChar) -{ - uint8_t i, j; - uint8_t chTemp = 0, chYpos0 = chYpos, chMode = 0; - - for (i = 0; i < 32; i++) { - chTemp = c_chFont1612[chChar - 0x30][i]; - for (j = 0; j < 8; j++) { - chMode = chTemp & 0x80 ? 1 : 0; - ssd1306_fill_point(dev, chXpos, chYpos, chMode); - chTemp <<= 1; - chYpos++; - if ((chYpos - chYpos0) == 16) { - chYpos = chYpos0; - chXpos++; - break; - } - } - } -} - -void ssd1306_draw_3216char(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, uint8_t chChar) -{ - uint8_t i, j; - uint8_t chTemp = 0, chYpos0 = chYpos, chMode = 0; - - for (i = 0; i < 64; i++) { - chTemp = c_chFont3216[chChar - 0x30][i]; - for (j = 0; j < 8; j++) { - chMode = chTemp & 0x80 ? 1 : 0; - ssd1306_fill_point(dev, chXpos, chYpos, chMode); - chTemp <<= 1; - chYpos++; - if ((chYpos - chYpos0) == 32) { - chYpos = chYpos0; - chXpos++; - break; - } - } - } -} - -void ssd1306_draw_bitmap(ssd1306_handle_t dev, uint8_t chXpos, uint8_t chYpos, - const uint8_t *pchBmp, uint8_t chWidth, uint8_t chHeight) -{ - uint16_t i, j, byteWidth = (chWidth + 7) / 8; - - for (j = 0; j < chHeight; j++) { - for (i = 0; i < chWidth; i++) { - if (*(pchBmp + j * byteWidth + i / 8) & (128 >> (i & 7))) { - ssd1306_fill_point(dev, chXpos + i, chYpos + j, 1); - } - } - } -} - -void ssd1306_draw_line(ssd1306_handle_t dev, int16_t chXpos1, int16_t chYpos1, int16_t chXpos2, int16_t chYpos2) -{ - // 16-bit variables allowing a display overflow effect - int16_t x_len = abs(chXpos1 - chXpos2); - int16_t y_len = abs(chYpos1 - chYpos2); - - if (y_len < x_len) { - if (chXpos1 > chXpos2) { - COORDINATE_SWAP(chXpos1, chXpos2, chYpos1, chYpos2); - } - int16_t len = x_len; - int16_t diff = y_len; - - do { - if (diff >= x_len) { - diff -= x_len; - if (chYpos1 < chYpos2) { - chYpos1++; - } else { - chYpos1--; - } - } - - diff += y_len; - ssd1306_fill_point(dev, chXpos1++, chYpos1, 1); - } while (len--); - } - - else { - if (chYpos1 > chYpos2) { - COORDINATE_SWAP(chXpos1, chXpos2, chYpos1, chYpos2); - } - int16_t len = y_len; - int16_t diff = x_len; - - do { - if (diff >= y_len) { - diff -= y_len; - if (chXpos1 < chXpos2) { - chXpos1++; - } else { - chXpos1--; - } - } - - diff += x_len; - ssd1306_fill_point(dev, chXpos1, chYpos1++, 1); - } while (len--); - } -} - -esp_err_t ssd1306_init(ssd1306_handle_t dev) -{ - esp_err_t ret; - - ssd1306_write_cmd_byte(dev, 0xAE); //--turn off oled panel - ssd1306_write_cmd_byte(dev, 0x40); //--set start line address Set Mapping RAM Display Start Line (0x00~0x3F) - ssd1306_write_cmd_byte(dev, 0x81); //--set contrast control register - ssd1306_write_cmd_byte(dev, 0xCF); // Set SEG Output Current Brightness - ssd1306_write_cmd_byte(dev, 0xA1); //--Set SEG/Column Mapping - ssd1306_write_cmd_byte(dev, 0xC0); //Set COM/Row Scan Direction - ssd1306_write_cmd_byte(dev, 0xA6); //--set normal display - ssd1306_write_cmd_byte(dev, 0xA8); //--set multiplex ratio(1 to 64) - ssd1306_write_cmd_byte(dev, 0x3f); //--1/64 duty - ssd1306_write_cmd_byte(dev, 0xd5); //--set display clock divide ratio/oscillator frequency - ssd1306_write_cmd_byte(dev, 0x80); //--set divide ratio, Set Clock as 100 Frames/Sec - ssd1306_write_cmd_byte(dev, 0xD9); //--set pre-charge period - ssd1306_write_cmd_byte(dev, 0xF1); //Set Pre-Charge as 15 Clocks & Discharge as 1 Clock - ssd1306_write_cmd_byte(dev, 0xDA); //--set com pins hardware configuration - ssd1306_write_cmd_byte(dev, 0xDB); //--set vcomh - ssd1306_write_cmd_byte(dev, 0x40); //Set VCOM Deselect Level - ssd1306_write_cmd_byte(dev, 0x8D); //--set Charge Pump enable/disable - ssd1306_write_cmd_byte(dev, 0x14); //--set(0x10) disable - ssd1306_write_cmd_byte(dev, 0xA4); // Disable Entire Display On (0xa4/0xa5) - ssd1306_write_cmd_byte(dev, 0xA6); // Disable Inverse Display On (0xa6/a7) - - const uint8_t cmd[2] = {0x20, 1}; //-- set vertical adressing mode - ssd1306_write_cmd(dev, cmd, sizeof(cmd)); - - uint8_t cmd2[3] = {0x21, 0, 127}; - ssd1306_write_cmd(dev, cmd2, sizeof(cmd2)); //--set column address to zero - cmd2[0] = 0x22; - cmd2[2] = 7; - ssd1306_write_cmd(dev, cmd2, sizeof(cmd2)); //--set row address to zero - - ret = ssd1306_write_cmd_byte(dev, 0xAF); //--turn on oled panel - - ssd1306_clear_screen(dev, 0x00); - return ret; -} - -ssd1306_handle_t ssd1306_create(i2c_port_t bus, uint16_t dev_addr) -{ - ssd1306_dev_t *dev = (ssd1306_dev_t *) calloc(1, sizeof(ssd1306_dev_t)); - dev->bus = bus; - dev->dev_addr = dev_addr << 1; - ssd1306_init((ssd1306_handle_t) dev); - return (ssd1306_handle_t) dev; -} - -void ssd1306_delete(ssd1306_handle_t dev) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - free(device); -} - -esp_err_t ssd1306_refresh_gram(ssd1306_handle_t dev) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - return ssd1306_write_data(dev, &device->s_chDisplayBuffer[0][0], sizeof(device->s_chDisplayBuffer)); -} - -void ssd1306_clear_screen(ssd1306_handle_t dev, uint8_t chFill) -{ - ssd1306_dev_t *device = (ssd1306_dev_t *) dev; - memset(device->s_chDisplayBuffer, chFill, sizeof(device->s_chDisplayBuffer)); -} diff --git a/components/ssd1306/ssd1306_fonts.c b/components/ssd1306/ssd1306_fonts.c deleted file mode 100644 index 23893c46..00000000 --- a/components/ssd1306/ssd1306_fonts.c +++ /dev/null @@ -1,682 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#include "ssd1306_fonts.h" - -const uint8_t c_chFont1206[95][12] = { { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - },/*" ",0*/ - { 0x00, 0x00, 0x00, 0x00, 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*"!",1*/ - { 0x00, 0x00, 0x30, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x00, 0x00 },/*""",2*/ - { 0x09, 0x00, 0x0B, 0xC0, 0x3D, 0x00, 0x0B, 0xC0, 0x3D, 0x00, 0x09, 0x00 },/*"#",3*/ - { 0x18, 0xC0, 0x24, 0x40, 0x7F, 0xE0, 0x22, 0x40, 0x31, 0x80, 0x00, 0x00 },/*"$",4*/ - { 0x18, 0x00, 0x24, 0xC0, 0x1B, 0x00, 0x0D, 0x80, 0x32, 0x40, 0x01, 0x80 },/*"%",5*/ - { 0x03, 0x80, 0x1C, 0x40, 0x27, 0x40, 0x1C, 0x80, 0x07, 0x40, 0x00, 0x40 },/*"&",6*/ - { 0x10, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*"'",7*/ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x20, 0x40, 0x40, 0x20 },/*"(",8*/ - { 0x00, 0x00, 0x40, 0x20, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00 },/*")",9*/ - { 0x09, 0x00, 0x06, 0x00, 0x1F, 0x80, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00 },/*"*",10*/ - { 0x04, 0x00, 0x04, 0x00, 0x3F, 0x80, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00 },/*"+",11*/ - { 0x00, 0x10, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*",",12*/ - { 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00 },/*"-",13*/ - { 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*".",14*/ - { 0x00, 0x20, 0x01, 0xC0, 0x06, 0x00, 0x38, 0x00, 0x40, 0x00, 0x00, 0x00 },/*"/",15*/ - { 0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00 },/*"0",16*/ - { 0x00, 0x00, 0x10, 0x40, 0x3F, 0xC0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 },/*"1",17*/ - { 0x18, 0xC0, 0x21, 0x40, 0x22, 0x40, 0x24, 0x40, 0x18, 0x40, 0x00, 0x00 },/*"2",18*/ - { 0x10, 0x80, 0x20, 0x40, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00 },/*"3",19*/ - { 0x02, 0x00, 0x0D, 0x00, 0x11, 0x00, 0x3F, 0xC0, 0x01, 0x40, 0x00, 0x00 },/*"4",20*/ - { 0x3C, 0x80, 0x24, 0x40, 0x24, 0x40, 0x24, 0x40, 0x23, 0x80, 0x00, 0x00 },/*"5",21*/ - { 0x1F, 0x80, 0x24, 0x40, 0x24, 0x40, 0x34, 0x40, 0x03, 0x80, 0x00, 0x00 },/*"6",22*/ - { 0x30, 0x00, 0x20, 0x00, 0x27, 0xC0, 0x38, 0x00, 0x20, 0x00, 0x00, 0x00 },/*"7",23*/ - { 0x1B, 0x80, 0x24, 0x40, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00 },/*"8",24*/ - { 0x1C, 0x00, 0x22, 0xC0, 0x22, 0x40, 0x22, 0x40, 0x1F, 0x80, 0x00, 0x00 },/*"9",25*/ - { 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*":",26*/ - { 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*";",27*/ - { 0x00, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x11, 0x00, 0x20, 0x80, 0x40, 0x40 },/*"<",28*/ - { 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00 },/*"=",29*/ - { 0x00, 0x00, 0x40, 0x40, 0x20, 0x80, 0x11, 0x00, 0x0A, 0x00, 0x04, 0x00 },/*">",30*/ - { 0x18, 0x00, 0x20, 0x00, 0x23, 0x40, 0x24, 0x00, 0x18, 0x00, 0x00, 0x00 },/*"?",31*/ - { 0x1F, 0x80, 0x20, 0x40, 0x27, 0x40, 0x29, 0x40, 0x1F, 0x40, 0x00, 0x00 },/*"@",32*/ - { 0x00, 0x40, 0x07, 0xC0, 0x39, 0x00, 0x0F, 0x00, 0x01, 0xC0, 0x00, 0x40 },/*"A",33*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x1B, 0x80, 0x00, 0x00 },/*"B",34*/ - { 0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x30, 0x80, 0x00, 0x00 },/*"C",35*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00 },/*"D",36*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x2E, 0x40, 0x30, 0xC0, 0x00, 0x00 },/*"E",37*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00 },/*"F",38*/ - { 0x0F, 0x00, 0x10, 0x80, 0x20, 0x40, 0x22, 0x40, 0x33, 0x80, 0x02, 0x00 },/*"G",39*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x04, 0x00, 0x04, 0x00, 0x3F, 0xC0, 0x20, 0x40 },/*"H",40*/ - { 0x20, 0x40, 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x20, 0x40, 0x00, 0x00 },/*"I",41*/ - { 0x00, 0x60, 0x20, 0x20, 0x20, 0x20, 0x3F, 0xC0, 0x20, 0x00, 0x20, 0x00 },/*"J",42*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x0B, 0x00, 0x30, 0xC0, 0x20, 0x40 },/*"K",43*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xC0 },/*"L",44*/ - { 0x3F, 0xC0, 0x3C, 0x00, 0x03, 0xC0, 0x3C, 0x00, 0x3F, 0xC0, 0x00, 0x00 },/*"M",45*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x0C, 0x40, 0x23, 0x00, 0x3F, 0xC0, 0x20, 0x00 },/*"N",46*/ - { 0x1F, 0x80, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x1F, 0x80, 0x00, 0x00 },/*"O",47*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x24, 0x00, 0x18, 0x00, 0x00, 0x00 },/*"P",48*/ - { 0x1F, 0x80, 0x21, 0x40, 0x21, 0x40, 0x20, 0xE0, 0x1F, 0xA0, 0x00, 0x00 },/*"Q",49*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x24, 0x40, 0x26, 0x00, 0x19, 0xC0, 0x00, 0x40 },/*"R",50*/ - { 0x18, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x22, 0x40, 0x31, 0x80, 0x00, 0x00 },/*"S",51*/ - { 0x30, 0x00, 0x20, 0x40, 0x3F, 0xC0, 0x20, 0x40, 0x30, 0x00, 0x00, 0x00 },/*"T",52*/ - { 0x20, 0x00, 0x3F, 0x80, 0x00, 0x40, 0x00, 0x40, 0x3F, 0x80, 0x20, 0x00 },/*"U",53*/ - { 0x20, 0x00, 0x3E, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x38, 0x00, 0x20, 0x00 },/*"V",54*/ - { 0x38, 0x00, 0x07, 0xC0, 0x3C, 0x00, 0x07, 0xC0, 0x38, 0x00, 0x00, 0x00 },/*"W",55*/ - { 0x20, 0x40, 0x39, 0xC0, 0x06, 0x00, 0x39, 0xC0, 0x20, 0x40, 0x00, 0x00 },/*"X",56*/ - { 0x20, 0x00, 0x38, 0x40, 0x07, 0xC0, 0x38, 0x40, 0x20, 0x00, 0x00, 0x00 },/*"Y",57*/ - { 0x30, 0x40, 0x21, 0xC0, 0x26, 0x40, 0x38, 0x40, 0x20, 0xC0, 0x00, 0x00 },/*"Z",58*/ - { 0x00, 0x00, 0x00, 0x00, 0x7F, 0xE0, 0x40, 0x20, 0x40, 0x20, 0x00, 0x00 },/*"[",59*/ - { 0x00, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x03, 0x80, 0x00, 0x40, 0x00, 0x00 },/*"\",60*/ - { 0x00, 0x00, 0x40, 0x20, 0x40, 0x20, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00 },/*"]",61*/ - { 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 },/*"^",62*/ - { 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10 },/*"_",63*/ - { 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },/*"`",64*/ - { 0x00, 0x00, 0x02, 0x80, 0x05, 0x40, 0x05, 0x40, 0x03, 0xC0, 0x00, 0x40 },/*"a",65*/ - { 0x20, 0x00, 0x3F, 0xC0, 0x04, 0x40, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00 },/*"b",66*/ - { 0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x40, 0x06, 0x40, 0x00, 0x00 },/*"c",67*/ - { 0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x24, 0x40, 0x3F, 0xC0, 0x00, 0x40 },/*"d",68*/ - { 0x00, 0x00, 0x03, 0x80, 0x05, 0x40, 0x05, 0x40, 0x03, 0x40, 0x00, 0x00 },/*"e",69*/ - { 0x00, 0x00, 0x04, 0x40, 0x1F, 0xC0, 0x24, 0x40, 0x24, 0x40, 0x20, 0x00 },/*"f",70*/ - { 0x00, 0x00, 0x02, 0xE0, 0x05, 0x50, 0x05, 0x50, 0x06, 0x50, 0x04, 0x20 },/*"g",71*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x04, 0x40, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x40 },/*"h",72*/ - { 0x00, 0x00, 0x04, 0x40, 0x27, 0xC0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 },/*"i",73*/ - { 0x00, 0x10, 0x00, 0x10, 0x04, 0x10, 0x27, 0xE0, 0x00, 0x00, 0x00, 0x00 },/*"j",74*/ - { 0x20, 0x40, 0x3F, 0xC0, 0x01, 0x40, 0x07, 0x00, 0x04, 0xC0, 0x04, 0x40 },/*"k",75*/ - { 0x20, 0x40, 0x20, 0x40, 0x3F, 0xC0, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00 },/*"l",76*/ - { 0x07, 0xC0, 0x04, 0x00, 0x07, 0xC0, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x00 },/*"m",77*/ - { 0x04, 0x40, 0x07, 0xC0, 0x04, 0x40, 0x04, 0x00, 0x03, 0xC0, 0x00, 0x40 },/*"n",78*/ - { 0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00 },/*"o",79*/ - { 0x04, 0x10, 0x07, 0xF0, 0x04, 0x50, 0x04, 0x40, 0x03, 0x80, 0x00, 0x00 },/*"p",80*/ - { 0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x04, 0x50, 0x07, 0xF0, 0x00, 0x10 },/*"q",81*/ - { 0x04, 0x40, 0x07, 0xC0, 0x02, 0x40, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00 },/*"r",82*/ - { 0x00, 0x00, 0x06, 0x40, 0x05, 0x40, 0x05, 0x40, 0x04, 0xC0, 0x00, 0x00 },/*"s",83*/ - { 0x00, 0x00, 0x04, 0x00, 0x1F, 0x80, 0x04, 0x40, 0x00, 0x40, 0x00, 0x00 },/*"t",84*/ - { 0x04, 0x00, 0x07, 0x80, 0x00, 0x40, 0x04, 0x40, 0x07, 0xC0, 0x00, 0x40 },/*"u",85*/ - { 0x04, 0x00, 0x07, 0x00, 0x04, 0xC0, 0x01, 0x80, 0x06, 0x00, 0x04, 0x00 },/*"v",86*/ - { 0x06, 0x00, 0x01, 0xC0, 0x07, 0x00, 0x01, 0xC0, 0x06, 0x00, 0x00, 0x00 },/*"w",87*/ - { 0x04, 0x40, 0x06, 0xC0, 0x01, 0x00, 0x06, 0xC0, 0x04, 0x40, 0x00, 0x00 },/*"x",88*/ - { 0x04, 0x10, 0x07, 0x10, 0x04, 0xE0, 0x01, 0x80, 0x06, 0x00, 0x04, 0x00 },/*"y",89*/ - { 0x00, 0x00, 0x04, 0x40, 0x05, 0xC0, 0x06, 0x40, 0x04, 0x40, 0x00, 0x00 },/*"z",90*/ - { 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x7B, 0xE0, 0x40, 0x20, 0x00, 0x00 },/*"{",91*/ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00 },/*"|",92*/ - { 0x00, 0x00, 0x40, 0x20, 0x7B, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 },/*"}",93*/ - { 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x20, 0x00, 0x40, 0x00 }, /*"~",94*/ -}; - -const uint8_t c_chFont1608[95][16] = { { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - },/*" ",0*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xCC, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"!",1*/ - { - 0x00, 0x00, 0x08, 0x00, 0x30, 0x00, 0x60, 0x00, 0x08, 0x00, 0x30, 0x00, 0x60, - 0x00, 0x00, 0x00 - },/*""",2*/ - { - 0x02, 0x20, 0x03, 0xFC, 0x1E, 0x20, 0x02, 0x20, 0x03, 0xFC, 0x1E, 0x20, 0x02, - 0x20, 0x00, 0x00 - },/*"#",3*/ - { - 0x00, 0x00, 0x0E, 0x18, 0x11, 0x04, 0x3F, 0xFF, 0x10, 0x84, 0x0C, 0x78, 0x00, - 0x00, 0x00, 0x00 - },/*"$",4*/ - { - 0x0F, 0x00, 0x10, 0x84, 0x0F, 0x38, 0x00, 0xC0, 0x07, 0x78, 0x18, 0x84, 0x00, - 0x78, 0x00, 0x00 - },/*"%",5*/ - { - 0x00, 0x78, 0x0F, 0x84, 0x10, 0xC4, 0x11, 0x24, 0x0E, 0x98, 0x00, 0xE4, 0x00, - 0x84, 0x00, 0x08 - },/*"&",6*/ - { - 0x08, 0x00, 0x68, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"'",7*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0, 0x18, 0x18, 0x20, 0x04, 0x40, - 0x02, 0x00, 0x00 - },/*"(",8*/ - { - 0x00, 0x00, 0x40, 0x02, 0x20, 0x04, 0x18, 0x18, 0x07, 0xE0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*")",9*/ - { - 0x02, 0x40, 0x02, 0x40, 0x01, 0x80, 0x0F, 0xF0, 0x01, 0x80, 0x02, 0x40, 0x02, - 0x40, 0x00, 0x00 - },/*"*",10*/ - { - 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x0F, 0xF8, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x00 - },/*"+",11*/ - { - 0x00, 0x01, 0x00, 0x0D, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*",",12*/ - { - 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80 - },/*"-",13*/ - { - 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*".",14*/ - { - 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x60, 0x01, 0x80, 0x06, 0x00, 0x18, - 0x00, 0x20, 0x00 - },/*"/",15*/ - { - 0x00, 0x00, 0x07, 0xF0, 0x08, 0x08, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, - 0xF0, 0x00, 0x00 - },/*"0",16*/ - { - 0x00, 0x00, 0x08, 0x04, 0x08, 0x04, 0x1F, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00 - },/*"1",17*/ - { - 0x00, 0x00, 0x0E, 0x0C, 0x10, 0x14, 0x10, 0x24, 0x10, 0x44, 0x11, 0x84, 0x0E, - 0x0C, 0x00, 0x00 - },/*"2",18*/ - { - 0x00, 0x00, 0x0C, 0x18, 0x10, 0x04, 0x11, 0x04, 0x11, 0x04, 0x12, 0x88, 0x0C, - 0x70, 0x00, 0x00 - },/*"3",19*/ - { - 0x00, 0x00, 0x00, 0xE0, 0x03, 0x20, 0x04, 0x24, 0x08, 0x24, 0x1F, 0xFC, 0x00, - 0x24, 0x00, 0x00 - },/*"4",20*/ - { - 0x00, 0x00, 0x1F, 0x98, 0x10, 0x84, 0x11, 0x04, 0x11, 0x04, 0x10, 0x88, 0x10, - 0x70, 0x00, 0x00 - },/*"5",21*/ - { - 0x00, 0x00, 0x07, 0xF0, 0x08, 0x88, 0x11, 0x04, 0x11, 0x04, 0x18, 0x88, 0x00, - 0x70, 0x00, 0x00 - },/*"6",22*/ - { - 0x00, 0x00, 0x1C, 0x00, 0x10, 0x00, 0x10, 0xFC, 0x13, 0x00, 0x1C, 0x00, 0x10, - 0x00, 0x00, 0x00 - },/*"7",23*/ - { - 0x00, 0x00, 0x0E, 0x38, 0x11, 0x44, 0x10, 0x84, 0x10, 0x84, 0x11, 0x44, 0x0E, - 0x38, 0x00, 0x00 - },/*"8",24*/ - { - 0x00, 0x00, 0x07, 0x00, 0x08, 0x8C, 0x10, 0x44, 0x10, 0x44, 0x08, 0x88, 0x07, - 0xF0, 0x00, 0x00 - },/*"9",25*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x03, 0x0C, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*":",26*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*";",27*/ - { - 0x00, 0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, - 0x04, 0x00, 0x00 - },/*"<",28*/ - { - 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, - 0x20, 0x00, 0x00 - },/*"=",29*/ - { - 0x00, 0x00, 0x10, 0x04, 0x08, 0x08, 0x04, 0x10, 0x02, 0x20, 0x01, 0x40, 0x00, - 0x80, 0x00, 0x00 - },/*">",30*/ - { - 0x00, 0x00, 0x0E, 0x00, 0x12, 0x00, 0x10, 0x0C, 0x10, 0x6C, 0x10, 0x80, 0x0F, - 0x00, 0x00, 0x00 - },/*"?",31*/ - { - 0x03, 0xE0, 0x0C, 0x18, 0x13, 0xE4, 0x14, 0x24, 0x17, 0xC4, 0x08, 0x28, 0x07, - 0xD0, 0x00, 0x00 - },/*"@",32*/ - { - 0x00, 0x04, 0x00, 0x3C, 0x03, 0xC4, 0x1C, 0x40, 0x07, 0x40, 0x00, 0xE4, 0x00, - 0x1C, 0x00, 0x04 - },/*"A",33*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x11, 0x04, 0x0E, 0x88, 0x00, - 0x70, 0x00, 0x00 - },/*"B",34*/ - { - 0x03, 0xE0, 0x0C, 0x18, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x08, 0x1C, - 0x10, 0x00, 0x00 - },/*"C",35*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, - 0xF0, 0x00, 0x00 - },/*"D",36*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x17, 0xC4, 0x10, 0x04, 0x08, - 0x18, 0x00, 0x00 - },/*"E",37*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x00, 0x17, 0xC0, 0x10, 0x00, 0x08, - 0x00, 0x00, 0x00 - },/*"F",38*/ - { - 0x03, 0xE0, 0x0C, 0x18, 0x10, 0x04, 0x10, 0x04, 0x10, 0x44, 0x1C, 0x78, 0x00, - 0x40, 0x00, 0x00 - },/*"G",39*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x84, 0x00, 0x80, 0x00, 0x80, 0x10, 0x84, 0x1F, - 0xFC, 0x10, 0x04 - },/*"H",40*/ - { - 0x00, 0x00, 0x10, 0x04, 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x04, 0x00, - 0x00, 0x00, 0x00 - },/*"I",41*/ - { - 0x00, 0x03, 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x1F, 0xFE, 0x10, 0x00, 0x10, - 0x00, 0x00, 0x00 - },/*"J",42*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x03, 0x80, 0x14, 0x64, 0x18, 0x1C, 0x10, - 0x04, 0x00, 0x00 - },/*"K",43*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, - 0x0C, 0x00, 0x00 - },/*"L",44*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x1F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x1F, 0xFC, 0x10, - 0x04, 0x00, 0x00 - },/*"M",45*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x0C, 0x04, 0x03, 0x00, 0x00, 0xE0, 0x10, 0x18, 0x1F, - 0xFC, 0x10, 0x00 - },/*"N",46*/ - { - 0x07, 0xF0, 0x08, 0x08, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x07, - 0xF0, 0x00, 0x00 - },/*"O",47*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x84, 0x10, 0x80, 0x10, 0x80, 0x10, 0x80, 0x0F, - 0x00, 0x00, 0x00 - },/*"P",48*/ - { - 0x07, 0xF0, 0x08, 0x18, 0x10, 0x24, 0x10, 0x24, 0x10, 0x1C, 0x08, 0x0A, 0x07, - 0xF2, 0x00, 0x00 - },/*"Q",49*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x11, 0x04, 0x11, 0x00, 0x11, 0xC0, 0x11, 0x30, 0x0E, - 0x0C, 0x00, 0x04 - },/*"R",50*/ - { - 0x00, 0x00, 0x0E, 0x1C, 0x11, 0x04, 0x10, 0x84, 0x10, 0x84, 0x10, 0x44, 0x1C, - 0x38, 0x00, 0x00 - },/*"S",51*/ - { - 0x18, 0x00, 0x10, 0x00, 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x00, 0x18, - 0x00, 0x00, 0x00 - },/*"T",52*/ - { - 0x10, 0x00, 0x1F, 0xF8, 0x10, 0x04, 0x00, 0x04, 0x00, 0x04, 0x10, 0x04, 0x1F, - 0xF8, 0x10, 0x00 - },/*"U",53*/ - { - 0x10, 0x00, 0x1E, 0x00, 0x11, 0xE0, 0x00, 0x1C, 0x00, 0x70, 0x13, 0x80, 0x1C, - 0x00, 0x10, 0x00 - },/*"V",54*/ - { - 0x1F, 0xC0, 0x10, 0x3C, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0xE0, 0x10, 0x3C, 0x1F, - 0xC0, 0x00, 0x00 - },/*"W",55*/ - { - 0x10, 0x04, 0x18, 0x0C, 0x16, 0x34, 0x01, 0xC0, 0x01, 0xC0, 0x16, 0x34, 0x18, - 0x0C, 0x10, 0x04 - },/*"X",56*/ - { - 0x10, 0x00, 0x1C, 0x00, 0x13, 0x04, 0x00, 0xFC, 0x13, 0x04, 0x1C, 0x00, 0x10, - 0x00, 0x00, 0x00 - },/*"Y",57*/ - { - 0x08, 0x04, 0x10, 0x1C, 0x10, 0x64, 0x10, 0x84, 0x13, 0x04, 0x1C, 0x04, 0x10, - 0x18, 0x00, 0x00 - },/*"Z",58*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x02, 0x00, 0x00 - },/*"[",59*/ - { - 0x00, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x03, 0x80, 0x00, 0x60, 0x00, 0x1C, 0x00, - 0x03, 0x00, 0x00 - },/*"\",60*/ - { - 0x00, 0x00, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x7F, 0xFE, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"]",61*/ - { - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, - 0x00, 0x00, 0x00 - },/*"^",62*/ - { - 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, - 0x01, 0x00, 0x01 - },/*"_",63*/ - { - 0x00, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"`",64*/ - { - 0x00, 0x00, 0x00, 0x98, 0x01, 0x24, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x00, - 0xFC, 0x00, 0x04 - },/*"a",65*/ - { - 0x10, 0x00, 0x1F, 0xFC, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x00, 0x88, 0x00, - 0x70, 0x00, 0x00 - },/*"b",66*/ - { - 0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x00, - 0x88, 0x00, 0x00 - },/*"c",67*/ - { - 0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x11, 0x08, 0x1F, - 0xFC, 0x00, 0x04 - },/*"d",68*/ - { - 0x00, 0x00, 0x00, 0xF8, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x01, 0x44, 0x00, - 0xC8, 0x00, 0x00 - },/*"e",69*/ - { - 0x00, 0x00, 0x01, 0x04, 0x01, 0x04, 0x0F, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x11, - 0x00, 0x18, 0x00 - },/*"f",70*/ - { - 0x00, 0x00, 0x00, 0xD6, 0x01, 0x29, 0x01, 0x29, 0x01, 0x29, 0x01, 0xC9, 0x01, - 0x06, 0x00, 0x00 - },/*"g",71*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x00, 0x84, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x00, - 0xFC, 0x00, 0x04 - },/*"h",72*/ - { - 0x00, 0x00, 0x01, 0x04, 0x19, 0x04, 0x19, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00 - },/*"i",73*/ - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x01, 0x19, 0x01, 0x19, 0xFE, 0x00, - 0x00, 0x00, 0x00 - },/*"j",74*/ - { - 0x10, 0x04, 0x1F, 0xFC, 0x00, 0x24, 0x00, 0x40, 0x01, 0xB4, 0x01, 0x0C, 0x01, - 0x04, 0x00, 0x00 - },/*"k",75*/ - { - 0x00, 0x00, 0x10, 0x04, 0x10, 0x04, 0x1F, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00 - },/*"l",76*/ - { - 0x01, 0x04, 0x01, 0xFC, 0x01, 0x04, 0x01, 0x00, 0x01, 0xFC, 0x01, 0x04, 0x01, - 0x00, 0x00, 0xFC - },/*"m",77*/ - { - 0x01, 0x04, 0x01, 0xFC, 0x00, 0x84, 0x01, 0x00, 0x01, 0x00, 0x01, 0x04, 0x00, - 0xFC, 0x00, 0x04 - },/*"n",78*/ - { - 0x00, 0x00, 0x00, 0xF8, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x00, - 0xF8, 0x00, 0x00 - },/*"o",79*/ - { - 0x01, 0x01, 0x01, 0xFF, 0x00, 0x85, 0x01, 0x04, 0x01, 0x04, 0x00, 0x88, 0x00, - 0x70, 0x00, 0x00 - },/*"p",80*/ - { - 0x00, 0x00, 0x00, 0x70, 0x00, 0x88, 0x01, 0x04, 0x01, 0x04, 0x01, 0x05, 0x01, - 0xFF, 0x00, 0x01 - },/*"q",81*/ - { - 0x01, 0x04, 0x01, 0x04, 0x01, 0xFC, 0x00, 0x84, 0x01, 0x04, 0x01, 0x00, 0x01, - 0x80, 0x00, 0x00 - },/*"r",82*/ - { - 0x00, 0x00, 0x00, 0xCC, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, 0x24, 0x01, - 0x98, 0x00, 0x00 - },/*"s",83*/ - { - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x07, 0xF8, 0x01, 0x04, 0x01, 0x04, 0x00, - 0x00, 0x00, 0x00 - },/*"t",84*/ - { - 0x01, 0x00, 0x01, 0xF8, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x01, 0x08, 0x01, - 0xFC, 0x00, 0x04 - },/*"u",85*/ - { - 0x01, 0x00, 0x01, 0x80, 0x01, 0x70, 0x00, 0x0C, 0x00, 0x10, 0x01, 0x60, 0x01, - 0x80, 0x01, 0x00 - },/*"v",86*/ - { - 0x01, 0xF0, 0x01, 0x0C, 0x00, 0x30, 0x01, 0xC0, 0x00, 0x30, 0x01, 0x0C, 0x01, - 0xF0, 0x01, 0x00 - },/*"w",87*/ - { - 0x00, 0x00, 0x01, 0x04, 0x01, 0x8C, 0x00, 0x74, 0x01, 0x70, 0x01, 0x8C, 0x01, - 0x04, 0x00, 0x00 - },/*"x",88*/ - { - 0x01, 0x01, 0x01, 0x81, 0x01, 0x71, 0x00, 0x0E, 0x00, 0x18, 0x01, 0x60, 0x01, - 0x80, 0x01, 0x00 - },/*"y",89*/ - { - 0x00, 0x00, 0x01, 0x84, 0x01, 0x0C, 0x01, 0x34, 0x01, 0x44, 0x01, 0x84, 0x01, - 0x0C, 0x00, 0x00 - },/*"z",90*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3E, 0xFC, 0x40, - 0x02, 0x40, 0x02 - },/*"{",91*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"|",92*/ - { - 0x00, 0x00, 0x40, 0x02, 0x40, 0x02, 0x3E, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00 - },/*"}",93*/ - { - 0x00, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, - 0x00, 0x20, 0x00 - }, /*"~",94*/ -}; - -const uint8_t c_chFont1612[11][32] = { { - 0x00, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, - 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, - 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x3F, 0xFC, 0x3F, 0xFC, - 0x00, 0x00 - },/*"0",0*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x00, 0x30, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - },/*"1",1*/ - { - 0x00, 0x00, 0x39, 0xFC, 0x39, 0xFC, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x3F, 0x8C, 0x3F, 0x8C, 0x00, 0x00 - },/*"2",2*/ - { - 0x00, 0x00, 0x38, 0x1C, 0x38, 0x1C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00 - },/*"3",3*/ - { - 0x00, 0x00, 0x3F, 0x80, 0x3F, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, - 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, - 0x80, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00 - },/*"4",4*/ - { - 0x00, 0x00, 0x3F, 0x9C, 0x3F, 0x9C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0xFC, 0x31, 0xFC, 0x00, 0x00 - },/*"5",5*/ - { - 0x00, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0xFC, 0x31, 0xFC, 0x00, 0x00 - },/*"6",6*/ - { - 0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, - 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, - 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00 - },/*"7",7*/ - { - 0x00, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00 - },/*"8",8*/ - { - 0x00, 0x00, 0x3F, 0x9C, 0x3F, 0x9C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, - 0x8C, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00 - },/*"9",9*/ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x30, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, /*":",10*/ -}; - -const uint8_t c_chFont3216[11][64] = { { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, 0x30, 0x00, - 0x00, 0x0C, 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, - 0x00, 0x0C,/*"0",0*/ - 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x0C, - 0x30, 0x00, 0x00, 0x0C, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,/*"1",1*/ - 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x01, 0xFF, 0xFC, 0x3C, - 0x01, 0xFF, 0xFC, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"2",2*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x3F, 0xFF, 0x80, 0x0C, 0x3F, 0xFF, 0x80, 0x0C, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x3C, 0x38, - 0x00, 0x00, 0x3C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"3",3*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x00, 0x3F, - 0xFF, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, - 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00,/*"4",4*/ - 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, - 0x00, 0x01, 0x80, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x3C, 0x3F, - 0xFF, 0x80, 0x3C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"5",5*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0xFF, 0xFC, 0x30, 0x01, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, - 0xFF, 0xFF, 0xFC, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"6",6*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x3C, 0x01, 0xFF, 0xFC, 0x3C, 0x01, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3C, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,/*"7",7*/ - 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, - 0xFF, 0xFF, 0xFC, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"8",8*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x80, 0x3C, 0x3F, - 0xFF, 0x80, 0x3C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, - 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C,/*"9",9*/ - 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, 0x30, 0x01, 0x80, 0x0C, - 0x30, 0x01, 0x80, 0x0C, 0x3F, 0xFF, 0xFF, 0xFC, 0x3F, 0xFF, 0xFF, 0xFC, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x0F, 0xF0, 0x0F, - 0xF0, 0x0F, 0xF0, 0x0C, 0x00, 0x00, 0x30,/*":",10*/ - 0x0C, 0x00, 0x00, 0x30, 0x0F, 0xF0, 0x0F, 0xF0, 0x0F, 0xF0, 0x0F, 0xF0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } -}; - -const uint8_t c_chBmp4016[96] = { //SUN - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, - 0xF1, 0x81, 0x8F, 0xFC, 0x3F, 0xF1, 0x81, 0x8F, 0xFC, 0x30, - 0x31, 0x81, 0x8C, 0x0C, 0x30, 0x01, 0x81, 0x8C, 0x0C, 0x30, - 0x01, 0x81, 0x8C, 0x0C, 0x3F, 0xF1, 0x81, 0x8C, 0x0C, 0x3F, - 0xF1, 0x81, 0x8C, 0x0C, 0x00, 0x31, 0x81, 0x8C, 0x0C, 0x00, - 0x31, 0x81, 0x8C, 0x0C, 0x30, 0x31, 0x81, 0x8C, 0x0C, 0x3F, - 0xF1, 0xFF, 0x8C, 0x0C, 0x3F, 0xF1, 0xFF, 0x8C, 0x0C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -const uint8_t c_chSingal816[16] = { //mobie singal - 0xFE, 0x02, 0x92, 0x0A, 0x54, 0x2A, 0x38, 0xAA, 0x12, 0xAA, 0x12, - 0xAA, 0x12, 0xAA, 0x12, 0xAA -}; - -const uint8_t c_chMsg816[16] = { //message - 0x1F, 0xF8, 0x10, 0x08, 0x18, 0x18, 0x14, 0x28, 0x13, 0xC8, 0x10, - 0x08, 0x10, 0x08, 0x1F, 0xF8 -}; - -const uint8_t c_chBat816[16] = { //batery - 0x0F, 0xFE, 0x30, 0x02, 0x26, 0xDA, 0x26, 0xDA, 0x26, 0xDA, 0x26, - 0xDA, 0x30, 0x02, 0x0F, 0xFE -}; - -const uint8_t c_chBluetooth88[8] = // bluetooth -{ 0x18, 0x54, 0x32, 0x1C, 0x1C, 0x32, 0x54, 0x18 }; - -const uint8_t c_chGPRS88[8] = //GPRS -{ 0xC3, 0x99, 0x24, 0x20, 0x2C, 0x24, 0x99, 0xC3 }; - -const uint8_t c_chAlarm88[8] = //alram -{ 0xC3, 0xBD, 0x42, 0x52, 0x4E, 0x42, 0x3C, 0xC3 }; diff --git a/test_app/CMakeLists.txt b/test_app/CMakeLists.txt index 870b64a0..163244f4 100644 --- a/test_app/CMakeLists.txt +++ b/test_app/CMakeLists.txt @@ -36,6 +36,6 @@ if(NOT "${IDF_TARGET}" STREQUAL "esp32s2" AND NOT "${IDF_TARGET}" STREQUAL "esp3 endif() # Set the components to include the tests for. -set(TEST_COMPONENTS bh1750 ssd1306 mpu6050 mag3110 hts221 fbm320 es7210 icm42670 CACHE STRING "List of components to test") +set(TEST_COMPONENTS bh1750 mpu6050 mag3110 hts221 fbm320 es7210 icm42670 CACHE STRING "List of components to test") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(esp_bsp_test_app)