Merge branch 'development' into teleinfo

This commit is contained in:
Charles 2021-05-01 00:24:29 +02:00
commit e842ae3fb2
164 changed files with 12045 additions and 6757 deletions

View File

@ -3,15 +3,34 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
## [9.4.0.1]
## [9.4.0.3]
### Added
- Make Telegram command ``TmState`` persistent (#11965)
- Add Zigbee firmware for Tube's Zigbee coordinator based on EFR32 and ESP32
- Add Zigbee firmware 6.7.9 for Sonoff ZBBridge
## [9.4.0.2] 20210430
### Added
- Initial support for optional ``Template`` JSON fieldpair ``"CMND":"<any template related command>|<any template related command>|..."`` (#11788)
- ESP32 pulldown buttons ``Button_d`` and ``Button_id`` and switches ``Switch_d`` (#10814)
- Support for MQTT using Azure IoT Hub by Kevin Saye (#11906)
## [Released]
## [9.4.0] 20210422
## [9.4.0] 20210423
- Release Leslie
## [9.4.0.1] 20210423
### Added
- Command ``Wifi 0/1`` for ESP8266 to turn wifi Off and On. When wifi is Off it is always returned On after a restart except for a wake-up from deepsleep (#11839)
### Changed
- Zigbee refactored storage for device configuration and device last known data (#11838)
### Fixed
- Command ``Power`` should not reset pulsetime (#11805)
- Teleperiod rule handling regression from v9.3.1.2 (#11851)
## [9.3.1.4] 20210422
### Added
- Command ``TuyaTempSetRes 0..3`` to control Tuya Temperature Set Resolution (#11781)

View File

@ -3,7 +3,7 @@
Alternative firmware for [ESP8266](https://en.wikipedia.org/wiki/ESP8266) and [ESP32](https://en.wikipedia.org/wiki/ESP32) based devices with **easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX**.
_Written for PlatformIO with limited support for Arduino IDE._
[![GitHub version](https://img.shields.io/github/release/arendst/Tasmota.svg)](https://github.com/arendst/Tasmota/releases/latest)
[![GitHub version](https://img.shields.io/github/release/arendst/Tasmota.svg)](http://ota.tasmota.com/tasmota/release)
[![GitHub download](https://img.shields.io/github/downloads/arendst/Tasmota/total.svg)](https://github.com/arendst/Tasmota/releases/latest)
[![License](https://img.shields.io/github/license/arendst/Tasmota.svg)](LICENSE.txt)
[![Chat](https://img.shields.io/discord/479389167382691863.svg)](https://discord.gg/Ks2Kzd4)
@ -17,7 +17,7 @@ If you like **Tasmota**, give it a star, or fork it and contribute!
See [RELEASENOTES.md](https://github.com/arendst/Tasmota/blob/master/RELEASENOTES.md) for release information.
In addition to the [release webpage](https://github.com/arendst/Tasmota/releases/latest) the binaries can also be downloaded from http://ota.tasmota.com/tasmota/release/
Firmware binaries can be downloaded from http://ota.tasmota.com/tasmota/release/ or http://ota.tasmota.com/tasmota32/release/ for ESP32 binaries.
## Development
@ -31,7 +31,7 @@ See [CHANGELOG.md](CHANGELOG.md) for detailed change information.
Unless your Tasmota powered device exhibits a problem or you need to make use of a feature that is not available in the Tasmota version currently installed on your device, leave your device alone - it works so don't make unnecessary changes! If the release version (i.e., the master branch) exhibits unexpected behaviour for your device and configuration, you should upgrade to the latest development version instead to see if your problem is resolved as some bugs in previous releases or development builds may already have been resolved.
Every commit made to the development branch, which is compiling successfuly, will post new binary files at http://ota.tasmota.com/tasmota/ (this web address can be used for OTA updates too). It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
Every commit made to the development branch, which is compiling successfuly, will post new binary files at http://ota.tasmota.com/tasmota/ (this web address can be used for OTA updates too). It is important to note that these binaries are based on the current development codebase. These commits are tested as much as is possible and are typically quite stable. However, it is infeasible to test on the hundreds of different types of devices with all the available configuration options permitted.
Note that there is a chance, as with any upgrade, that the device may not function as expected. You must always account for the possibility that you may need to flash the device via the serial programming interface if the OTA upgrade fails. Even with the master release, you should always attempt to test the device or a similar prototype before upgrading a device which is in production or is hard to reach. And, as always, make a backup of the device configuration before beginning any firmware update.
@ -45,10 +45,10 @@ We don't take any responsibility nor liability for using this software nor for t
## Note
Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://tasmota.github.io/docs/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates) create your own [Template](https://tasmota.github.io/docs/Templates#creating-your-template).
Please do not ask to add new devices unless it requires additional code for new features. If the device is not listed as a module, try using [Templates](https://tasmota.github.io/docs/Templates) first. If it is not listed in the [Tasmota Device Templates Repository](http://templates.blakadder.com) create your own [Template](https://tasmota.github.io/docs/Templates#creating-your-template).
## Quick Install
Download one of the released binaries from https://github.com/arendst/Tasmota/releases and flash it to your hardware [using our installation guide](https://tasmota.github.io/docs/Getting-Started).
Download one of the released binaries from http://ota.tasmota.com/tasmota/release/ or http://ota.tasmota.com/tasmota32/release/ and flash it to your hardware [using our installation guide](https://tasmota.github.io/docs/Getting-Started).
## Important User Compilation Information
If you want to compile Tasmota yourself keep in mind the following:

View File

@ -55,7 +55,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
Above binaries are also available as gzipped version allowing faster uploads.
The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota/release. The links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
The binaries can be downloaded from either https://github.com/arendst/Tasmota/tree/release-firmware or http://ota.tasmota.com/tasmota/release. The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
### ESP32 based
The following binary downloads have been compiled with ESP32/Arduino library core version **1.0.6**.
@ -70,81 +70,24 @@ The following binary downloads have been compiled with ESP32/Arduino library cor
- **tasmota32-odroidgo.bin** = The Odroid-Go version is specifically tailored to Odroid_go hardware.
- **tasmota32-core2.bin** = The Core2 version is specifically tailored to M5Stack Core2 hardware.
The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota32/release. The links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin``
The binaries can be downloaded from either https://github.com/arendst/Tasmota/tree/release-firmware or http://ota.tasmota.com/tasmota32/release. The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin``
[List](MODULES.md) of embedded modules.
[Complete list](BUILDS.md) of available feature and sensors.
## Changelog v9.4.0 Leslie
## Changelog v9.4.0.2
### Added
- Command ``Sensor80 1 <0..7>`` to control MFRC522 RFID antenna gain from 18dB (0) to 48dB (7) [#11073](https://github.com/arendst/Tasmota/issues/11073)
- Command ``SerialBuffer 256..520`` to change hardware serial receive buffer size from default (256) to max local buffer size (520) [#11448](https://github.com/arendst/Tasmota/issues/11448)
- Command ``SetOption126 1`` to enable DS18x20 arithmetic mean over teleperiod for JSON temperature based on [#11472](https://github.com/arendst/Tasmota/issues/11472)
- Command ``Backlog0`` to allow execution of following commands without delay
- Command ``TuyaTempSetRes 0..3`` to control Tuya Temperature Set Resolution [#11781](https://github.com/arendst/Tasmota/issues/11781)
- Commands ``MqttKeepAlive 1..100`` to set Mqtt Keep Alive timer (default 30) and ``MqttTimeout 1..100`` to set Mqtt Socket Timeout (default 4) [#5341](https://github.com/arendst/Tasmota/issues/5341)
- Commands ``DisplayType`` to select sub-modules where implemented and ``DisplayInvert`` to select inverted display where implemented
- Support for SML VBUS [#11125](https://github.com/arendst/Tasmota/issues/11125)
- Support for NEC and OPTOMA LCD/DLP Projector serial power control by Jan Bubík [#11145](https://github.com/arendst/Tasmota/issues/11145)
- Support for XPT2046 touch screen digitizer on ILI9341 display by nonix [#11159](https://github.com/arendst/Tasmota/issues/11159)
- Support for zigbee lumi.sensor_wleak [#11200](https://github.com/arendst/Tasmota/issues/11200)
- Support for dummy energy monitor using user values set by commands ``VoltageSet``, ``CurrentSet``, ``PowerSet`` and ``FrequencySet``. Enable by selecting any GPIO as ``Option A2`` [#10640](https://github.com/arendst/Tasmota/issues/10640)
- Support for CSE7761 energy monitor as used in ESP32 based Sonoff Dual R3 Pow [#10793](https://github.com/arendst/Tasmota/issues/10793)
- Support for Frequency monitoring and zero-cross detection on CSE7761 (Sonoff Dual R3)
- Support for TM1638 seven segment display by Ajith Vasudevan [#11031](https://github.com/arendst/Tasmota/issues/11031)
- Support for MAX7219 seven segment display by Ajith Vasudevan [#11387](https://github.com/arendst/Tasmota/issues/11387)
- Support for MPU6886 on primary or secondary I2C bus
- Support for multiple CCS811 sensors with baseline control (USE_CCS811_V2) by clanganke [#10858](https://github.com/arendst/Tasmota/issues/10858)
- Allow MCP230xx pinmode from output to input [#11104](https://github.com/arendst/Tasmota/issues/11104)
- Berry improvements [#11163](https://github.com/arendst/Tasmota/issues/11163)
- Extent compile time SetOptions support [#11204](https://github.com/arendst/Tasmota/issues/11204)
- Tasmota discovery as alternative to Home Assistant discovery using define ``USE_TASMOTA_DISCOVERY``
- Optional GUI file editor enabled with define ``GUI_EDIT_FILE`` by barbudor [#11668](https://github.com/arendst/Tasmota/issues/11668)
- Initial support for universal display driver UDisplay by Gerhard Mutz. Enable by selecting any GPIO as ``Option A3`` [#11665](https://github.com/arendst/Tasmota/issues/11665)
- ESP32 Extent BLE [#11212](https://github.com/arendst/Tasmota/issues/11212)
- ESP32 support for WS2812 hardware driver via RMT or I2S
- ESP32 support for secondary I2C controller
- ESP32 support for internal Hall Effect sensor connected to both GPIO36 and GPIO39 only
- ESP32 support for LVGL 7.11 with Berry binding by Stephan Hadinger [#11789](https://github.com/arendst/Tasmota/issues/11789)
- Initial support for optional ``Template`` JSON fieldpair ``"CMND":"<any template related command>|<any template related command>|..."`` [#11788](https://github.com/arendst/Tasmota/issues/11788)
- ESP32 pulldown buttons ``Button_d`` and ``Button_id`` and switches ``Switch_d`` [#10814](https://github.com/arendst/Tasmota/issues/10814)
- Support for MQTT using Azure IoT Hub by Kevin Saye [#11906](https://github.com/arendst/Tasmota/issues/11906)
- Make Telegram command ``TmState`` persistent [#11965](https://github.com/arendst/Tasmota/issues/11965)
### Breaking Changed
- ESP32 partition layout changed to accomodate more file space on most and more code space on core2 and odroid-go [#11746](https://github.com/arendst/Tasmota/issues/11746)
### Changed
- TasmotaSerial library from v3.2.0 to v3.3.0
- PubSubClient library from EspEasy v2.7.12 to Tasmota v2.8.12
- IRremoteESP8266 library from v2.7.15 to v2.7.16
- ESP32 core library from v1.0.5-rc6 to v1.0.6
- TuyaMcu dimmer timeout [#11121](https://github.com/arendst/Tasmota/issues/11121)
- Rename epaper 42 commands [#11222](https://github.com/arendst/Tasmota/issues/11222)
- DeepSleep announcement topic [#11223](https://github.com/arendst/Tasmota/issues/11223)
- Limit number of relay/button columns in GUI to 8 [#11546](https://github.com/arendst/Tasmota/issues/11546)
- ADC range result from int to float using command ``FreqRes`` for decimal resolution selection [#11545](https://github.com/arendst/Tasmota/issues/11545)
- Removed overtemp detection on external energy monitoring devices [#11628](https://github.com/arendst/Tasmota/issues/11628)
- Redesigned initial GUI wifi configuration by Adrian Scillato [#11693](https://github.com/arendst/Tasmota/issues/11693)
- Redesigned GUI by moving non-configuration buttons from ``Configuration`` to new submenu ``Consoles``
- In tasmota-sensors.bin enabled support for VL53L0X and disabled TSL2561 [#11711](https://github.com/arendst/Tasmota/issues/11711)
- Add HLW8012/BL0937 average pulse calculation by Alex Lovett [#11722](https://github.com/arendst/Tasmota/issues/11722)
- ESP32 **tasmota32-knx**, **tasmota32-sensors** and **tasmota32-lite** binaries consolidated in **tasmota32.bin** binary
### Fixed
- PN532 on ESP32 Serial flush both Tx and Rx buffers [#10910](https://github.com/arendst/Tasmota/issues/10910)
- Light scheme related color changes [#11041](https://github.com/arendst/Tasmota/issues/11041)
- Refactor acceleration function for shutter stepper and servo [#11088](https://github.com/arendst/Tasmota/issues/11088)
- LM75AD detection on different addresses [#11096](https://github.com/arendst/Tasmota/issues/11096)
- Timer loop when console is scrolled up regression from v9.3.0 [#11108](https://github.com/arendst/Tasmota/issues/11108)
- Display exception when no file system is present [#11125](https://github.com/arendst/Tasmota/issues/11125)
- Scripter and SML fixes [#11150](https://github.com/arendst/Tasmota/issues/11150)
- Zigbee exception when bad frame is received [#11192](https://github.com/arendst/Tasmota/issues/11192)
- ESP32 flash script for Odroid and Core2 [#11227](https://github.com/arendst/Tasmota/issues/11227)
- ESP32 WS2812 bitbang support [#11248](https://github.com/arendst/Tasmota/issues/11248)
- DS18x20 driver timing issue [#11270](https://github.com/arendst/Tasmota/issues/11270)
- Alexa discovery in hue emulation [#11415](https://github.com/arendst/Tasmota/issues/11415)
- HC-SR04 on ESP32 release serial interface if not used [#11507](https://github.com/arendst/Tasmota/issues/11507)
- Alexa discovery for ZBBridge [#11576](https://github.com/arendst/Tasmota/issues/11576)
- Telegram chat id incorrect size [#11660](https://github.com/arendst/Tasmota/issues/11660)
- KNX energy yesterday [#11718](https://github.com/arendst/Tasmota/issues/11718)
### Noted
- ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer

View File

@ -2139,6 +2139,7 @@ Y09 {"NAME":"Y09","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0
## Zigbee Bridge
```
Sonoff ZBBridge {"NAME":"Sonoff ZbBridge","GPIO":[320,3552,0,3584,5312,0,0,0,640,576,608,0,32,0],"FLAG":0,"BASE":75}
Tube's CC2652P2 Ethernet to {"NAME":"Tube ZB CC2652","GPIO":[0,0,0,3840,0,3584,0,0,0,0,0,0,5536,3552,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,3840,5792,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Sonoff ZBBridge {"NAME":"Sonoff ZbBridge","GPIO":[320,3552,0,3584,5312,5313,0,0,640,576,608,0,32,0],"FLAG":0,"BASE":75}
Tube's CC2652P2 Ethernet {"NAME":"Tube ZB CC2652","GPIO":[0,0,0,3840,0,3584,0,0,0,0,0,0,5536,3552,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,3840,5792,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Tube's EFR32 Ethernet {"NAME":"Tube ZB EFR32","GPIO":[0,0,0,3840,0,3552,1,0,0,0,0,0,5536,3584,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,5793,5792,0,0,0,0,0,0],"FLAG":0,"BASE":1}
```

View File

@ -72,6 +72,8 @@ void Adafruit_SH1106::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
//fillScreen(BLACK);
fillScreen(BLACK);
Updateframe();
disp_bpp = -1;
//}
}

View File

@ -604,6 +604,8 @@ void Adafruit_SSD1306::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font)
setCursor(0,0);
fillScreen(BLACK);
Updateframe();
disp_bpp = -1;
//}
}

View File

@ -27,11 +27,7 @@
#include <pgmspace.h>
#include "renderer.h"
#define USE_EPD_FONTS
//#define USE_ALL_EPD_FONTS
//#define USE_GFX_FONTS
#define USE_TINY_FONT
#define USE_7SEG_FONT
uint8_t wr_redir=0;
@ -43,13 +39,17 @@ uint8_t wr_redir=0;
#define OLED_FONT_HEIGTH 8
#define BLACK 0
Renderer::Renderer(int16_t x, int16_t y) :
Adafruit_GFX(x, y) {
#ifdef USE_GFX
Renderer::Renderer(int16_t x, int16_t y) : Adafruit_GFX(x, y) {
#else
Renderer::Renderer(int16_t x, int16_t y) {
#endif
font=0;
#ifdef USE_EPD_FONTS
selected_font = &Font12;
#endif
disp_bpp = 16;
}
uint16_t Renderer::GetColorFromIndex(uint8_t index) {
@ -153,6 +153,13 @@ void Renderer::DrawStringAt(int16_t x, int16_t y, const char* text, uint16_t col
int refcolumn = x;
sFONT *xfont = selected_font;
/*
if (font == 5 && !drawmode) {
// clear bckground
int16_t x1,y1;
uint16_t w,h;
Adafruit_GFX::getTextBounds(text, 0, 0, &x1, &y1, &w, &h);
}*/
#ifndef USE_EPD_FONTS
font=0;
#endif
@ -297,13 +304,15 @@ void Renderer::setTextFont(uint8_t f) {
void Renderer::SetRamfont(uint8_t *font) {
ramfont = (GFXfont*)font;
uint32_t bitmap_offset = (uint32_t)ramfont->bitmap;
uint32_t glyph_offset = (uint32_t)ramfont->glyph;
ramfont->bitmap = (uint8_t*)((uint32_t)font + bitmap_offset);
ramfont->glyph = (GFXglyph*)((uint32_t)font + glyph_offset);
if (font) {
uint32_t bitmap_offset = (uint32_t)ramfont->bitmap;
uint32_t glyph_offset = (uint32_t)ramfont->glyph;
ramfont->bitmap = (uint8_t*)((uint32_t)font + bitmap_offset);
ramfont->glyph = (GFXglyph*)((uint32_t)font + glyph_offset);
}
setFont(ramfont);
}
@ -588,6 +597,40 @@ void Renderer::scrollTo(uint16_t y) {
}
void Renderer::SetPwrCB(pwr_cb cb) {
}
void Renderer::SetDimCB(dim_cb cb) {
}
uint16_t Renderer::fgcol(void) {
return 0;
}
uint16_t Renderer::bgcol(void) {
return 0;
}
int8_t Renderer::color_type(void) {
return 0;
}
void Renderer::Splash(void) {
}
const char dname[1] = {0};
char *Renderer::devname(void) {
return (char*)dname;
}
LVGL_PARAMS *Renderer::lvgl_pars(void) {
return &lvgl_param;
}
#ifndef LVGL_RENDERER
void VButton::xdrawButton(bool inverted) {
wr_redir=1;
drawButton(inverted);
@ -683,7 +726,7 @@ uint16_t VButton::UpdateSlider(int16_t x, int16_t y) {
}
}
#endif // LVGL_RENDERER

View File

@ -9,15 +9,53 @@
#define WHITE 1
#define INVERSE 2
#define USE_EPD_FONTS
//#define USE_ALL_EPD_FONTS
//#define USE_GFX_FONTS
#define USE_TINY_FONT
#define USE_7SEG_FONT
#define MAX_INDEXCOLORS 32
//#define LVGL_RENDERER
#ifdef LVGL_RENDERER
#undef USE_EPD_FONTS
#endif
// depends on GFX driver
// GFX patched
// a. in class GFX setCursor,setTextSize => virtual
// b. textcolor,textbgcolor => public;
typedef struct LVGL_PARAMS {
uint16_t fluslines;
union {
uint8_t data;
struct {
uint8_t resvd_0 : 1;
uint8_t resvd_1 : 1;
uint8_t resvd_2 : 1;
uint8_t resvd_3 : 1;
uint8_t resvd_4 : 1;
uint8_t resvd_5 : 1;
uint8_t resvd_6 : 1;
uint8_t use_dma : 1;
};
};
}LVGL_PARAMS;
typedef void (*pwr_cb)(uint8_t);
typedef void (*dim_cb)(uint8_t);
#define USE_GFX
#ifdef USE_GFX
class Renderer : public Adafruit_GFX {
#else
class Renderer {
#endif
//Paint(unsigned char* image, int width, int height);
//~Renderer();
public:
@ -42,12 +80,24 @@ public:
virtual void setScrollMargins(uint16_t top, uint16_t bottom);
virtual void scrollTo(uint16_t y);
virtual void TS_RotConvert(int16_t *x, int16_t *y);
virtual void SetPwrCB(pwr_cb cb);
virtual void SetDimCB(dim_cb cb);
virtual uint16_t fgcol(void);
virtual uint16_t bgcol(void);
virtual int8_t color_type(void);
virtual void Splash(void);
virtual char *devname(void);
virtual LVGL_PARAMS *lvgl_pars(void);
void setDrawMode(uint8_t mode);
uint8_t drawmode;
virtual void FastString(uint16_t x,uint16_t y,uint16_t tcolor, const char* str);
void setTextSize(uint8_t s);
virtual uint8_t *allocate_framebuffer(uint32_t size);
pwr_cb pwr_cbp = 0;
dim_cb dim_cbp = 0;
LVGL_PARAMS lvgl_param;
int8_t disp_bpp;
private:
void DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored);
inline void drawFastVLineInternal(int16_t x, int16_t y, int16_t h, uint16_t color) __attribute__((always_inline));
@ -84,6 +134,7 @@ struct Slider {
uint16_t barcol;
};
#ifndef LVGL_RENDERER
class VButton : public Adafruit_GFX_Button {
public:
TButton_State vpower;
@ -94,6 +145,7 @@ class VButton : public Adafruit_GFX_Button {
uint16_t UpdateSlider(int16_t x, int16_t y);
void SliderInit(Renderer *rend, uint16_t xp, uint16_t yp, uint16_t xs, uint16_t ys, uint16_t nelem, uint16_t bgcol, uint16_t frcol, uint16_t barcol);
};
#endif // LVGL_RENDERER
#endif

View File

@ -74,6 +74,8 @@ void Epd::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
setTextColor(WHITE,BLACK);
setCursor(0,0);
fillScreen(BLACK);
disp_bpp = 1;
}
void Epd::Begin(int16_t cs,int16_t mosi,int16_t sclk) {

View File

@ -86,6 +86,8 @@ void Epd42::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
setTextColor(WHITE,BLACK);
setCursor(0,0);
fillScreen(BLACK);
disp_bpp = 1;
}
void Epd42::Begin(int16_t cs,int16_t mosi,int16_t sclk) {

View File

@ -530,7 +530,10 @@ void ili9342_bpwr(uint8_t on);
void ILI9341_2::DisplayOnff(int8_t on) {
if ((_hwspi >= 2) && (_bp < 0)) {
ili9342_bpwr(on);
//ili9342_bpwr(on);
if (pwr_cbp) {
pwr_cbp(on);
}
}
if (on) {
@ -604,7 +607,10 @@ void ILI9341_2::dim(uint8_t dim) {
ledcWrite(ESP32_PWM_CHANNEL,dimmer);
} else {
if (_hwspi>=2) {
ili9342_dimm(dim);
//ili9342_dimm(dim);
if (dim_cbp) {
dim_cbp(dim);
}
}
}
#endif

View File

@ -20,7 +20,7 @@
#include <Arduino.h>
#include "uDisplay.h"
#define UDSP_DEBUG
//#define UDSP_DEBUG
const uint16_t udisp_colors[]={UDISP_BLACK,UDISP_WHITE,UDISP_RED,UDISP_GREEN,UDISP_BLUE,UDISP_CYAN,UDISP_MAGENTA,\
UDISP_YELLOW,UDISP_NAVY,UDISP_DARKGREEN,UDISP_DARKCYAN,UDISP_MAROON,UDISP_PURPLE,UDISP_OLIVE,\
@ -31,6 +31,17 @@ uint16_t uDisplay::GetColorFromIndex(uint8_t index) {
return udisp_colors[index];
}
uint16_t uDisplay::fgcol(void) {
return fg_col;
}
uint16_t uDisplay::bgcol(void) {
return bg_col;
}
int8_t uDisplay::color_type(void) {
return col_type;
}
uDisplay::~uDisplay(void) {
if (framebuffer) {
@ -40,6 +51,8 @@ uDisplay::~uDisplay(void) {
uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
// analyse decriptor
pwr_cbp = 0;
dim_cbp = 0;
framebuffer = 0;
col_mode = 16;
sa_mode = 16;
@ -53,6 +66,9 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
lutftime = 350;
lut3time = 10;
ep_mode = 0;
fg_col = 1;
bg_col = 0;
splash_font = -1;
allcmd_mode = 0;
startline = 0xA1;
uint8_t section = 0;
@ -95,7 +111,7 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
}
if (*lp1 == ',') lp1++;
}
if (*lp1 != ':' && *lp1 != '\n') {
if (*lp1 != ':' && *lp1 != '\n' && *lp1 != ' ') { // Add space char
switch (section) {
case 'H':
// header line
@ -106,7 +122,8 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
setwidth(gxs);
gys = next_val(&lp1);
setheight(gys);
bpp = next_val(&lp1);
disp_bpp = next_val(&lp1);
bpp = abs(disp_bpp);
if (bpp == 1) {
col_type = uCOLOR_BW;
} else {
@ -269,14 +286,23 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
lutptime = next_val(&lp1);
lut3time = next_val(&lp1);
break;
case 'B':
lvgl_param.fluslines = next_val(&lp1);
lvgl_param.use_dma = next_val(&lp1);
break;
}
}
}
if (*lp == '\n') {
if (*lp == '\n' || *lp == ' ') { // Add space char
lp++;
} else {
lp = strchr(lp, '\n');
if (!lp) break;
if (!lp) {
lp = strchr(lp, ' ');
if (!lp) {
break;
}
}
lp++;
}
}
@ -348,15 +374,7 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
Renderer *uDisplay::Init(void) {
if (reset >= 0) {
pinMode(reset, OUTPUT);
digitalWrite(reset, HIGH);
delay(50);
digitalWrite(reset, LOW);
delay(50);
digitalWrite(reset, HIGH);
delay(200);
}
if (interface == _UDSP_I2C) {
if (wire_n == 0) {
@ -441,9 +459,18 @@ Renderer *uDisplay::Init(void) {
if (spi_nr == 1) {
uspi = &SPI;
uspi->begin(spi_clk, spi_miso, spi_mosi, -1);
if (lvgl_param.use_dma) {
spi_host = VSPI_HOST;
initDMA(spi_cs);
}
} else if (spi_nr == 2) {
uspi = new SPIClass(HSPI);
uspi->begin(spi_clk, spi_miso, spi_mosi, -1);
if (lvgl_param.use_dma) {
spi_host = HSPI_HOST;
initDMA(spi_cs);
}
} else {
pinMode(spi_clk, OUTPUT);
digitalWrite(spi_clk, LOW);
@ -452,6 +479,16 @@ Renderer *uDisplay::Init(void) {
}
#endif // ESP32
if (reset >= 0) {
pinMode(reset, OUTPUT);
digitalWrite(reset, HIGH);
delay(50);
digitalWrite(reset, LOW);
delay(50);
digitalWrite(reset, HIGH);
delay(200);
}
spiSettings = SPISettings((uint32_t)spi_speed*1000000, MSBFIRST, SPI_MODE3);
uint16_t index = 0;
@ -483,9 +520,20 @@ Renderer *uDisplay::Init(void) {
#ifdef UDSP_DEBUG
Serial.printf("\n");
#endif
if (args & 0x80) {
if (args&0x60) delay(500);
else delay(150);
if (args & 0x80) { // delay after the command
uint32_t delay_ms = 0;
switch (args & 0xE0) {
case 0x80: delay_ms = 150; break;
case 0xA0: delay_ms = 10; break;
case 0xE0: delay_ms = 500; break;
}
if (delay_ms > 0) {
delay(delay_ms);
#ifdef UDSP_DEBUG
Serial.printf("delay %d ms\n", delay_ms);
#endif
}
}
if (index >= dsp_ncmds) break;
}
@ -533,8 +581,10 @@ void uDisplay::DisplayInit(int8_t p, int8_t size, int8_t rot, int8_t font) {
setTextSize(size);
setTextColor(fg_col, bg_col);
setCursor(0,0);
fillScreen(bg_col);
Updateframe();
if (splash_font >= 0) {
fillScreen(bg_col);
Updateframe();
}
#ifdef UDSP_DEBUG
Serial.printf("Dsp Init complete \n");
@ -899,6 +949,9 @@ for(y=h; y>0; y--) {
void uDisplay::Splash(void) {
if (splash_font < 0) return;
if (ep_mode) {
Updateframe();
delay(lut3time * 10);
@ -911,12 +964,27 @@ void uDisplay::Splash(void) {
void uDisplay::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
if (bpp != 16) {
// just save params or update frame
if (!x0 && !y0 && !x1 && !y1) {
if (!ep_mode) {
Updateframe();
}
} else {
seta_xp1 = x0;
seta_xp2 = x1;
seta_yp1 = y0;
seta_yp2 = y1;
}
return;
}
if (!x0 && !y0 && !x1 && !y1) {
SPI_CS_HIGH
SPI_END_TRANSACTION
} else {
SPI_CS_LOW
SPI_BEGIN_TRANSACTION
SPI_CS_LOW
setAddrWindow_int(x0, y0, x1 - x0, y1 - y0 );
}
}
@ -971,14 +1039,95 @@ void uDisplay::setAddrWindow_int(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
}
void uDisplay::pushColors(uint16_t *data, uint16_t len, boolean first) {
#define CNV_B1_OR ((0x10<<11) | (0x20<<5) | 0x10)
static inline uint8_t ulv_color_to1(uint16_t color) {
if (color & CNV_B1_OR) {
return 1;
}
else {
return 0;
}
/*
// this needs optimization
if (((color>>11) & 0x10) || ((color>>5) & 0x20) || (color & 0x10)) {
return 1;
}
else {
return 0;
}*/
}
// convert to mono, these are framebuffer based
void uDisplay::pushColorsMono(uint16_t *data, uint16_t len) {
for (uint32_t y = seta_yp1; y < seta_yp2; y++) {
for (uint32_t x = seta_xp1; x < seta_xp2; x++) {
uint16_t color = *data++;
if (bpp == 1) color = ulv_color_to1(color);
drawPixel(x, y, color);
len--;
if (!len) return;
}
}
}
// swap high low byte
static inline void lvgl_color_swap(uint16_t *data, uint16_t len) { for (uint32_t i = 0; i < len; i++) (data[i] = data[i] << 8 | data[i] >> 8); }
void uDisplay::pushColors(uint16_t *data, uint16_t len, boolean not_swapped) {
uint16_t color;
while (len--) {
color = *data++;
WriteColor(color);
}
//Serial.printf("push %x - %d\n", (uint32_t)data, len);
if (not_swapped == false) {
// called from LVGL bytes are swapped
if (bpp != 16) {
lvgl_color_swap(data, len);
pushColorsMono(data, len);
return;
}
if ( (col_mode != 18) && (spi_dc >= 0) && (spi_nr <= 2) ) {
// special version 8 bit spi I or II
#ifdef ESP8266
lvgl_color_swap(data, len);
while (len--) {
uspi->write(*data++);
}
#else
if (lvgl_param.use_dma) {
pushPixelsDMA(data, len );
} else {
uspi->writeBytes((uint8_t*)data, len * 2);
}
#endif
} else {
// 9 bit and others
lvgl_color_swap(data, len);
while (len--) {
WriteColor(*data++);
}
}
} else {
// called from displaytext, no byte swap, currently no dma here
if (bpp != 16) {
pushColorsMono(data, len);
return;
}
if ( (col_mode != 18) && (spi_dc >= 0) && (spi_nr <= 2) ) {
// special version 8 bit spi I or II
#ifdef ESP8266
while (len--) {
uspi->write(*data++);
}
#else
uspi->writePixels(data, len * 2);
#endif
} else {
// 9 bit and others
while (len--) {
WriteColor(*data++);
}
}
}
}
void uDisplay::WriteColor(uint16_t color) {
@ -1092,7 +1241,11 @@ void uDisplay::DisplayOnff(int8_t on) {
return;
}
udisp_bpwr(on);
if (pwr_cbp) {
pwr_cbp(on);
}
// udisp_bpwr(on);
if (interface == _UDSP_I2C) {
if (on) {
@ -1162,7 +1315,10 @@ void uDisplay::dim(uint8_t dim) {
if (bpanel >= 0) {
ledcWrite(ESP32_PWM_CHANNEL, dimmer);
} else {
udisp_dimm(dim);
//udisp_dimm(dim);
if (dim_cbp) {
dim_cbp(dim);
}
}
#endif
@ -1203,7 +1359,7 @@ void uDisplay::TS_RotConvert(int16_t *x, int16_t *y) {
uint8_t uDisplay::strlen_ln(char *str) {
for (uint32_t cnt = 0; cnt < 256; cnt++) {
if (!str[cnt] || str[cnt] == '\n') return cnt;
if (!str[cnt] || str[cnt] == '\n' || str[cnt] == ' ') return cnt;
}
return 0;
}
@ -1684,3 +1840,159 @@ void uDisplay::drawFastHLine_EPD(int16_t x, int16_t y, int16_t w, uint16_t color
x++;
}
}
void uDisplay::beginTransaction(SPISettings s) {
#ifdef ESP32
if (lvgl_param.use_dma) {
dmaWait();
} else {
uspi->beginTransaction(s);
}
#else
uspi->beginTransaction(s);
#endif
}
void uDisplay::endTransaction(void) {
#ifdef ESP32
if (lvgl_param.use_dma) {
dmaBusy();
} else {
uspi->endTransaction();
}
#else
uspi->endTransaction();
#endif
}
// ESP 32 DMA section , derived from TFT_eSPI
#ifdef ESP32
/***************************************************************************************
** Function name: initDMA
** Description: Initialise the DMA engine - returns true if init OK
***************************************************************************************/
bool uDisplay::initDMA(bool ctrl_cs)
{
if (DMA_Enabled) return false;
esp_err_t ret;
spi_bus_config_t buscfg = {
.mosi_io_num = spi_mosi,
.miso_io_num = -1,
.sclk_io_num = spi_clk,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = width() * height() * 2 + 8, // TFT screen size
.flags = 0,
.intr_flags = 0
};
int8_t pin = -1;
if (ctrl_cs) pin = spi_cs;
spi_device_interface_config_t devcfg = {
.command_bits = 0,
.address_bits = 0,
.dummy_bits = 0,
.mode = SPI_MODE3,
.duty_cycle_pos = 0,
.cs_ena_pretrans = 0,
.cs_ena_posttrans = 0,
.clock_speed_hz = spi_speed*1000000,
.input_delay_ns = 0,
.spics_io_num = pin,
.flags = SPI_DEVICE_NO_DUMMY, //0,
.queue_size = 1,
.pre_cb = 0, //dc_callback, //Callback to handle D/C line
.post_cb = 0
};
ret = spi_bus_initialize(spi_host, &buscfg, 1);
ESP_ERROR_CHECK(ret);
ret = spi_bus_add_device(spi_host, &devcfg, &dmaHAL);
ESP_ERROR_CHECK(ret);
DMA_Enabled = true;
spiBusyCheck = 0;
return true;
}
/***************************************************************************************
** Function name: deInitDMA
** Description: Disconnect the DMA engine from SPI
***************************************************************************************/
void uDisplay::deInitDMA(void) {
if (!DMA_Enabled) return;
spi_bus_remove_device(dmaHAL);
spi_bus_free(spi_host);
DMA_Enabled = false;
}
/***************************************************************************************
** Function name: dmaBusy
** Description: Check if DMA is busy
***************************************************************************************/
bool uDisplay::dmaBusy(void) {
if (!DMA_Enabled || !spiBusyCheck) return false;
spi_transaction_t *rtrans;
esp_err_t ret;
uint8_t checks = spiBusyCheck;
for (int i = 0; i < checks; ++i) {
ret = spi_device_get_trans_result(dmaHAL, &rtrans, 0);
if (ret == ESP_OK) spiBusyCheck--;
}
//Serial.print("spiBusyCheck=");Serial.println(spiBusyCheck);
if (spiBusyCheck == 0) return false;
return true;
}
/***************************************************************************************
** Function name: dmaWait
** Description: Wait until DMA is over (blocking!)
***************************************************************************************/
void uDisplay::dmaWait(void) {
if (!DMA_Enabled || !spiBusyCheck) return;
spi_transaction_t *rtrans;
esp_err_t ret;
for (int i = 0; i < spiBusyCheck; ++i) {
ret = spi_device_get_trans_result(dmaHAL, &rtrans, portMAX_DELAY);
assert(ret == ESP_OK);
}
spiBusyCheck = 0;
}
/***************************************************************************************
** Function name: pushPixelsDMA
** Description: Push pixels to TFT (len must be less than 32767)
***************************************************************************************/
// This will byte swap the original image if setSwapBytes(true) was called by sketch.
void uDisplay::pushPixelsDMA(uint16_t* image, uint32_t len) {
if ((len == 0) || (!DMA_Enabled)) return;
dmaWait();
esp_err_t ret;
memset(&trans, 0, sizeof(spi_transaction_t));
trans.user = (void *)1;
trans.tx_buffer = image; //finally send the line data
trans.length = len * 16; //Data length, in bits
trans.flags = 0; //SPI_TRANS_USE_TXDATA flag
ret = spi_device_queue_trans(dmaHAL, &trans, portMAX_DELAY);
assert(ret == ESP_OK);
spiBusyCheck++;
}
#endif // ESP32

View File

@ -5,6 +5,9 @@
#include <renderer.h>
#include <Wire.h>
#include <SPI.h>
#ifdef ESP32
#include "driver/spi_master.h"
#endif
#define _UDSP_I2C 1
#define _UDSP_SPI 2
@ -58,8 +61,8 @@ enum uColorType { uCOLOR_BW, uCOLOR_COLOR };
#endif
#define SPI_BEGIN_TRANSACTION if (spi_nr <= 2) uspi->beginTransaction(spiSettings);
#define SPI_END_TRANSACTION if (spi_nr <= 2) uspi->endTransaction();
#define SPI_BEGIN_TRANSACTION if (spi_nr <= 2) beginTransaction(spiSettings);
#define SPI_END_TRANSACTION if (spi_nr <= 2) endTransaction();
#define SPI_CS_LOW if (spi_cs >= 0) GPIO_CLR(spi_cs);
#define SPI_CS_HIGH if (spi_cs >= 0) GPIO_SET(spi_cs);
#define SPI_DC_LOW if (spi_dc >= 0) GPIO_CLR(spi_dc);
@ -79,9 +82,9 @@ class uDisplay : public Renderer {
void DisplayOnff(int8_t on);
void Splash(void);
char *devname(void);
uint16_t fgcol(void) const { return fg_col; };
uint16_t bgcol(void) const { return bg_col; };
int8_t color_type(void) const { return col_type; };
uint16_t fgcol(void);
uint16_t bgcol(void);
int8_t color_type(void);
void dim(uint8_t dim);
uint16_t GetColorFromIndex(uint8_t index);
void setRotation(uint8_t m);
@ -90,8 +93,12 @@ class uDisplay : public Renderer {
void pushColors(uint16_t *data, uint16_t len, boolean first);
void TS_RotConvert(int16_t *x, int16_t *y);
void invertDisplay(boolean i);
void SetPwrCB(pwr_cb cb) { pwr_cbp = cb; };
void SetDimCB(dim_cb cb) { dim_cbp = cb; };
private:
void beginTransaction(SPISettings s);
void endTransaction(void);
void setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
void drawPixel(int16_t x, int16_t y, uint16_t color);
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
@ -156,8 +163,8 @@ class uDisplay : public Renderer {
uint8_t dsp_on;
uint8_t dsp_off;
uint8_t allcmd_mode;
uint16_t splash_font;
uint16_t splash_size;
int8_t splash_font;
uint8_t splash_size;
uint16_t splash_xp;
uint16_t splash_yp;
uint16_t fg_col;
@ -203,6 +210,25 @@ class uDisplay : public Renderer {
uint8_t lut_array[LUTMAXSIZE][5];
uint8_t lut_cnt[5];
uint8_t lut_cmd[5];
uint16_t seta_xp1;
uint16_t seta_xp2;
uint16_t seta_yp1;
uint16_t seta_yp2;
void pushColorsMono(uint16_t *data, uint16_t len);
#ifdef ESP32
// dma section
bool DMA_Enabled = false;
uint8_t spiBusyCheck = 0;
spi_transaction_t trans;
spi_device_handle_t dmaHAL;
spi_host_device_t spi_host = VSPI_HOST;
// spi_host_device_t spi_host = VSPI_HOST;
bool initDMA(bool ctrl_cs);
void deInitDMA(void);
bool dmaBusy(void);
void dmaWait(void);
void pushPixelsDMA(uint16_t* image, uint32_t len);
#endif // ESP32
};

View File

@ -25,6 +25,7 @@ SOFTWARE.
#include "RA8876.h"
#include <limits.h>
uint8_t initdone;
/* TODO
font 0 x and y size with line,col cmd
@ -123,6 +124,9 @@ uint8_t RA8876::readStatus(void) {
void RA8876::writeReg(uint8_t reg, uint8_t x) {
writeCmd(reg);
writeData(x);
if (!initdone) {
// Serial.printf("%02x, %02x\n", reg, x);
}
}
// Like writeReg(), but does two successive register writes of a 16-bit value, low byte first.
@ -481,6 +485,9 @@ void RA8876::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
}
bool RA8876::initDisplay() {
lvgl_param.fluslines = 10;
SPI.beginTransaction(m_spiSettings);
// Set chip config register
@ -590,7 +597,7 @@ bool RA8876::initDisplay() {
// TODO: Track backlight pin and turn on backlight
SPI.endTransaction();
initdone = 1;
return true;
}
@ -932,19 +939,25 @@ void RA8876::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
SPI.endTransaction();
}
void RA8876::pushColors(uint16_t *data, uint16_t len, boolean first) {
static inline void lvgl_color_swap1(uint16_t *data, uint16_t len) { for (uint32_t i = 0; i < len; i++) (data[i] = data[i] << 8 | data[i] >> 8); }
void RA8876::pushColors(uint16_t *data, uint16_t len, boolean not_swapped) {
if (not_swapped == false) {
lvgl_color_swap1(data, len);
}
SPI.beginTransaction(m_spiSettings);
//RA8876_CS_LOW
while (len--) {
uint16_t color=*data++;
uint16_t color = *data++;
#if 0
SPI.transfer(RA8876_DATA_WRITE);
SPI.transfer(color&0xff);
SPI.transfer(RA8876_DATA_WRITE);
SPI.transfer(color>>8);
#else
//waitWriteFifo();
@ -1453,3 +1466,128 @@ void RA8876::FastString(uint16_t x,uint16_t y,uint16_t tcolor, const char* str)
setTextColor(tcolor,textbgcolor);
xwrite((uint8_t*)str,strlen(str));
}
// ESP 32 DMA section , derived from TFT_eSPI
#ifdef ESP32
/***************************************************************************************
** Function name: initDMA
** Description: Initialise the DMA engine - returns true if init OK
***************************************************************************************/
bool RA8876::initDMA()
{
if (DMA_Enabled) return false;
esp_err_t ret;
spi_bus_config_t buscfg = {
.mosi_io_num = _mosi,
.miso_io_num = _miso,
.sclk_io_num = _sclk,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = width() * height() * 2 + 8, // TFT screen size
.flags = 0,
.intr_flags = 0
};
spi_device_interface_config_t devcfg = {
.command_bits = 0,
.address_bits = 0,
.dummy_bits = 0,
.mode = SPI_MODE3,
.duty_cycle_pos = 0,
.cs_ena_pretrans = 0,
.cs_ena_posttrans = 0,
.clock_speed_hz = RA8876_SPI_SPEED,
.input_delay_ns = 0,
.spics_io_num = m_csPin,
.flags = SPI_DEVICE_NO_DUMMY, //0,
.queue_size = 1,
.pre_cb = 0, //dc_callback, //Callback to handle D/C line
.post_cb = 0
};
ret = spi_bus_initialize(spi_host, &buscfg, 1);
ESP_ERROR_CHECK(ret);
ret = spi_bus_add_device(spi_host, &devcfg, &dmaHAL);
ESP_ERROR_CHECK(ret);
DMA_Enabled = true;
spiBusyCheck = 0;
return true;
}
/***************************************************************************************
** Function name: deInitDMA
** Description: Disconnect the DMA engine from SPI
***************************************************************************************/
void RA8876::deInitDMA(void) {
if (!DMA_Enabled) return;
spi_bus_remove_device(dmaHAL);
spi_bus_free(spi_host);
DMA_Enabled = false;
}
/***************************************************************************************
** Function name: dmaBusy
** Description: Check if DMA is busy
***************************************************************************************/
bool RA8876::dmaBusy(void) {
if (!DMA_Enabled || !spiBusyCheck) return false;
spi_transaction_t *rtrans;
esp_err_t ret;
uint8_t checks = spiBusyCheck;
for (int i = 0; i < checks; ++i) {
ret = spi_device_get_trans_result(dmaHAL, &rtrans, 0);
if (ret == ESP_OK) spiBusyCheck--;
}
//Serial.print("spiBusyCheck=");Serial.println(spiBusyCheck);
if (spiBusyCheck == 0) return false;
return true;
}
/***************************************************************************************
** Function name: dmaWait
** Description: Wait until DMA is over (blocking!)
***************************************************************************************/
void RA8876::dmaWait(void) {
if (!DMA_Enabled || !spiBusyCheck) return;
spi_transaction_t *rtrans;
esp_err_t ret;
for (int i = 0; i < spiBusyCheck; ++i) {
ret = spi_device_get_trans_result(dmaHAL, &rtrans, portMAX_DELAY);
assert(ret == ESP_OK);
}
spiBusyCheck = 0;
}
/***************************************************************************************
** Function name: pushPixelsDMA
** Description: Push pixels to TFT (len must be less than 32767)
***************************************************************************************/
// This will byte swap the original image if setSwapBytes(true) was called by sketch.
void RA8876::pushPixelsDMA(uint16_t* image, uint32_t len) {
if ((len == 0) || (!DMA_Enabled)) return;
dmaWait();
esp_err_t ret;
memset(&trans, 0, sizeof(spi_transaction_t));
trans.user = (void *)1;
trans.tx_buffer = image; //finally send the line data
trans.length = len * 16; //Data length, in bits
trans.flags = 0; //SPI_TRANS_USE_TXDATA flag
ret = spi_device_queue_trans(dmaHAL, &trans, portMAX_DELAY);
assert(ret == ESP_OK);
spiBusyCheck++;
}
#endif // ESP32

View File

@ -22,6 +22,9 @@
#include "Arduino.h"
#include <SPI.h>
#include <renderer.h>
#ifdef ESP32
#include "driver/spi_master.h"
#endif
#undef SPRINT
#define SPRINT(A) {char str[32];sprintf(str,"val: %d ",A);Serial.println((char*)str);}
@ -147,7 +150,7 @@ typedef uint8_t FontFlags;
// 1MHz. TODO: Figure out actual speed to use
// Data sheet section 5.2 says maximum SPI clock is 50MHz.
//#define RA8876_SPI_SPEED 10000000
#define RA8876_SPI_SPEED 20000000
#define RA8876_SPI_SPEED 25000000
// With SPI, the RA8876 expects an initial byte where the top two bits are meaningful. Bit 7
// is A0, bit 6 is WR#. See data sheet section 7.3.2 and section 19.
@ -565,6 +568,21 @@ class RA8876 : public Renderer {
enum FontSource m_fontSource;
enum FontSize m_fontSize;
FontFlags m_fontFlags;
#ifdef ESP32
// dma section
bool DMA_Enabled = false;
uint8_t spiBusyCheck = 0;
spi_transaction_t trans;
spi_device_handle_t dmaHAL;
spi_host_device_t spi_host = VSPI_HOST;
// spi_host_device_t spi_host = VSPI_HOST;
bool initDMA();
void deInitDMA(void);
bool dmaBusy(void);
void dmaWait(void);
void pushPixelsDMA(uint16_t* image, uint32_t len);
#endif // ESP32
};
#endif

View File

@ -1,9 +1,9 @@
name=RA8876
version=1.0.0
author=Jaret Burkett / Gerhard Mutz
maintainer=Gerhard Mutz
sentence=Tasmota Library for RA8876 displays
paragraph=Tasmota Library for RA8876 displays
version=1.0.2
author=Jaret Burkett
maintainer=Jaret Burkett <jaretburkett@gmail.com>
sentence=Library for RA8876 displays
paragraph=Library for RA8876 displays
category=Display
url=https://github.com/arendst/Tasmota
url=https://github.com/jaretburkett/ILI9488
architectures=*

View File

@ -4,9 +4,7 @@
* To use: `d = Driver()`
*
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_gc.h"
#include "be_constobj.h"
extern int d_getTasmotaGlob(bvm *vm);
@ -30,8 +28,8 @@ static const bupvaldesc add_cmd_0_upvals[2] = {
be_local_const_upval(1, 0),
};
be_define_local_const_str(add_cmd_0_str_name, "add_cmd_0", 607256038, 0, 8, 0);
be_define_local_const_str(add_cmd_0_str_source, "input", -103256197, 0, 5, 0);
be_define_local_const_str(add_cmd_0_str_name, "add_cmd_0", 607256038, 8);
be_define_local_const_str(add_cmd_0_str_source, "input", -103256197, 5);
static const uint32_t add_cmd_0_code[8] = {
0x68100000, // 0000 GETUPV R4 U0
@ -51,10 +49,10 @@ static const bproto *add_cmd_subproto[1] = {
&add_cmd_0_proto,
};
be_define_local_const_str(add_cmd_str_name, "add_cmd", -933336417, 0, 7, 0);
be_define_local_const_str(add_cmd_str_source, "input", -103256197, 0, 5, 0);
be_define_local_const_str(add_cmd_str_0, "get_tasmota", 334356779, 0, 11, 0);
be_define_local_const_str(add_cmd_str_1, "add_cmd", -933336417, 0, 7, 0);
be_define_local_const_str(add_cmd_str_name, "add_cmd", -933336417, 7);
be_define_local_const_str(add_cmd_str_source, "input", -103256197, 5);
be_define_local_const_str(add_cmd_str_0, "get_tasmota", 334356779, 11);
be_define_local_const_str(add_cmd_str_1, "add_cmd", -933336417, 7);
static const bvalue add_cmd_ktab[2] = {
{ { .s=be_local_const_str(add_cmd_str_0) }, BE_STRING},
@ -77,10 +75,14 @@ be_define_local_closure(add_cmd);
/*******************************************************************/
// #if !BE_USE_PRECOMPILED_OBJECT
#if 1 // TODO we will do pre-compiled later
void be_load_driverlib(bvm *vm)
{
#if BE_USE_PRECOMPILED_OBJECT
#include "../generate/be_fixed_be_class_tasmota_driver.h"
#endif
void be_load_driverlib(bvm *vm) {
#if !BE_USE_PRECOMPILED_OBJECT
static const bnfuncinfo members[] = {
{ "every_second", NULL },
{ "every_100ms", NULL },
@ -99,12 +101,26 @@ void be_load_driverlib(bvm *vm)
{ NULL, NULL }
};
be_regclass(vm, "Driver", members);
}
#else
be_pushntvclass(vm, &be_class_tasmota_driver);
be_setglobal(vm, "Driver");
be_pop(vm, 1);
#endif
}
/* @const_object_info_begin
module tasmota (scope: global, depend: 1) {
get_free_heap, func(l_getFreeHeap)
class be_class_tasmota_driver (scope: global, name: Driver) {
every_second, var
every_100ms, var
web_add_button, var
web_add_main_button, var
save_before_restart, var
web_sensor, var
json_append, var
button_pressed, var
get_tasmota, func(d_getTasmotaGlob)
add_cmd, closure(add_cmd_closure)
}
@const_object_info_end */
#include "../generate/be_fixed_tasmota.h"
#endif

View File

@ -5,12 +5,13 @@
*
* read power values
*******************************************************************/
#include "be_object.h"
#include "be_constobj.h"
#ifdef USE_ENERGY_SENSOR
extern int b_nrg_read(bvm *vm);
// #if !BE_USE_PRECOMPILED_OBJECT
#if 1 // TODO we will do pre-compiled later
#if !BE_USE_PRECOMPILED_OBJECT
be_native_module_attr_table(energy) {
be_native_module_function("read", b_nrg_read),
};
@ -18,9 +19,11 @@ be_native_module_attr_table(energy) {
be_define_native_module(energy, NULL);
#else
/* @const_object_info_begin
module tasmota (scope: global, depend: 1) {
get_free_heap, func(l_getFreeHeap)
module energy (scope: global) {
read, func(b_nrg_read)
}
@const_object_info_end */
#include "../generate/be_fixed_tasmota.h"
#include "../generate/be_fixed_energy.h"
#endif
#endif // USE_ENERGY_SENSOR

View File

@ -5,7 +5,7 @@
*
* read power values
*******************************************************************/
#include "be_object.h"
#include "be_constobj.h"
// Tasmota specific
@ -17,7 +17,6 @@ extern int gp_pin_used(bvm *vm);
extern int gp_pin(bvm *vm);
#if !BE_USE_PRECOMPILED_OBJECT
// #if 1 // TODO we will do pre-compiled later
be_native_module_attr_table(gpio) {
// HIGH/LOW
be_native_module_int("LOW", 0),
@ -290,7 +289,7 @@ be_native_module_attr_table(gpio) {
be_define_native_module(gpio, NULL);
#else
/* @const_object_info_begin
module gpio (scope: global, depend: BE_USE_TASMOTA) {
module gpio (scope: global) {
LOW, int(0)
HIGH, int(1)

View File

@ -3,11 +3,9 @@
*
* To use: `import tasmota`
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_gc.h"
#include "be_constobj.h"
#ifdef USE_LIGHT
extern int l_getlight(bvm *vm);
extern int l_setlight(bvm *vm);
@ -15,8 +13,7 @@ extern int l_gamma8(bvm *vm);
extern int l_gamma10(bvm *vm);
extern int l_rev_gamma10(bvm *vm);
// #if !BE_USE_PRECOMPILED_OBJECT
#if 1 // TODO we will do pre-compiled later
#if !BE_USE_PRECOMPILED_OBJECT
be_native_module_attr_table(light) {
@ -33,9 +30,16 @@ be_define_native_module(light, NULL);
#else
/* @const_object_info_begin
module tasmota (scope: global, depend: 1) {
get_free_heap, func(l_getFreeHeap)
module light (scope: global) {
get, func(l_getlight)
set, func(l_setlight)
gamma8, func(l_gamma8)
gamma10, func(l_gamma10)
reverse_gamma10, func(l_rev_gamma10)
}
@const_object_info_end */
#include "../generate/be_fixed_tasmota.h"
#include "../generate/be_fixed_light.h"
#endif
#endif // USE_LIGHT

View File

@ -4,9 +4,7 @@
/********************************************************************
* LVGL Module
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_gc.h"
#include "be_constobj.h"
#ifdef USE_LVGL
@ -14,6 +12,8 @@
extern int lv0_start(bvm *vm);
extern int lv0_load_montserrat_font(bvm *vm);
extern int lv0_load_seg7_font(bvm *vm);
extern int lv0_load_font(bvm *vm);
extern int lv0_scr_act(bvm *vm);
extern int lv0_layer_top(bvm *vm);
@ -611,6 +611,9 @@ be_native_module_attr_table(lvgl) {
be_native_module_function("start", lv0_start),
be_native_module_function("montserrat_font", lv0_load_montserrat_font),
be_native_module_function("seg7_font", lv0_load_seg7_font),
be_native_module_function("load_font", lv0_load_font),
// screen and layers
be_native_module_function("scr_act", lv0_scr_act),
@ -627,67 +630,67 @@ be_define_native_module(lvgl, NULL);
#else
be_define_local_const_str(SYMBOL_AUDIO, "\xef\x80\x81", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_VIDEO, "\xef\x80\x88", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_LIST, "\xef\x80\x8b", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_OK, "\xef\x80\x8c", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_CLOSE, "\xef\x80\x8d", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_POWER, "\xef\x80\x91", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_SETTINGS, "\xef\x80\x93", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_HOME, "\xef\x80\x95", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_DOWNLOAD, "\xef\x80\x99", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_DRIVE, "\xef\x80\x9c", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_REFRESH, "\xef\x80\xa1", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_MUTE, "\xef\x80\xa6", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_VOLUME_MID, "\xef\x80\xa7", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_VOLUME_MAX, "\xef\x80\xa8", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_IMAGE, "\xef\x80\xbe", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_EDIT, "\xef\x8C\x84", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_PREV, "\xef\x81\x88", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_PLAY, "\xef\x81\x8b", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_PAUSE, "\xef\x81\x8c", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_STOP, "\xef\x81\x8d", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_NEXT, "\xef\x81\x91", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_EJECT, "\xef\x81\x92", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_LEFT, "\xef\x81\x93", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_RIGHT, "\xef\x81\x94", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_PLUS, "\xef\x81\xa7", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_MINUS, "\xef\x81\xa8", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_EYE_OPEN, "\xef\x81\xae", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_EYE_CLOSE, "\xef\x81\xb0", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_WARNING, "\xef\x81\xb1", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_SHUFFLE, "\xef\x81\xb4", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_UP, "\xef\x81\xb7", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_DOWN, "\xef\x81\xb8", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_LOOP, "\xef\x81\xb9", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_DIRECTORY, "\xef\x81\xbb", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_UPLOAD, "\xef\x82\x93", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_CALL, "\xef\x82\x95", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_CUT, "\xef\x83\x84", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_COPY, "\xef\x83\x85", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_SAVE, "\xef\x83\x87", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_CHARGE, "\xef\x83\xa7", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_PASTE, "\xef\x83\xAA", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BELL, "\xef\x83\xb3", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_KEYBOARD, "\xef\x84\x9c", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_GPS, "\xef\x84\xa4", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_FILE, "\xef\x85\x9b", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_WIFI, "\xef\x87\xab", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BATTERY_FULL, "\xef\x89\x80", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BATTERY_3, "\xef\x89\x81", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BATTERY_2, "\xef\x89\x82", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BATTERY_1, "\xef\x89\x83", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BATTERY_EMPTY, "\xef\x89\x84", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_USB, "\xef\x8a\x87", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BLUETOOTH, "\xef\x8a\x93", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_TRASH, "\xef\x8B\xAD", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BACKSPACE, "\xef\x95\x9A", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_SD_CARD, "\xef\x9F\x82", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_NEW_LINE, "\xef\xA2\xA2", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_AUDIO, "\xef\x80\x81", 0, 3);
be_define_local_const_str(SYMBOL_VIDEO, "\xef\x80\x88", 0, 3);
be_define_local_const_str(SYMBOL_LIST, "\xef\x80\x8b", 0, 3);
be_define_local_const_str(SYMBOL_OK, "\xef\x80\x8c", 0, 3);
be_define_local_const_str(SYMBOL_CLOSE, "\xef\x80\x8d", 0, 3);
be_define_local_const_str(SYMBOL_POWER, "\xef\x80\x91", 0, 3);
be_define_local_const_str(SYMBOL_SETTINGS, "\xef\x80\x93", 0, 3);
be_define_local_const_str(SYMBOL_HOME, "\xef\x80\x95", 0, 3);
be_define_local_const_str(SYMBOL_DOWNLOAD, "\xef\x80\x99", 0, 3);
be_define_local_const_str(SYMBOL_DRIVE, "\xef\x80\x9c", 0, 3);
be_define_local_const_str(SYMBOL_REFRESH, "\xef\x80\xa1", 0, 3);
be_define_local_const_str(SYMBOL_MUTE, "\xef\x80\xa6", 0, 3);
be_define_local_const_str(SYMBOL_VOLUME_MID, "\xef\x80\xa7", 0, 3);
be_define_local_const_str(SYMBOL_VOLUME_MAX, "\xef\x80\xa8", 0, 3);
be_define_local_const_str(SYMBOL_IMAGE, "\xef\x80\xbe", 0, 3);
be_define_local_const_str(SYMBOL_EDIT, "\xef\x8C\x84", 0, 3);
be_define_local_const_str(SYMBOL_PREV, "\xef\x81\x88", 0, 3);
be_define_local_const_str(SYMBOL_PLAY, "\xef\x81\x8b", 0, 3);
be_define_local_const_str(SYMBOL_PAUSE, "\xef\x81\x8c", 0, 3);
be_define_local_const_str(SYMBOL_STOP, "\xef\x81\x8d", 0, 3);
be_define_local_const_str(SYMBOL_NEXT, "\xef\x81\x91", 0, 3);
be_define_local_const_str(SYMBOL_EJECT, "\xef\x81\x92", 0, 3);
be_define_local_const_str(SYMBOL_LEFT, "\xef\x81\x93", 0, 3);
be_define_local_const_str(SYMBOL_RIGHT, "\xef\x81\x94", 0, 3);
be_define_local_const_str(SYMBOL_PLUS, "\xef\x81\xa7", 0, 3);
be_define_local_const_str(SYMBOL_MINUS, "\xef\x81\xa8", 0, 3);
be_define_local_const_str(SYMBOL_EYE_OPEN, "\xef\x81\xae", 0, 3);
be_define_local_const_str(SYMBOL_EYE_CLOSE, "\xef\x81\xb0", 0, 3);
be_define_local_const_str(SYMBOL_WARNING, "\xef\x81\xb1", 0, 3);
be_define_local_const_str(SYMBOL_SHUFFLE, "\xef\x81\xb4", 0, 3);
be_define_local_const_str(SYMBOL_UP, "\xef\x81\xb7", 0, 3);
be_define_local_const_str(SYMBOL_DOWN, "\xef\x81\xb8", 0, 3);
be_define_local_const_str(SYMBOL_LOOP, "\xef\x81\xb9", 0, 3);
be_define_local_const_str(SYMBOL_DIRECTORY, "\xef\x81\xbb", 0, 3);
be_define_local_const_str(SYMBOL_UPLOAD, "\xef\x82\x93", 0, 3);
be_define_local_const_str(SYMBOL_CALL, "\xef\x82\x95", 0, 3);
be_define_local_const_str(SYMBOL_CUT, "\xef\x83\x84", 0, 3);
be_define_local_const_str(SYMBOL_COPY, "\xef\x83\x85", 0, 3);
be_define_local_const_str(SYMBOL_SAVE, "\xef\x83\x87", 0, 3);
be_define_local_const_str(SYMBOL_CHARGE, "\xef\x83\xa7", 0, 3);
be_define_local_const_str(SYMBOL_PASTE, "\xef\x83\xAA", 0, 3);
be_define_local_const_str(SYMBOL_BELL, "\xef\x83\xb3", 0, 3);
be_define_local_const_str(SYMBOL_KEYBOARD, "\xef\x84\x9c", 0, 3);
be_define_local_const_str(SYMBOL_GPS, "\xef\x84\xa4", 0, 3);
be_define_local_const_str(SYMBOL_FILE, "\xef\x85\x9b", 0, 3);
be_define_local_const_str(SYMBOL_WIFI, "\xef\x87\xab", 0, 3);
be_define_local_const_str(SYMBOL_BATTERY_FULL, "\xef\x89\x80", 0, 3);
be_define_local_const_str(SYMBOL_BATTERY_3, "\xef\x89\x81", 0, 3);
be_define_local_const_str(SYMBOL_BATTERY_2, "\xef\x89\x82", 0, 3);
be_define_local_const_str(SYMBOL_BATTERY_1, "\xef\x89\x83", 0, 3);
be_define_local_const_str(SYMBOL_BATTERY_EMPTY, "\xef\x89\x84", 0, 3);
be_define_local_const_str(SYMBOL_USB, "\xef\x8a\x87", 0, 3);
be_define_local_const_str(SYMBOL_BLUETOOTH, "\xef\x8a\x93", 0, 3);
be_define_local_const_str(SYMBOL_TRASH, "\xef\x8B\xAD", 0, 3);
be_define_local_const_str(SYMBOL_BACKSPACE, "\xef\x95\x9A", 0, 3);
be_define_local_const_str(SYMBOL_SD_CARD, "\xef\x9F\x82", 0, 3);
be_define_local_const_str(SYMBOL_NEW_LINE, "\xef\xA2\xA2", 0, 3);
be_define_local_const_str(SYMBOL_DUMMY, "\xEF\xA3\xBF", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_DUMMY, "\xEF\xA3\xBF", 0, 3);
be_define_local_const_str(SYMBOL_BULLET, "\xE2\x80\xA2", 0, 0, 3, 0);
be_define_local_const_str(SYMBOL_BULLET, "\xE2\x80\xA2", 0, 3);
/* @const_object_info_begin
@ -1148,6 +1151,8 @@ module lvgl (scope: global) {
start, func(lv0_start)
montserrat_font, func(lv0_load_montserrat_font)
seg7_font, func(lv0_load_seg7_font)
load_font, func(lv0_load_font)
scr_act, func(lv0_scr_act)
layer_top, func(lv0_layer_top)

View File

@ -1,8 +1,7 @@
/********************************************************************
* Tasmota LVGL Font class
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_constobj.h"
#ifdef USE_LVGL

View File

@ -1,8 +1,7 @@
/********************************************************************
* Tasmota LVGL Font class
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_constobj.h"
#ifdef USE_LVGL

View File

@ -6,8 +6,7 @@
/********************************************************************
* Tasmota LVGL classes for widgets
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_constobj.h"
#ifdef USE_LVGL

View File

@ -63,15 +63,19 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = {
&be_native_module(solidify),
#endif
/* user-defined modules register start */
#if BE_USE_TASMOTA
&be_native_module(gpio),
#ifdef USE_LIGHT
&be_native_module(light),
#endif
#ifdef USE_LVGL
&be_native_module(lvgl),
#endif // USE_LVGL
#ifdef USE_ENERGY_SENSOR
&be_native_module(energy),
#endif
#endif // USE_ENERGY_SENSOR
/* user-defined modules register end */
NULL /* do not remove */
@ -98,7 +102,9 @@ BERRY_API void be_load_custom_libs(bvm *vm)
/* be_load_xxxlib(vm); */
#endif
be_load_tasmota_ntvlib(vm);
#ifdef USE_I2C
be_load_wirelib(vm);
#endif // USE_I2C
be_load_driverlib(vm);
#ifdef USE_LVGL
// LVGL

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
*
* 2 wire communication - I2C
*******************************************************************/
#include "be_object.h"
#include "be_string.h"
#include "be_gc.h"
#include "be_constobj.h"
#ifdef USE_I2C
extern int b_wire_init(bvm *vm);
@ -41,14 +41,14 @@ extern int b_wire_detect(bvm *vm);
** Solidified function: read_bytes
********************************************************************/
be_define_local_const_str(read_bytes_str_name, "read_bytes", -718234123, 0, 10, 0);
be_define_local_const_str(read_bytes_str_source, "string", 398550328, 0, 6, 0);
be_define_local_const_str(read_bytes_str_0, "_begin_transmission", -1515506120, 0, 19, 0);
be_define_local_const_str(read_bytes_str_1, "_write", -2079504471, 0, 6, 0);
be_define_local_const_str(read_bytes_str_2, "_end_transmission", -1057486896, 0, 17, 0);
be_define_local_const_str(read_bytes_str_3, "_request_from", -329818692, 0, 13, 0);
be_define_local_const_str(read_bytes_str_4, "_available", 1306196581, 0, 10, 0);
be_define_local_const_str(read_bytes_str_5, "_read", 346717030, 0, 5, 0);
be_define_local_const_str(read_bytes_str_name, "read_bytes", -718234123, 10);
be_define_local_const_str(read_bytes_str_source, "string", 398550328, 6);
be_define_local_const_str(read_bytes_str_0, "_begin_transmission", -1515506120, 19);
be_define_local_const_str(read_bytes_str_1, "_write", -2079504471, 6);
be_define_local_const_str(read_bytes_str_2, "_end_transmission", -1057486896, 17);
be_define_local_const_str(read_bytes_str_3, "_request_from", -329818692, 13);
be_define_local_const_str(read_bytes_str_4, "_available", 1306196581, 10);
be_define_local_const_str(read_bytes_str_5, "_read", 346717030, 5);
static const bvalue read_bytes_ktab[6] = {
{ { .s=be_local_const_str(read_bytes_str_0) }, BE_STRING},
@ -139,11 +139,11 @@ const bclosure read_bytes_closure = {
** Solidified function: write_bytes
********************************************************************/
be_define_local_const_str(write_bytes_str_name, "write_bytes", 1227543792, 0, 11, 0);
be_define_local_const_str(write_bytes_str_source, "string", 398550328, 0, 6, 0);
be_define_local_const_str(write_bytes_str_0, "_begin_transmission", -1515506120, 0, 19, 0);
be_define_local_const_str(write_bytes_str_1, "_write", -2079504471, 0, 6, 0);
be_define_local_const_str(write_bytes_str_2, "_end_transmission", -1057486896, 0, 17, 0);
be_define_local_const_str(write_bytes_str_name, "write_bytes", 1227543792, 11);
be_define_local_const_str(write_bytes_str_source, "string", 398550328, 6);
be_define_local_const_str(write_bytes_str_0, "_begin_transmission", -1515506120, 19);
be_define_local_const_str(write_bytes_str_1, "_write", -2079504471, 6);
be_define_local_const_str(write_bytes_str_2, "_end_transmission", -1057486896, 17);
static const bvalue write_bytes_ktab[3] = {
{ { .s=be_local_const_str(write_bytes_str_0) }, BE_STRING},
@ -206,11 +206,12 @@ const bclosure write_bytes_closure = {
/*******************************************************************/
#if BE_USE_PRECOMPILED_OBJECT
#include "../generate/be_fixed_be_class_tasmota_wire.h"
#endif
// #if !BE_USE_PRECOMPILED_OBJECT
#if 1 // TODO we will do pre-compiled later
void be_load_wirelib(bvm *vm)
{
void be_load_wirelib(bvm *vm) {
#if !BE_USE_PRECOMPILED_OBJECT
static const bnfuncinfo members[] = {
{ "bus", NULL }, // bus number
{ "init", b_wire_init },
@ -232,12 +233,32 @@ void be_load_wirelib(bvm *vm)
{ NULL, NULL }
};
be_regclass(vm, "Wire", members);
}
#else
be_pushntvclass(vm, &be_class_tasmota_wire);
be_setglobal(vm, "Wire");
be_pop(vm, 1);
#endif
}
/* @const_object_info_begin
module tasmota (scope: global, depend: 1) {
get_free_heap, func(l_getFreeHeap)
class be_class_tasmota_wire (scope: global, name: Wire) {
bus, var
init, func(b_wire_init)
_begin_transmission, func(b_wire_begintransmission)
_end_transmission, func(b_wire_endtransmission)
_request_from, func(b_wire_requestfrom)
_available, func(b_wire_available)
_write, func(b_wire_write)
_read, func(b_wire_read)
scan, func(b_wire_scan)
write, func(b_wire_validwrite)
read, func(b_wire_validread)
detect, func(b_wire_detect)
read_bytes, closure(read_bytes_closure)
write_bytes, closure(write_bytes_closure)
}
@const_object_info_end */
#include "../generate/be_fixed_tasmota.h"
#endif
#endif // USE_I2C

View File

@ -158,12 +158,6 @@
#define BE_USE_GC_MODULE 1
#define BE_USE_SOLIDIFY_MODULE 1
// #ifdef ESP32
#define BE_USE_TASMOTA 1
// #else
// #define BE_USE_TASMOTA 0
// #endif
/* Macro: BE_EXPLICIT_XXX
* If these macros are defined, the corresponding function will
* use the version defined by these macros. These macro definitions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_tasmota_map) {
{ be_const_key(log, 25), be_const_func(l_logInfo) },
{ be_const_key(find_op, -1), be_const_closure(find_op_closure) },
{ be_const_key(gc, -1), be_const_closure(gc_closure) },
{ be_const_key(get_power, -1), be_const_func(l_getpower) },
{ be_const_key(_cmd, -1), be_const_func(l_cmd) },
{ be_const_key(scale_uint, -1), be_const_func(l_scaleuint) },
{ be_const_key(event, 4), be_const_closure(event_closure) },
{ be_const_key(exec_cmd, 20), be_const_closure(exec_cmd_closure) },
{ be_const_key(find_key_i, -1), be_const_closure(find_key_i_closure) },
{ be_const_key(resolvecmnd, -1), be_const_func(l_resolveCmnd) },
{ be_const_key(set_timer, -1), be_const_closure(set_timer_closure) },
{ be_const_key(add_driver, 37), be_const_closure(add_driver_closure) },
{ be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) },
{ be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
{ be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
{ be_const_key(chars_in_string, -1), be_const_closure(chars_in_string_closure) },
{ be_const_key(add_rule, 47), be_const_closure(add_rule_closure) },
{ be_const_key(try_rule, 34), be_const_closure(try_rule_closure) },
{ be_const_key(get_option, -1), be_const_func(l_getoption) },
{ be_const_key(wire1, -1), be_const_int(0) },
{ be_const_key(remove_cmd, -1), be_const_closure(remove_cmd_closure) },
{ be_const_key(resp_cmnd_done, -1), be_const_func(l_respCmndDone) },
{ be_const_key(wire_scan, -1), be_const_closure(wire_scan_closure) },
{ be_const_key(_timers, -1), be_const_int(1) },
{ be_const_key(exec_rules, -1), be_const_closure(exec_rules_closure) },
{ be_const_key(response_append, 43), be_const_func(l_respAppend) },
{ be_const_key(time_dump, 31), be_const_func(l_time_dump) },
{ be_const_key(millis, -1), be_const_func(l_millis) },
{ be_const_key(wire2, -1), be_const_int(2) },
{ be_const_key(remove_rule, 8), be_const_closure(remove_rule_closure) },
{ be_const_key(delay, 13), be_const_func(l_delay) },
{ be_const_key(run_deferred, -1), be_const_closure(run_deferred_closure) },
{ be_const_key(i2c_enabled, 19), be_const_func(l_i2cenabled) },
{ be_const_key(_drivers, -1), be_const_int(3) },
{ be_const_key(time_reached, -1), be_const_func(l_timereached) },
{ be_const_key(publish, -1), be_const_func(l_publish) },
{ be_const_key(_ccmd, -1), be_const_int(4) },
{ be_const_key(yield, -1), be_const_func(l_yield) },
{ be_const_key(get_free_heap, -1), be_const_func(l_getFreeHeap) },
{ be_const_key(resp_cmnd_failed, -1), be_const_func(l_respCmndFailed) },
{ be_const_key(_rules, -1), be_const_int(5) },
{ be_const_key(time_str, -1), be_const_closure(time_str_closure) },
{ be_const_key(set_power, -1), be_const_func(l_setpower) },
{ be_const_key(cmd, -1), be_const_closure(cmd_closure) },
{ be_const_key(get_light, -1), be_const_closure(get_light_closure) },
{ be_const_key(save, -1), be_const_func(l_save) },
{ be_const_key(rtc, 23), be_const_func(l_rtc) },
{ be_const_key(resp_cmnd_error, 33), be_const_func(l_respCmndError) },
{ be_const_key(web_send_decimal, 15), be_const_func(l_webSendDecimal) },
{ be_const_key(load, 14), be_const_closure(load_closure) },
{ be_const_key(set_light, -1), be_const_closure(set_light_closure) },
};
static be_define_const_map(
be_class_tasmota_map,
51
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_tasmota,
6,
NULL,
Tasmota
);

View File

@ -0,0 +1,26 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_tasmota_driver_map) {
{ be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
{ be_const_key(web_add_main_button, 3), be_const_int(0) },
{ be_const_key(web_sensor, -1), be_const_int(1) },
{ be_const_key(every_100ms, -1), be_const_int(2) },
{ be_const_key(json_append, 1), be_const_int(3) },
{ be_const_key(every_second, -1), be_const_int(4) },
{ be_const_key(button_pressed, -1), be_const_int(5) },
{ be_const_key(save_before_restart, -1), be_const_int(6) },
{ be_const_key(web_add_button, 7), be_const_int(7) },
{ be_const_key(get_tasmota, 0), be_const_func(d_getTasmotaGlob) },
};
static be_define_const_map(
be_class_tasmota_driver_map,
10
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_tasmota_driver,
8,
NULL,
Driver
);

View File

@ -0,0 +1,30 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_tasmota_wire_map) {
{ be_const_key(_end_transmission, 10), be_const_func(b_wire_endtransmission) },
{ be_const_key(bus, -1), be_const_int(0) },
{ be_const_key(_read, 7), be_const_func(b_wire_read) },
{ be_const_key(read, -1), be_const_func(b_wire_validread) },
{ be_const_key(_request_from, -1), be_const_func(b_wire_requestfrom) },
{ be_const_key(init, -1), be_const_func(b_wire_init) },
{ be_const_key(write_bytes, -1), be_const_closure(write_bytes_closure) },
{ be_const_key(_begin_transmission, -1), be_const_func(b_wire_begintransmission) },
{ be_const_key(scan, -1), be_const_func(b_wire_scan) },
{ be_const_key(_write, 1), be_const_func(b_wire_write) },
{ be_const_key(write, -1), be_const_func(b_wire_validwrite) },
{ be_const_key(_available, -1), be_const_func(b_wire_available) },
{ be_const_key(detect, -1), be_const_func(b_wire_detect) },
{ be_const_key(read_bytes, -1), be_const_closure(read_bytes_closure) },
};
static be_define_const_map(
be_class_tasmota_wire_map,
14
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_tasmota_wire,
1,
NULL,
Wire
);

View File

@ -0,0 +1,25 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_tasmota_driver_map) {
{ be_const_key(get_tasmota, -1), be_const_func(d_getTasmotaGlob) },
{ be_const_key(web_sensor, -1), be_const_int(0) },
{ be_const_key(json_append, 0), be_const_int(1) },
{ be_const_key(every_second, 4), be_const_int(2) },
{ be_const_key(every_100ms, 7), be_const_int(3) },
{ be_const_key(web_add_main_button, -1), be_const_int(4) },
{ be_const_key(web_add_button, -1), be_const_int(5) },
{ be_const_key(save_before_restart, -1), be_const_int(6) },
{ be_const_key(button_pressed, 1), be_const_int(7) },
};
static be_define_const_map(
be_tasmota_driver_map,
9
);
BE_EXPORT_VARIABLE be_define_const_class(
be_tasmota_driver,
8,
NULL,
Driver
);

View File

@ -0,0 +1,17 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_libenergy_map) {
{ be_const_key(read, -1), be_const_func(b_nrg_read) },
};
static be_define_const_map(
m_libenergy_map,
1
);
static be_define_const_module(
m_libenergy,
"energy"
);
BE_EXPORT_VARIABLE be_define_const_native_module(energy, NULL);

View File

@ -0,0 +1,21 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_liblight_map) {
{ be_const_key(gamma8, 1), be_const_func(l_gamma8) },
{ be_const_key(get, -1), be_const_func(l_getlight) },
{ be_const_key(set, 4), be_const_func(l_setlight) },
{ be_const_key(gamma10, -1), be_const_func(l_gamma10) },
{ be_const_key(reverse_gamma10, -1), be_const_func(l_rev_gamma10) },
};
static be_define_const_map(
m_liblight_map,
5
);
static be_define_const_module(
m_liblight,
"light"
);
BE_EXPORT_VARIABLE be_define_const_native_module(light, NULL);

View File

@ -1,468 +1,470 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_liblvgl_map) {
{ be_const_key(DISP_SIZE_MEDIUM, -1), be_const_int(1) },
{ be_const_key(BORDER_SIDE_INTERNAL, -1), be_const_int(16) },
{ be_const_key(SYMBOL_PAUSE, -1), be_const_str(&be_local_const_str_SYMBOL_PAUSE) },
{ be_const_key(FS_RES_FS_ERR, 193), be_const_int(2) },
{ be_const_key(ANIM_ON, -1), be_const_int(1) },
{ be_const_key(OPA_40, -1), be_const_int(102) },
{ be_const_key(SCROLLBAR_MODE_OFF, 400), be_const_int(0) },
{ be_const_key(STYLE_VALUE_FONT, 280), be_const_int(126) },
{ be_const_key(STYLE_TRANSFORM_HEIGHT, -1), be_const_int(5) },
{ be_const_key(ARC_PART_INDIC, -1), be_const_int(1) },
{ be_const_key(DISP_ROT_NONE, 395), be_const_int(0) },
{ be_const_key(scr_act, 433), be_const_func(lv0_scr_act) },
{ be_const_key(STYLE_PAD_BOTTOM, -1), be_const_int(17) },
{ be_const_key(SYMBOL_BATTERY_FULL, 278), be_const_str(&be_local_const_str_SYMBOL_BATTERY_FULL) },
{ be_const_key(RED, -1), be_const_int(16711680) },
{ be_const_key(TXT_CMD_STATE_IN, 130), be_const_int(2) },
{ be_const_key(GRAD_DIR_NONE, -1), be_const_int(0) },
{ be_const_key(OPA_100, -1), be_const_int(255) },
{ be_const_key(SLIDER_TYPE_RANGE, 370), be_const_int(2) },
{ be_const_key(SYMBOL_BATTERY_2, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_2) },
{ be_const_key(STYLE_VALUE_OFS_X, 434), be_const_int(115) },
{ be_const_key(STYLE_SCALE_WIDTH, -1), be_const_int(192) },
{ be_const_key(STYLE_SCALE_END_BORDER_WIDTH, -1), be_const_int(194) },
{ be_const_key(ALIGN_OUT_TOP_RIGHT, -1), be_const_int(11) },
{ be_const_key(ALIGN_OUT_LEFT_TOP, -1), be_const_int(15) },
{ be_const_key(SYMBOL_SD_CARD, -1), be_const_str(&be_local_const_str_SYMBOL_SD_CARD) },
{ be_const_key(EVENT_INSERT, -1), be_const_int(17) },
{ be_const_key(SYMBOL_PLAY, -1), be_const_str(&be_local_const_str_SYMBOL_PLAY) },
{ be_const_key(VSPI, -1), be_const_int(1) },
{ be_const_key(STYLE_SHADOW_WIDTH, 376), be_const_int(80) },
{ be_const_key(LABEL_LONG_CROP, -1), be_const_int(5) },
{ be_const_key(ALIGN_IN_TOP_RIGHT, -1), be_const_int(3) },
{ be_const_key(LAYOUT_ROW_MID, -1), be_const_int(6) },
{ be_const_key(OPA_70, -1), be_const_int(178) },
{ be_const_key(SYMBOL_SHUFFLE, -1), be_const_str(&be_local_const_str_SYMBOL_SHUFFLE) },
{ be_const_key(EVENT_APPLY, 66), be_const_int(19) },
{ be_const_key(layer_top, -1), be_const_func(lv0_layer_top) },
{ be_const_key(OBJ_PART_ALL, -1), be_const_int(255) },
{ be_const_key(STYLE_BG_GRAD_STOP, 8), be_const_int(34) },
{ be_const_key(STYLE_VALUE_STR, -1), be_const_int(127) },
{ be_const_key(LABEL_ALIGN_LEFT, -1), be_const_int(0) },
{ be_const_key(CHART_CURSOR_DOWN, -1), be_const_int(8) },
{ be_const_key(OBJ_PART_VIRTUAL_FIRST, 41), be_const_int(1) },
{ be_const_key(GRAD_DIR_HOR, 44), be_const_int(2) },
{ be_const_key(LAYOUT_PRETTY_MID, 183), be_const_int(9) },
{ be_const_key(STYLE_VALUE_BLEND_MODE, -1), be_const_int(114) },
{ be_const_key(CHART_PART_CURSOR, 243), be_const_int(3) },
{ be_const_key(BAR_TYPE_SYMMETRICAL, 308), be_const_int(1) },
{ be_const_key(EVENT_FOCUSED, 122), be_const_int(13) },
{ be_const_key(ROLLER_MODE_NORMAL, 177), be_const_int(0) },
{ be_const_key(WHITE, 281), be_const_int(16777215) },
{ be_const_key(KEY_PREV, -1), be_const_int(11) },
{ be_const_key(SYMBOL_BATTERY_1, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_1) },
{ be_const_key(STYLE_PAD_RIGHT, -1), be_const_int(19) },
{ be_const_key(LABEL_LONG_SROLL, -1), be_const_int(3) },
{ be_const_key(FS_RES_NOT_IMP, -1), be_const_int(9) },
{ be_const_key(STYLE_TRANSITION_DELAY, -1), be_const_int(177) },
{ be_const_key(STYLE_VALUE_ALIGN, 276), be_const_int(117) },
{ be_const_key(SYMBOL_FILE, -1), be_const_str(&be_local_const_str_SYMBOL_FILE) },
{ be_const_key(STYLE_BORDER_BLEND_MODE, -1), be_const_int(50) },
{ be_const_key(OPA_80, 59), be_const_int(204) },
{ be_const_key(LAYOUT_CENTER, -1), be_const_int(1) },
{ be_const_key(KEY_END, -1), be_const_int(3) },
{ be_const_key(KEY_NEXT, -1), be_const_int(9) },
{ be_const_key(STYLE_LINE_ROUNDED, 420), be_const_int(148) },
{ be_const_key(CHART_AXIS_PRIMARY_Y, 427), be_const_int(0) },
{ be_const_key(SYMBOL_BULLET, -1), be_const_str(&be_local_const_str_SYMBOL_BULLET) },
{ be_const_key(BORDER_SIDE_TOP, -1), be_const_int(2) },
{ be_const_key(SCROLLBAR_MODE_HIDE, -1), be_const_int(4) },
{ be_const_key(TXT_FLAG_RIGHT, 238), be_const_int(8) },
{ be_const_key(FIT_TIGHT, 20), be_const_int(1) },
{ be_const_key(KEY_BACKSPACE, -1), be_const_int(8) },
{ be_const_key(GAUGE_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(SPI, 178), be_const_int(0) },
{ be_const_key(STYLE_TEXT_BLEND_MODE, 430), be_const_int(32899) },
{ be_const_key(EVENT_DRAG_THROW_BEGIN, 121), be_const_int(10) },
{ be_const_key(KEYBOARD_MODE_SPECIAL, -1), be_const_int(2) },
{ be_const_key(SYMBOL_BACKSPACE, 187), be_const_str(&be_local_const_str_SYMBOL_BACKSPACE) },
{ be_const_key(TABVIEW_TAB_POS_RIGHT, 0), be_const_int(4) },
{ be_const_key(STYLE_PATTERN_BLEND_MODE, 233), be_const_int(96) },
{ be_const_key(BTN_STATE_CHECKED_RELEASED, -1), be_const_int(3) },
{ be_const_key(EVENT_LONG_PRESSED, -1), be_const_int(4) },
{ be_const_key(STYLE_VALUE_OFS_X, 424), be_const_int(115) },
{ be_const_key(DISP_ROT_180, -1), be_const_int(2) },
{ be_const_key(SYMBOL_PLUS, 152), be_const_str(&be_local_const_str_SYMBOL_PLUS) },
{ be_const_key(TABVIEW_TAB_POS_BOTTOM, 143), be_const_int(2) },
{ be_const_key(KEYBOARD_MODE_NUM, 228), be_const_int(3) },
{ be_const_key(PROTECT_CLICK_FOCUS, -1), be_const_int(32) },
{ be_const_key(CHART_CURSOR_LEFT, 300), be_const_int(4) },
{ be_const_key(PROTECT_FOLLOW, 53), be_const_int(8) },
{ be_const_key(FS_RES_OUT_OF_MEM, -1), be_const_int(10) },
{ be_const_key(FS_RES_INV_PARAM, -1), be_const_int(11) },
{ be_const_key(STYLE_BORDER_COLOR, -1), be_const_int(57) },
{ be_const_key(FS_MODE_RD, -1), be_const_int(2) },
{ be_const_key(LAYOUT_OFF, 263), be_const_int(0) },
{ be_const_key(CHART_PART_SERIES, -1), be_const_int(2) },
{ be_const_key(STYLE_TRANSITION_PROP_1, 388), be_const_int(178) },
{ be_const_key(STYLE_VALUE_STR, -1), be_const_int(127) },
{ be_const_key(SYMBOL_SETTINGS, -1), be_const_str(&be_local_const_str_SYMBOL_SETTINGS) },
{ be_const_key(FS_RES_BUSY, -1), be_const_int(7) },
{ be_const_key(BLACK, 303), be_const_int(0) },
{ be_const_key(CHART_TYPE_LINE, -1), be_const_int(1) },
{ be_const_key(LAYOUT_GRID, 267), be_const_int(11) },
{ be_const_key(STYLE_VALUE_FONT, -1), be_const_int(126) },
{ be_const_key(OPA_40, -1), be_const_int(102) },
{ be_const_key(STYLE_TRANSITION_PROP_6, -1), be_const_int(183) },
{ be_const_key(STYLE_BORDER_BLEND_MODE, 370), be_const_int(50) },
{ be_const_key(CALENDAR_PART_DAY_NAMES, 158), be_const_int(2) },
{ be_const_key(FS_RES_TOUT, -1), be_const_int(8) },
{ be_const_key(LABEL_ALIGN_LEFT, 198), be_const_int(0) },
{ be_const_key(BORDER_SIDE_RIGHT, -1), be_const_int(8) },
{ be_const_key(DISP_SIZE_MEDIUM, -1), be_const_int(1) },
{ be_const_key(SYMBOL_HOME, 350), be_const_str(&be_local_const_str_SYMBOL_HOME) },
{ be_const_key(CALENDAR_PART_BG, -1), be_const_int(0) },
{ be_const_key(SILVER, 274), be_const_int(12632256) },
{ be_const_key(STYLE_TEXT_LINE_SPACE, -1), be_const_int(32897) },
{ be_const_key(STYLE_BG_COLOR, -1), be_const_int(41) },
{ be_const_key(RED, -1), be_const_int(16711680) },
{ be_const_key(STYLE_BG_OPA, 442), be_const_int(44) },
{ be_const_key(OPA_10, -1), be_const_int(25) },
{ be_const_key(STYLE_VALUE_OFS_Y, 56), be_const_int(116) },
{ be_const_key(LAYOUT_OFF, 164), be_const_int(0) },
{ be_const_key(ARC_TYPE_REVERSE, -1), be_const_int(2) },
{ be_const_key(ALIGN_OUT_TOP_MID, 297), be_const_int(10) },
{ be_const_key(KEYBOARD_MODE_SPECIAL, 367), be_const_int(2) },
{ be_const_key(BORDER_SIDE_BOTTOM, 394), be_const_int(1) },
{ be_const_key(CHART_CURSOR_RIGHT, 412), be_const_int(1) },
{ be_const_key(STATE_FOCUSED, -1), be_const_int(2) },
{ be_const_key(OBJ_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(STYLE_TRANSFORM_ZOOM, 290), be_const_int(7) },
{ be_const_key(STYLE_BG_MAIN_STOP, -1), be_const_int(33) },
{ be_const_key(SYMBOL_AUDIO, -1), be_const_str(&be_local_const_str_SYMBOL_AUDIO) },
{ be_const_key(EVENT_APPLY, 183), be_const_int(19) },
{ be_const_key(CHART_CURSOR_DOWN, -1), be_const_int(8) },
{ be_const_key(KEYBOARD_PART_BG, -1), be_const_int(0) },
{ be_const_key(DROPDOWN_PART_MAIN, 157), be_const_int(0) },
{ be_const_key(TXT_FLAG_RECOLOR, 178), be_const_int(1) },
{ be_const_key(SYMBOL_TRASH, 37), be_const_str(&be_local_const_str_SYMBOL_TRASH) },
{ be_const_key(scr_act, 364), be_const_func(lv0_scr_act) },
{ be_const_key(I2C, 382), be_const_int(1) },
{ be_const_key(CALENDAR_PART_DATE, 141), be_const_int(3) },
{ be_const_key(STYLE_SHADOW_OFS_X, -1), be_const_int(81) },
{ be_const_key(OBJ_PART_ALL, 295), be_const_int(255) },
{ be_const_key(screenshot, 201), be_const_func(lv0_screenshot) },
{ be_const_key(SYMBOL_LOOP, 94), be_const_str(&be_local_const_str_SYMBOL_LOOP) },
{ be_const_key(EVENT_DEFOCUSED, -1), be_const_int(14) },
{ be_const_key(GESTURE_DIR_BOTTOM, 284), be_const_int(1) },
{ be_const_key(ALIGN_OUT_LEFT_BOTTOM, -1), be_const_int(17) },
{ be_const_key(DISP_SIZE_LARGE, 348), be_const_int(2) },
{ be_const_key(STATE_DEFAULT, -1), be_const_int(0) },
{ be_const_key(EVENT_RELEASED, -1), be_const_int(7) },
{ be_const_key(STYLE_TRANSITION_PROP_2, -1), be_const_int(179) },
{ be_const_key(BLEND_MODE_NORMAL, -1), be_const_int(0) },
{ be_const_key(STYLE_LINE_OPA, 402), be_const_int(156) },
{ be_const_key(ARC_PART_KNOB, -1), be_const_int(2) },
{ be_const_key(ARC_TYPE_NORMAL, 70), be_const_int(0) },
{ be_const_key(EVENT_CLICKED, -1), be_const_int(6) },
{ be_const_key(LAYOUT_COLUMN_LEFT, 229), be_const_int(2) },
{ be_const_key(BLACK, 258), be_const_int(0) },
{ be_const_key(SYMBOL_IMAGE, 68), be_const_str(&be_local_const_str_SYMBOL_IMAGE) },
{ be_const_key(ALIGN_OUT_RIGHT_TOP, 180), be_const_int(18) },
{ be_const_key(STYLE_VALUE_COLOR, -1), be_const_int(121) },
{ be_const_key(SYMBOL_CLOSE, 378), be_const_str(&be_local_const_str_SYMBOL_CLOSE) },
{ be_const_key(DISP_ROT_270, -1), be_const_int(3) },
{ be_const_key(STYLE_TRANSITION_PROP_4, -1), be_const_int(181) },
{ be_const_key(STATE_HOVERED, -1), be_const_int(8) },
{ be_const_key(CPICKER_COLOR_MODE_VALUE, 410), be_const_int(2) },
{ be_const_key(TEXT_DECOR_NONE, -1), be_const_int(0) },
{ be_const_key(PAGE_EDGE_BOTTOM, 105), be_const_int(8) },
{ be_const_key(ALIGN_OUT_TOP_RIGHT, -1), be_const_int(11) },
{ be_const_key(SYMBOL_COPY, 250), be_const_str(&be_local_const_str_SYMBOL_COPY) },
{ be_const_key(KEY_PREV, -1), be_const_int(11) },
{ be_const_key(STYLE_LINE_COLOR, -1), be_const_int(153) },
{ be_const_key(STYLE_MARGIN_LEFT, -1), be_const_int(23) },
{ be_const_key(STYLE_TRANSITION_PROP_2, 387), be_const_int(179) },
{ be_const_key(OPA_60, -1), be_const_int(153) },
{ be_const_key(KEYBOARD_MODE_TEXT_UPPER, -1), be_const_int(1) },
{ be_const_key(LABEL_LONG_SROLL, 249), be_const_int(3) },
{ be_const_key(FS_RES_NOT_IMP, 63), be_const_int(9) },
{ be_const_key(STYLE_PAD_RIGHT, -1), be_const_int(19) },
{ be_const_key(CHART_CURSOR_NONE, 293), be_const_int(0) },
{ be_const_key(FS_MODE_RD, -1), be_const_int(2) },
{ be_const_key(LIST_PART_EDGE_FLASH, 438), be_const_int(2) },
{ be_const_key(SYMBOL_BELL, 78), be_const_str(&be_local_const_str_SYMBOL_BELL) },
{ be_const_key(LABEL_LONG_CROP, -1), be_const_int(5) },
{ be_const_key(SYMBOL_POWER, -1), be_const_str(&be_local_const_str_SYMBOL_POWER) },
{ be_const_key(SYMBOL_UP, 57), be_const_str(&be_local_const_str_SYMBOL_UP) },
{ be_const_key(SYMBOL_MINUS, -1), be_const_str(&be_local_const_str_SYMBOL_MINUS) },
{ be_const_key(BLEND_MODE_SUBTRACTIVE, 246), be_const_int(2) },
{ be_const_key(STYLE_MARGIN_BOTTOM, -1), be_const_int(22) },
{ be_const_key(SCROLLBAR_MODE_AUTO, 439), be_const_int(3) },
{ be_const_key(STYLE_IMAGE_OPA, -1), be_const_int(32940) },
{ be_const_key(CHART_AXIS_PRIMARY_Y, 292), be_const_int(0) },
{ be_const_key(SCROLLBAR_MODE_HIDE, 209), be_const_int(4) },
{ be_const_key(EVENT_DRAG_BEGIN, 211), be_const_int(8) },
{ be_const_key(FS_RES_OUT_OF_MEM, 434), be_const_int(10) },
{ be_const_key(SYMBOL_VOLUME_MAX, -1), be_const_str(&be_local_const_str_SYMBOL_VOLUME_MAX) },
{ be_const_key(SLIDER_TYPE_NORMAL, -1), be_const_int(0) },
{ be_const_key(BTN_STATE_RELEASED, -1), be_const_int(0) },
{ be_const_key(CPICKER_COLOR_MODE_VALUE, -1), be_const_int(2) },
{ be_const_key(PAGE_EDGE_RIGHT, -1), be_const_int(4) },
{ be_const_key(FS_RES_HW_ERR, -1), be_const_int(1) },
{ be_const_key(DISP_SIZE_EXTRA_LARGE, -1), be_const_int(3) },
{ be_const_key(SYMBOL_SAVE, 191), be_const_str(&be_local_const_str_SYMBOL_SAVE) },
{ be_const_key(STYLE_TEXT_BLEND_MODE, -1), be_const_int(32899) },
{ be_const_key(OBJMASK_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(SYMBOL_USB, 389), be_const_str(&be_local_const_str_SYMBOL_USB) },
{ be_const_key(STYLE_BORDER_POST, -1), be_const_int(51) },
{ be_const_key(FS_RES_INV_PARAM, -1), be_const_int(11) },
{ be_const_key(TEAL, 264), be_const_int(32896) },
{ be_const_key(LAYOUT_COLUMN_MID, -1), be_const_int(3) },
{ be_const_key(LAYOUT_COLUMN_LEFT, -1), be_const_int(2) },
{ be_const_key(ALIGN_IN_BOTTOM_RIGHT, -1), be_const_int(6) },
{ be_const_key(STYLE_BORDER_COLOR, -1), be_const_int(57) },
{ be_const_key(SCROLLBAR_MODE_OFF, -1), be_const_int(0) },
{ be_const_key(ALIGN_OUT_RIGHT_MID, 188), be_const_int(19) },
{ be_const_key(TXT_CMD_STATE_WAIT, -1), be_const_int(0) },
{ be_const_key(STYLE_BG_GRAD_STOP, 377), be_const_int(34) },
{ be_const_key(STYLE_PAD_TOP, 163), be_const_int(16) },
{ be_const_key(GESTURE_DIR_BOTTOM, -1), be_const_int(1) },
{ be_const_key(CHART_CURSOR_LEFT, 423), be_const_int(4) },
{ be_const_key(DISP_SIZE_SMALL, -1), be_const_int(0) },
{ be_const_key(BTN_STATE_CHECKED_PRESSED, -1), be_const_int(4) },
{ be_const_key(EVENT_GESTURE, -1), be_const_int(11) },
{ be_const_key(BTN_STATE_DISABLED, 396), be_const_int(2) },
{ be_const_key(KEY_ENTER, 222), be_const_int(10) },
{ be_const_key(EVENT_RELEASED, -1), be_const_int(7) },
{ be_const_key(GRAD_DIR_HOR, -1), be_const_int(2) },
{ be_const_key(ALIGN_OUT_LEFT_BOTTOM, -1), be_const_int(17) },
{ be_const_key(SYMBOL_BLUETOOTH, -1), be_const_str(&be_local_const_str_SYMBOL_BLUETOOTH) },
{ be_const_key(CHECKBOX_PART_BULLET, 41), be_const_int(64) },
{ be_const_key(KEY_DEL, -1), be_const_int(127) },
{ be_const_key(LIST_PART_BG, -1), be_const_int(0) },
{ be_const_key(PROTECT_CHILD_CHG, -1), be_const_int(1) },
{ be_const_key(KEYBOARD_MODE_TEXT_LOWER, -1), be_const_int(0) },
{ be_const_key(CPICKER_COLOR_MODE_SATURATION, 190), be_const_int(1) },
{ be_const_key(LAYOUT_PRETTY_BOTTOM, -1), be_const_int(10) },
{ be_const_key(EVENT_CLICKED, -1), be_const_int(6) },
{ be_const_key(OPA_0, -1), be_const_int(0) },
{ be_const_key(OLIVE, 400), be_const_int(8421376) },
{ be_const_key(ALIGN_OUT_RIGHT_BOTTOM, -1), be_const_int(20) },
{ be_const_key(TEXT_DECOR_NONE, 360), be_const_int(0) },
{ be_const_key(SYMBOL_BATTERY_EMPTY, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_EMPTY) },
{ be_const_key(PROTECT_FOLLOW, 416), be_const_int(8) },
{ be_const_key(STYLE_SHADOW_BLEND_MODE, -1), be_const_int(84) },
{ be_const_key(STYLE_PATTERN_IMAGE, 234), be_const_int(110) },
{ be_const_key(STATE_EDITED, 75), be_const_int(4) },
{ be_const_key(DROPDOWN_PART_SCROLLBAR, 217), be_const_int(65) },
{ be_const_key(SPINNER_DIR_BACKWARD, -1), be_const_int(1) },
{ be_const_key(GRAD_DIR_VER, -1), be_const_int(1) },
{ be_const_key(TXT_FLAG_RIGHT, 330), be_const_int(8) },
{ be_const_key(BTNMATRIX_CTRL_CLICK_TRIG, 398), be_const_int(256) },
{ be_const_key(OPA_COVER, 345), be_const_int(255) },
{ be_const_key(KEY_END, 32), be_const_int(3) },
{ be_const_key(DISP_SIZE_LARGE, -1), be_const_int(2) },
{ be_const_key(layer_sys, -1), be_const_func(lv0_layer_sys) },
{ be_const_key(DISP_ROT_NONE, 13), be_const_int(0) },
{ be_const_key(CALENDAR_PART_HEADER, -1), be_const_int(1) },
{ be_const_key(ALIGN_OUT_BOTTOM_LEFT, -1), be_const_int(12) },
{ be_const_key(TXT_CMD_STATE_IN, 385), be_const_int(2) },
{ be_const_key(EVENT_FOCUSED, -1), be_const_int(13) },
{ be_const_key(EVENT_DELETE, 14), be_const_int(21) },
{ be_const_key(PAGE_EDGE_LEFT, -1), be_const_int(1) },
{ be_const_key(STYLE_CLIP_CORNER, -1), be_const_int(2) },
{ be_const_key(FIT_PARENT, -1), be_const_int(2) },
{ be_const_key(STYLE_LINE_ROUNDED, 64), be_const_int(148) },
{ be_const_key(GRAY, -1), be_const_int(8421504) },
{ be_const_key(BORDER_SIDE_FULL, -1), be_const_int(15) },
{ be_const_key(SYMBOL_CALL, -1), be_const_str(&be_local_const_str_SYMBOL_CALL) },
{ be_const_key(SYMBOL_MUTE, 131), be_const_str(&be_local_const_str_SYMBOL_MUTE) },
{ be_const_key(PAGE_EDGE_TOP, -1), be_const_int(2) },
{ be_const_key(BAR_TYPE_CUSTOM, 54), be_const_int(2) },
{ be_const_key(STYLE_SCALE_END_BORDER_WIDTH, -1), be_const_int(194) },
{ be_const_key(FS_MODE_WR, -1), be_const_int(1) },
{ be_const_key(CPICKER_PART_KNOB, 399), be_const_int(1) },
{ be_const_key(EVENT_SHORT_CLICKED, -1), be_const_int(3) },
{ be_const_key(LIST_PART_SCROLLBAR, -1), be_const_int(1) },
{ be_const_key(STYLE_LINE_BLEND_MODE, 427), be_const_int(145) },
{ be_const_key(CPICKER_TYPE_DISC, 440), be_const_int(1) },
{ be_const_key(OPA_90, -1), be_const_int(229) },
{ be_const_key(ALIGN_IN_LEFT_MID, -1), be_const_int(7) },
{ be_const_key(SYMBOL_OK, -1), be_const_str(&be_local_const_str_SYMBOL_OK) },
{ be_const_key(STYLE_TRANSITION_PATH, 159), be_const_int(190) },
{ be_const_key(TEMPL_STYLE_X, 35), be_const_int(0) },
{ be_const_key(KEY_HOME, -1), be_const_int(2) },
{ be_const_key(SYMBOL_LEFT, 58), be_const_str(&be_local_const_str_SYMBOL_LEFT) },
{ be_const_key(STYLE_SIZE, -1), be_const_int(3) },
{ be_const_key(STYLE_SCALE_GRAD_COLOR, -1), be_const_int(201) },
{ be_const_key(DROPDOWN_DIR_DOWN, -1), be_const_int(0) },
{ be_const_key(LABEL_ALIGN_RIGHT, -1), be_const_int(2) },
{ be_const_key(DROPDOWN_DIR_UP, -1), be_const_int(1) },
{ be_const_key(CHART_UPDATE_MODE_CIRCULAR, -1), be_const_int(1) },
{ be_const_key(BTNMATRIX_CTRL_DISABLED, -1), be_const_int(32) },
{ be_const_key(ARC_PART_INDIC, -1), be_const_int(1) },
{ be_const_key(LAYOUT_COLUMN_RIGHT, 112), be_const_int(4) },
{ be_const_key(EVENT_DRAG_THROW_BEGIN, -1), be_const_int(10) },
{ be_const_key(BTNMATRIX_CTRL_CHECKABLE, 296), be_const_int(64) },
{ be_const_key(SYMBOL_EYE_OPEN, -1), be_const_str(&be_local_const_str_SYMBOL_EYE_OPEN) },
{ be_const_key(STATE_CHECKED, -1), be_const_int(1) },
{ be_const_key(DRAG_DIR_BOTH, 392), be_const_int(3) },
{ be_const_key(SPINNER_TYPE_SPINNING_ARC, -1), be_const_int(0) },
{ be_const_key(CHART_AXIS_DRAW_LAST_TICK, -1), be_const_int(1) },
{ be_const_key(PROTECT_PARENT, 315), be_const_int(2) },
{ be_const_key(ALIGN_OUT_BOTTOM_MID, 235), be_const_int(13) },
{ be_const_key(CHART_PART_SERIES, 284), be_const_int(2) },
{ be_const_key(FS_RES_UNKNOWN, -1), be_const_int(12) },
{ be_const_key(MAROON, -1), be_const_int(8388608) },
{ be_const_key(STYLE_SHADOW_OPA, -1), be_const_int(92) },
{ be_const_key(GREEN, -1), be_const_int(32768) },
{ be_const_key(STYLE_OUTLINE_COLOR, -1), be_const_int(73) },
{ be_const_key(load_font, -1), be_const_func(lv0_load_font) },
{ be_const_key(STYLE_LINE_OPA, 132), be_const_int(156) },
{ be_const_key(STYLE_TEXT_FONT, -1), be_const_int(32910) },
{ be_const_key(TEXT_DECOR_STRIKETHROUGH, -1), be_const_int(2) },
{ be_const_key(EVENT_PRESSING, -1), be_const_int(1) },
{ be_const_key(DISP_ROT_90, -1), be_const_int(1) },
{ be_const_key(STYLE_LINE_DASH_GAP, -1), be_const_int(147) },
{ be_const_key(ARC_PART_KNOB, -1), be_const_int(2) },
{ be_const_key(STYLE_IMAGE_BLEND_MODE, 99), be_const_int(32928) },
{ be_const_key(STATE_HOVERED, -1), be_const_int(8) },
{ be_const_key(STYLE_LINE_DASH_WIDTH, -1), be_const_int(146) },
{ be_const_key(KEY_UP, -1), be_const_int(17) },
{ be_const_key(SLIDER_TYPE_RANGE, -1), be_const_int(2) },
{ be_const_key(ANIM_OFF, -1), be_const_int(0) },
{ be_const_key(CHART_PART_CURSOR, -1), be_const_int(3) },
{ be_const_key(LAYOUT_ROW_MID, 354), be_const_int(6) },
{ be_const_key(STYLE_VALUE_ALIGN, 448), be_const_int(117) },
{ be_const_key(ALIGN_OUT_LEFT_TOP, -1), be_const_int(15) },
{ be_const_key(SCROLLBAR_MODE_ON, 97), be_const_int(1) },
{ be_const_key(SYMBOL_PREV, -1), be_const_str(&be_local_const_str_SYMBOL_PREV) },
{ be_const_key(DROPDOWN_PART_SELECTED, 337), be_const_int(66) },
{ be_const_key(LIME, 39), be_const_int(65280) },
{ be_const_key(STYLE_BORDER_OPA, -1), be_const_int(60) },
{ be_const_key(SYMBOL_DRIVE, 127), be_const_str(&be_local_const_str_SYMBOL_DRIVE) },
{ be_const_key(montserrat_font, 280), be_const_func(lv0_load_montserrat_font) },
{ be_const_key(DROPDOWN_DIR_LEFT, -1), be_const_int(2) },
{ be_const_key(EVENT_CANCEL, 288), be_const_int(20) },
{ be_const_key(SYMBOL_BATTERY_2, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_2) },
{ be_const_key(DROPDOWN_DIR_RIGHT, 84), be_const_int(3) },
{ be_const_key(TXT_CMD_STATE_PAR, -1), be_const_int(1) },
{ be_const_key(STYLE_TRANSITION_PROP_1, 91), be_const_int(178) },
{ be_const_key(OPA_100, -1), be_const_int(255) },
{ be_const_key(ALIGN_OUT_TOP_LEFT, -1), be_const_int(9) },
{ be_const_key(SPINNER_DIR_FORWARD, -1), be_const_int(0) },
{ be_const_key(STYLE_BORDER_WIDTH, -1), be_const_int(48) },
{ be_const_key(SYMBOL_REFRESH, -1), be_const_str(&be_local_const_str_SYMBOL_REFRESH) },
{ be_const_key(FS_RES_NOT_EX, 363), be_const_int(3) },
{ be_const_key(TXT_FLAG_CENTER, 247), be_const_int(4) },
{ be_const_key(FS_RES_LOCKED, 130), be_const_int(5) },
{ be_const_key(STATE_DEFAULT, 338), be_const_int(0) },
{ be_const_key(DROPDOWN_PART_LIST, -1), be_const_int(64) },
{ be_const_key(SCROLLBAR_MODE_UNHIDE, 283), be_const_int(8) },
{ be_const_key(STYLE_BG_GRAD_DIR, -1), be_const_int(35) },
{ be_const_key(SSPI, -1), be_const_int(2) },
{ be_const_key(SYMBOL_RIGHT, -1), be_const_str(&be_local_const_str_SYMBOL_RIGHT) },
{ be_const_key(SYMBOL_PLAY, -1), be_const_str(&be_local_const_str_SYMBOL_PLAY) },
{ be_const_key(LAYOUT_PRETTY_MID, -1), be_const_int(9) },
{ be_const_key(STYLE_OUTLINE_OPA, -1), be_const_int(76) },
{ be_const_key(LAYOUT_CENTER, -1), be_const_int(1) },
{ be_const_key(KEYBOARD_PART_BTN, 286), be_const_int(1) },
{ be_const_key(LED_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(EVENT_VALUE_CHANGED, -1), be_const_int(16) },
{ be_const_key(OPA_20, 239), be_const_int(51) },
{ be_const_key(CHART_UPDATE_MODE_SHIFT, -1), be_const_int(0) },
{ be_const_key(STATE_PRESSED, -1), be_const_int(16) },
{ be_const_key(BTN_STATE_CHECKED_DISABLED, -1), be_const_int(5) },
{ be_const_key(OPA_TRANSP, 137), be_const_int(0) },
{ be_const_key(STYLE_TRANSFORM_HEIGHT, -1), be_const_int(5) },
{ be_const_key(STYLE_LINE_WIDTH, -1), be_const_int(144) },
{ be_const_key(STYLE_TEXT_OPA, -1), be_const_int(32908) },
{ be_const_key(STYLE_TEXT_LETTER_SPACE, -1), be_const_int(32896) },
{ be_const_key(OPA_70, -1), be_const_int(178) },
{ be_const_key(STYLE_SHADOW_OFS_Y, -1), be_const_int(82) },
{ be_const_key(STYLE_VALUE_COLOR, 413), be_const_int(121) },
{ be_const_key(TABVIEW_TAB_POS_TOP, -1), be_const_int(1) },
{ be_const_key(LAYOUT_ROW_BOTTOM, 318), be_const_int(7) },
{ be_const_key(ALIGN_CENTER, 144), be_const_int(0) },
{ be_const_key(OPA_50, 278), be_const_int(127) },
{ be_const_key(SYMBOL_CHARGE, -1), be_const_str(&be_local_const_str_SYMBOL_CHARGE) },
{ be_const_key(CHART_AXIS_SECONDARY_Y, -1), be_const_int(1) },
{ be_const_key(STYLE_IMAGE_RECOLOR, -1), be_const_int(32937) },
{ be_const_key(SYMBOL_BACKSPACE, -1), be_const_str(&be_local_const_str_SYMBOL_BACKSPACE) },
{ be_const_key(STYLE_TEXT_DECOR, 435), be_const_int(32898) },
{ be_const_key(STYLE_TRANSITION_PROP_3, 212), be_const_int(180) },
{ be_const_key(GAUGE_PART_MAIN, 428), be_const_int(0) },
{ be_const_key(SYMBOL_DOWNLOAD, -1), be_const_str(&be_local_const_str_SYMBOL_DOWNLOAD) },
{ be_const_key(ALIGN_OUT_BOTTOM_RIGHT, -1), be_const_int(14) },
{ be_const_key(SYMBOL_DOWN, -1), be_const_str(&be_local_const_str_SYMBOL_DOWN) },
{ be_const_key(EVENT_PRESSED, -1), be_const_int(0) },
{ be_const_key(STYLE_VALUE_LETTER_SPACE, 18), be_const_int(112) },
{ be_const_key(BTN_STATE_CHECKED_RELEASED, -1), be_const_int(3) },
{ be_const_key(STYLE_OUTLINE_WIDTH, 304), be_const_int(64) },
{ be_const_key(STYLE_PAD_INNER, -1), be_const_int(20) },
{ be_const_key(STYLE_PATTERN_BLEND_MODE, -1), be_const_int(96) },
{ be_const_key(LINEMETER_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(STYLE_SCALE_END_COLOR, -1), be_const_int(202) },
{ be_const_key(LABEL_LONG_DOT, -1), be_const_int(2) },
{ be_const_key(STYLE_TEXT_COLOR, 0), be_const_int(32905) },
{ be_const_key(STYLE_PATTERN_RECOLOR_OPA, -1), be_const_int(109) },
{ be_const_key(SYMBOL_FILE, -1), be_const_str(&be_local_const_str_SYMBOL_FILE) },
{ be_const_key(STYLE_SCALE_BORDER_WIDTH, -1), be_const_int(193) },
{ be_const_key(HSPI, -1), be_const_int(0) },
{ be_const_key(OBJ_PART_VIRTUAL_FIRST, 341), be_const_int(1) },
{ be_const_key(SYMBOL_WIFI, 179), be_const_str(&be_local_const_str_SYMBOL_WIFI) },
{ be_const_key(LABEL_ALIGN_CENTER, -1), be_const_int(1) },
{ be_const_key(ALIGN_OUT_LEFT_MID, -1), be_const_int(16) },
{ be_const_key(STYLE_SCALE_END_LINE_WIDTH, -1), be_const_int(195) },
{ be_const_key(ROLLER_MODE_NORMAL, 409), be_const_int(0) },
{ be_const_key(SYMBOL_EDIT, 271), be_const_str(&be_local_const_str_SYMBOL_EDIT) },
{ be_const_key(STYLE_SCALE_WIDTH, -1), be_const_int(192) },
{ be_const_key(BORDER_SIDE_INTERNAL, -1), be_const_int(16) },
{ be_const_key(CHECKBOX_PART_BG, -1), be_const_int(0) },
{ be_const_key(CHART_TYPE_NONE, 355), be_const_int(0) },
{ be_const_key(SYMBOL_UPLOAD, 401), be_const_str(&be_local_const_str_SYMBOL_UPLOAD) },
{ be_const_key(ALIGN_OUT_RIGHT_TOP, -1), be_const_int(18) },
{ be_const_key(DRAG_DIR_VER, -1), be_const_int(2) },
{ be_const_key(CHART_PART_BG, 160), be_const_int(0) },
{ be_const_key(EVENT_INSERT, -1), be_const_int(17) },
{ be_const_key(BORDER_SIDE_TOP, -1), be_const_int(2) },
{ be_const_key(STYLE_TEXT_SEL_COLOR, -1), be_const_int(32906) },
{ be_const_key(STYLE_IMAGE_RECOLOR_OPA, -1), be_const_int(32941) },
{ be_const_key(SYMBOL_DOWN, 114), be_const_str(&be_local_const_str_SYMBOL_DOWN) },
{ be_const_key(BTNMATRIX_CTRL_HIDDEN, 192), be_const_int(8) },
{ be_const_key(FIT_TIGHT, -1), be_const_int(1) },
{ be_const_key(STYLE_VALUE_BLEND_MODE, 347), be_const_int(114) },
{ be_const_key(FS_RES_FS_ERR, 74), be_const_int(2) },
{ be_const_key(SLIDER_TYPE_SYMMETRICAL, 373), be_const_int(1) },
{ be_const_key(STYLE_TRANSITION_PROP_5, -1), be_const_int(182) },
{ be_const_key(FS_RES_DENIED, 213), be_const_int(6) },
{ be_const_key(DRAG_DIR_HOR, 349), be_const_int(1) },
{ be_const_key(GAUGE_PART_MAJOR, 418), be_const_int(1) },
{ be_const_key(PROTECT_EVENT_TO_DISABLED, 73), be_const_int(64) },
{ be_const_key(STYLE_VALUE_OPA, -1), be_const_int(124) },
{ be_const_key(EVENT_LEAVE, 282), be_const_int(15) },
{ be_const_key(PROTECT_NONE, 81), be_const_int(0) },
{ be_const_key(PROTECT_PRESS_LOST, -1), be_const_int(16) },
{ be_const_key(YELLOW, 71), be_const_int(16776960) },
{ be_const_key(GESTURE_DIR_RIGHT, -1), be_const_int(3) },
{ be_const_key(VSPI, -1), be_const_int(1) },
{ be_const_key(STYLE_PATTERN_RECOLOR, -1), be_const_int(105) },
{ be_const_key(STYLE_SHADOW_COLOR, -1), be_const_int(89) },
{ be_const_key(KEY_BACKSPACE, -1), be_const_int(8) },
{ be_const_key(STYLE_OUTLINE_PAD, -1), be_const_int(65) },
{ be_const_key(AQUA, 322), be_const_int(65535) },
{ be_const_key(CHART_PART_SERIES_BG, 51), be_const_int(1) },
{ be_const_key(SPINNER_TYPE_CONSTANT_ARC, 452), be_const_int(2) },
{ be_const_key(ANIM_ON, 189), be_const_int(1) },
{ be_const_key(STYLE_TRANSFORM_ANGLE, -1), be_const_int(6) },
{ be_const_key(TEXTAREA_CURSOR_LAST, 23), be_const_int(32767) },
{ be_const_key(STYLE_VALUE_LINE_SPACE, -1), be_const_int(113) },
{ be_const_key(FIT_NONE, -1), be_const_int(0) },
{ be_const_key(STYLE_TEXT_SEL_BG_COLOR, 153), be_const_int(32907) },
{ be_const_key(STYLE_TRANSFORM_WIDTH, -1), be_const_int(4) },
{ be_const_key(CPICKER_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(get_hor_res, -1), be_const_func(lv0_get_hor_res) },
{ be_const_key(GRAD_DIR_NONE, -1), be_const_int(0) },
{ be_const_key(STYLE_TRANSITION_TIME, -1), be_const_int(176) },
{ be_const_key(STYLE_OUTLINE_BLEND_MODE, -1), be_const_int(66) },
{ be_const_key(BAR_TYPE_SYMMETRICAL, -1), be_const_int(1) },
{ be_const_key(ALIGN_IN_BOTTOM_LEFT, 277), be_const_int(4) },
{ be_const_key(PROTECT_POS, 165), be_const_int(4) },
{ be_const_key(DISP_ROT_270, -1), be_const_int(3) },
{ be_const_key(EVENT_LONG_PRESSED, -1), be_const_int(4) },
{ be_const_key(ALIGN_IN_TOP_LEFT, -1), be_const_int(1) },
{ be_const_key(CYAN, -1), be_const_int(65535) },
{ be_const_key(LABEL_LONG_EXPAND, -1), be_const_int(0) },
{ be_const_key(STYLE_RADIUS, 79), be_const_int(1) },
{ be_const_key(BLEND_MODE_ADDITIVE, -1), be_const_int(1) },
{ be_const_key(TXT_FLAG_EXPAND, 301), be_const_int(2) },
{ be_const_key(KEY_NEXT, -1), be_const_int(9) },
{ be_const_key(KEY_RIGHT, 391), be_const_int(19) },
{ be_const_key(OPA_80, -1), be_const_int(204) },
{ be_const_key(LAYOUT_ROW_TOP, -1), be_const_int(5) },
{ be_const_key(ROLLER_MODE_INFINITE, -1), be_const_int(1) },
{ be_const_key(FS_RES_FULL, 403), be_const_int(4) },
{ be_const_key(SPI, -1), be_const_int(0) },
{ be_const_key(SCROLLBAR_MODE_DRAG, -1), be_const_int(2) },
{ be_const_key(get_ver_res, 108), be_const_func(lv0_get_ver_res) },
{ be_const_key(EVENT_REFRESH, -1), be_const_int(18) },
{ be_const_key(BTNMATRIX_CTRL_NO_REPEAT, -1), be_const_int(16) },
{ be_const_key(SYMBOL_SHUFFLE, -1), be_const_str(&be_local_const_str_SYMBOL_SHUFFLE) },
{ be_const_key(STYLE_OPA_SCALE, -1), be_const_int(32780) },
{ be_const_key(CHART_CURSOR_UP, -1), be_const_int(2) },
{ be_const_key(STYLE_MARGIN_TOP, -1), be_const_int(21) },
{ be_const_key(ARC_TYPE_SYMMETRIC, 272), be_const_int(1) },
{ be_const_key(SYMBOL_BATTERY_3, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_3) },
{ be_const_key(start, 425), be_const_func(lv0_start) },
{ be_const_key(SYMBOL_WARNING, 62), be_const_str(&be_local_const_str_SYMBOL_WARNING) },
{ be_const_key(ALIGN_IN_BOTTOM_MID, -1), be_const_int(5) },
{ be_const_key(STATE_DISABLED, -1), be_const_int(32) },
{ be_const_key(KEY_ESC, -1), be_const_int(27) },
{ be_const_key(CPICKER_TYPE_RECT, -1), be_const_int(0) },
{ be_const_key(SYMBOL_KEYBOARD, -1), be_const_str(&be_local_const_str_SYMBOL_KEYBOARD) },
{ be_const_key(SYMBOL_EYE_CLOSE, 174), be_const_str(&be_local_const_str_SYMBOL_EYE_CLOSE) },
{ be_const_key(SYMBOL_IMAGE, 332), be_const_str(&be_local_const_str_SYMBOL_IMAGE) },
{ be_const_key(SYMBOL_PAUSE, 229), be_const_str(&be_local_const_str_SYMBOL_PAUSE) },
{ be_const_key(NAVY, 263), be_const_int(128) },
{ be_const_key(EVENT_KEY, -1), be_const_int(12) },
{ be_const_key(ALIGN_IN_TOP_MID, -1), be_const_int(2) },
{ be_const_key(STYLE_BG_BLEND_MODE, -1), be_const_int(32) },
{ be_const_key(SYMBOL_BULLET, -1), be_const_str(&be_local_const_str_SYMBOL_BULLET) },
{ be_const_key(EVENT_DRAG_END, 450), be_const_int(9) },
{ be_const_key(STYLE_SHADOW_WIDTH, -1), be_const_int(80) },
{ be_const_key(TABVIEW_TAB_POS_RIGHT, -1), be_const_int(4) },
{ be_const_key(STYLE_BORDER_SIDE, -1), be_const_int(49) },
{ be_const_key(BLEND_MODE_NORMAL, -1), be_const_int(0) },
{ be_const_key(SYMBOL_CLOSE, 455), be_const_str(&be_local_const_str_SYMBOL_CLOSE) },
{ be_const_key(SYMBOL_DIRECTORY, -1), be_const_str(&be_local_const_str_SYMBOL_DIRECTORY) },
{ be_const_key(GESTURE_DIR_LEFT, -1), be_const_int(2) },
{ be_const_key(EVENT_PRESS_LOST, -1), be_const_int(2) },
{ be_const_key(MAGENTA, 268), be_const_int(16711935) },
{ be_const_key(BAR_TYPE_NORMAL, -1), be_const_int(0) },
{ be_const_key(BLUE, 314), be_const_int(255) },
{ be_const_key(STYLE_PAD_LEFT, -1), be_const_int(18) },
{ be_const_key(FS_RES_OK, -1), be_const_int(0) },
{ be_const_key(SYMBOL_LIST, -1), be_const_str(&be_local_const_str_SYMBOL_LIST) },
{ be_const_key(LAYOUT_PRETTY_TOP, -1), be_const_int(8) },
{ be_const_key(BORDER_SIDE_BOTTOM, 358), be_const_int(1) },
{ be_const_key(DROPDOWN_DIR_UP, -1), be_const_int(1) },
{ be_const_key(STYLE_TRANSITION_PROP_6, -1), be_const_int(183) },
{ be_const_key(KEY_ESC, -1), be_const_int(27) },
{ be_const_key(LABEL_LONG_SROLL_CIRC, -1), be_const_int(4) },
{ be_const_key(SYMBOL_DOWNLOAD, -1), be_const_str(&be_local_const_str_SYMBOL_DOWNLOAD) },
{ be_const_key(ALIGN_OUT_BOTTOM_LEFT, 218), be_const_int(12) },
{ be_const_key(LINEMETER_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(GRAY, -1), be_const_int(8421504) },
{ be_const_key(SYMBOL_USB, 404), be_const_str(&be_local_const_str_SYMBOL_USB) },
{ be_const_key(ALIGN_OUT_RIGHT_BOTTOM, -1), be_const_int(20) },
{ be_const_key(BTN_STATE_DISABLED, 216), be_const_int(2) },
{ be_const_key(LIME, -1), be_const_int(65280) },
{ be_const_key(CPICKER_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(DISP_ROT_90, 166), be_const_int(1) },
{ be_const_key(SYMBOL_VOLUME_MID, -1), be_const_str(&be_local_const_str_SYMBOL_VOLUME_MID) },
{ be_const_key(LABEL_LONG_EXPAND, -1), be_const_int(0) },
{ be_const_key(FS_RES_FULL, -1), be_const_int(4) },
{ be_const_key(BLEND_MODE_ADDITIVE, -1), be_const_int(1) },
{ be_const_key(KEY_UP, -1), be_const_int(17) },
{ be_const_key(ALIGN_IN_BOTTOM_MID, -1), be_const_int(5) },
{ be_const_key(BAR_TYPE_CUSTOM, -1), be_const_int(2) },
{ be_const_key(STYLE_BG_BLEND_MODE, -1), be_const_int(32) },
{ be_const_key(SYMBOL_VOLUME_MID, 343), be_const_str(&be_local_const_str_SYMBOL_VOLUME_MID) },
{ be_const_key(CPICKER_COLOR_MODE_HUE, -1), be_const_int(0) },
{ be_const_key(LAYOUT_COLUMN_MID, -1), be_const_int(3) },
{ be_const_key(ALIGN_IN_BOTTOM_RIGHT, 207), be_const_int(6) },
{ be_const_key(LED_PART_MAIN, 425), be_const_int(0) },
{ be_const_key(ARC_PART_BG, -1), be_const_int(0) },
{ be_const_key(HSPI, -1), be_const_int(0) },
{ be_const_key(EVENT_VALUE_CHANGED, 51), be_const_int(16) },
{ be_const_key(CHART_AXIS_INVERSE_LABELS_ORDER, 305), be_const_int(2) },
{ be_const_key(STYLE_OUTLINE_COLOR, 103), be_const_int(73) },
{ be_const_key(FS_MODE_WR, -1), be_const_int(1) },
{ be_const_key(CPICKER_PART_KNOB, 221), be_const_int(1) },
{ be_const_key(LAYOUT_ROW_BOTTOM, -1), be_const_int(7) },
{ be_const_key(CHART_TYPE_LINE, 353), be_const_int(1) },
{ be_const_key(LABEL_ALIGN_RIGHT, -1), be_const_int(2) },
{ be_const_key(ALIGN_IN_RIGHT_MID, -1), be_const_int(8) },
{ be_const_key(CHECKBOX_PART_BG, -1), be_const_int(0) },
{ be_const_key(CPICKER_TYPE_RECT, -1), be_const_int(0) },
{ be_const_key(PURPLE, 127), be_const_int(8388736) },
{ be_const_key(STYLE_PATTERN_REPEAT, 182), be_const_int(97) },
{ be_const_key(SYMBOL_EYE_OPEN, 371), be_const_str(&be_local_const_str_SYMBOL_EYE_OPEN) },
{ be_const_key(FIT_MAX, -1), be_const_int(3) },
{ be_const_key(DROPDOWN_DIR_DOWN, -1), be_const_int(0) },
{ be_const_key(ANIM_OFF, 226), be_const_int(0) },
{ be_const_key(SYMBOL_DIRECTORY, -1), be_const_str(&be_local_const_str_SYMBOL_DIRECTORY) },
{ be_const_key(STYLE_BG_OPA, -1), be_const_int(44) },
{ be_const_key(PAGE_EDGE_LEFT, 14), be_const_int(1) },
{ be_const_key(STYLE_SCALE_BORDER_WIDTH, -1), be_const_int(193) },
{ be_const_key(STYLE_SHADOW_OPA, -1), be_const_int(92) },
{ be_const_key(screenshot, 128), be_const_func(lv0_screenshot) },
{ be_const_key(CPICKER_TYPE_DISC, -1), be_const_int(1) },
{ be_const_key(SYMBOL_PREV, 155), be_const_str(&be_local_const_str_SYMBOL_PREV) },
{ be_const_key(DRAG_DIR_BOTH, 184), be_const_int(3) },
{ be_const_key(PROTECT_PARENT, -1), be_const_int(2) },
{ be_const_key(ALIGN_OUT_BOTTOM_MID, -1), be_const_int(13) },
{ be_const_key(FS_RES_TOUT, -1), be_const_int(8) },
{ be_const_key(STATE_EDITED, 264), be_const_int(4) },
{ be_const_key(SYMBOL_BATTERY_3, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_3) },
{ be_const_key(GREEN, 16), be_const_int(32768) },
{ be_const_key(STYLE_SHADOW_COLOR, -1), be_const_int(89) },
{ be_const_key(STYLE_SHADOW_OFS_Y, 310), be_const_int(82) },
{ be_const_key(GAUGE_PART_MAJOR, -1), be_const_int(1) },
{ be_const_key(SYMBOL_MUTE, -1), be_const_str(&be_local_const_str_SYMBOL_MUTE) },
{ be_const_key(SLIDER_TYPE_NORMAL, 325), be_const_int(0) },
{ be_const_key(STYLE_BG_GRAD_DIR, 176), be_const_int(35) },
{ be_const_key(AQUA, -1), be_const_int(65535) },
{ be_const_key(SYMBOL_WARNING, 150), be_const_str(&be_local_const_str_SYMBOL_WARNING) },
{ be_const_key(STYLE_OUTLINE_BLEND_MODE, -1), be_const_int(66) },
{ be_const_key(STYLE_TEXT_LINE_SPACE, -1), be_const_int(32897) },
{ be_const_key(STYLE_OUTLINE_PAD, 451), be_const_int(65) },
{ be_const_key(STYLE_VALUE_LINE_SPACE, -1), be_const_int(113) },
{ be_const_key(STYLE_RADIUS, 222), be_const_int(1) },
{ be_const_key(EVENT_PRESSING, -1), be_const_int(1) },
{ be_const_key(STYLE_MARGIN_BOTTOM, -1), be_const_int(22) },
{ be_const_key(PURPLE, -1), be_const_int(8388736) },
{ be_const_key(BTN_STATE_PRESSED, 86), be_const_int(1) },
{ be_const_key(STYLE_SHADOW_SPREAD, -1), be_const_int(83) },
{ be_const_key(KEY_DEL, -1), be_const_int(127) },
{ be_const_key(SCROLLBAR_MODE_AUTO, -1), be_const_int(3) },
{ be_const_key(STYLE_VALUE_OPA, 54), be_const_int(124) },
{ be_const_key(ALIGN_OUT_RIGHT_MID, 60), be_const_int(19) },
{ be_const_key(BAR_TYPE_NORMAL, 61), be_const_int(0) },
{ be_const_key(OBJ_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(STYLE_IMAGE_RECOLOR, -1), be_const_int(32937) },
{ be_const_key(KEYBOARD_MODE_TEXT_UPPER, -1), be_const_int(1) },
{ be_const_key(EVENT_CANCEL, 298), be_const_int(20) },
{ be_const_key(STYLE_MARGIN_LEFT, -1), be_const_int(23) },
{ be_const_key(STYLE_PAD_LEFT, -1), be_const_int(18) },
{ be_const_key(SYMBOL_REFRESH, 453), be_const_str(&be_local_const_str_SYMBOL_REFRESH) },
{ be_const_key(SYMBOL_KEYBOARD, -1), be_const_str(&be_local_const_str_SYMBOL_KEYBOARD) },
{ be_const_key(DISP_SIZE_SMALL, 86), be_const_int(0) },
{ be_const_key(DROPDOWN_PART_SCROLLBAR, 296), be_const_int(65) },
{ be_const_key(CHART_AXIS_DRAW_LAST_TICK, -1), be_const_int(1) },
{ be_const_key(SYMBOL_UPLOAD, 356), be_const_str(&be_local_const_str_SYMBOL_UPLOAD) },
{ be_const_key(LABEL_LONG_DOT, 446), be_const_int(2) },
{ be_const_key(OPA_20, 364), be_const_int(51) },
{ be_const_key(SYMBOL_NEXT, -1), be_const_str(&be_local_const_str_SYMBOL_NEXT) },
{ be_const_key(KEY_RIGHT, -1), be_const_int(19) },
{ be_const_key(LABEL_ALIGN_AUTO, -1), be_const_int(3) },
{ be_const_key(ALIGN_OUT_TOP_LEFT, 242), be_const_int(9) },
{ be_const_key(STYLE_PAD_INNER, 279), be_const_int(20) },
{ be_const_key(SPINNER_TYPE_FILLSPIN_ARC, -1), be_const_int(1) },
{ be_const_key(montserrat_font, 259), be_const_func(lv0_load_montserrat_font) },
{ be_const_key(TEMPL_STYLE_Y, 257), be_const_int(1) },
{ be_const_key(SSPI, -1), be_const_int(2) },
{ be_const_key(STYLE_LINE_BLEND_MODE, -1), be_const_int(145) },
{ be_const_key(ALIGN_IN_RIGHT_MID, -1), be_const_int(8) },
{ be_const_key(ARC_PART_BG, 361), be_const_int(0) },
{ be_const_key(ARC_TYPE_NORMAL, -1), be_const_int(0) },
{ be_const_key(GAUGE_PART_NEEDLE, -1), be_const_int(2) },
{ be_const_key(MAGENTA, -1), be_const_int(16711935) },
{ be_const_key(LABEL_LONG_BREAK, -1), be_const_int(1) },
{ be_const_key(CHART_CURSOR_UP, -1), be_const_int(2) },
{ be_const_key(OPA_90, -1), be_const_int(229) },
{ be_const_key(STATE_FOCUSED, -1), be_const_int(2) },
{ be_const_key(LIST_PART_EDGE_FLASH, -1), be_const_int(2) },
{ be_const_key(ALIGN_OUT_LEFT_MID, -1), be_const_int(16) },
{ be_const_key(PROTECT_PRESS_LOST, -1), be_const_int(16) },
{ be_const_key(PROTECT_CHILD_CHG, 389), be_const_int(1) },
{ be_const_key(CHART_UPDATE_MODE_SHIFT, -1), be_const_int(0) },
{ be_const_key(STYLE_LINE_DASH_WIDTH, -1), be_const_int(146) },
{ be_const_key(FS_RES_UNKNOWN, -1), be_const_int(12) },
{ be_const_key(STYLE_BORDER_OPA, 52), be_const_int(60) },
{ be_const_key(layer_sys, 185), be_const_func(lv0_layer_sys) },
{ be_const_key(STYLE_BG_MAIN_STOP, 328), be_const_int(33) },
{ be_const_key(STYLE_LINE_DASH_GAP, -1), be_const_int(147) },
{ be_const_key(CHART_CURSOR_RIGHT, -1), be_const_int(1) },
{ be_const_key(CALENDAR_PART_BG, 26), be_const_int(0) },
{ be_const_key(OPA_30, 382), be_const_int(76) },
{ be_const_key(CHART_PART_BG, 32), be_const_int(0) },
{ be_const_key(BTNMATRIX_CTRL_CHECK_STATE, 208), be_const_int(128) },
{ be_const_key(FIT_PARENT, -1), be_const_int(2) },
{ be_const_key(STYLE_SIZE, -1), be_const_int(3) },
{ be_const_key(CHART_TYPE_NONE, -1), be_const_int(0) },
{ be_const_key(SYMBOL_WIFI, -1), be_const_str(&be_local_const_str_SYMBOL_WIFI) },
{ be_const_key(ALIGN_IN_BOTTOM_LEFT, 181), be_const_int(4) },
{ be_const_key(get_hor_res, 416), be_const_func(lv0_get_hor_res) },
{ be_const_key(ALIGN_IN_LEFT_MID, 304), be_const_int(7) },
{ be_const_key(SYMBOL_SETTINGS, -1), be_const_str(&be_local_const_str_SYMBOL_SETTINGS) },
{ be_const_key(FS_RES_LOCKED, -1), be_const_int(5) },
{ be_const_key(KEYBOARD_MODE_TEXT_LOWER, -1), be_const_int(0) },
{ be_const_key(STYLE_TEXT_DECOR, -1), be_const_int(32898) },
{ be_const_key(STYLE_TEXT_FONT, -1), be_const_int(32910) },
{ be_const_key(OPA_50, -1), be_const_int(127) },
{ be_const_key(STYLE_OPA_SCALE, -1), be_const_int(32780) },
{ be_const_key(ALIGN_OUT_BOTTOM_RIGHT, -1), be_const_int(14) },
{ be_const_key(BTN_STATE_CHECKED_PRESSED, -1), be_const_int(4) },
{ be_const_key(BORDER_SIDE_RIGHT, -1), be_const_int(8) },
{ be_const_key(STYLE_TEXT_LETTER_SPACE, 159), be_const_int(32896) },
{ be_const_key(STYLE_OUTLINE_WIDTH, -1), be_const_int(64) },
{ be_const_key(SPINNER_DIR_FORWARD, -1), be_const_int(0) },
{ be_const_key(STYLE_PATTERN_OPA, 343), be_const_int(108) },
{ be_const_key(KEY_HOME, 113), be_const_int(2) },
{ be_const_key(MAROON, -1), be_const_int(8388608) },
{ be_const_key(STYLE_PATTERN_RECOLOR_OPA, 169), be_const_int(109) },
{ be_const_key(LAYOUT_GRID, 260), be_const_int(11) },
{ be_const_key(TXT_CMD_STATE_PAR, -1), be_const_int(1) },
{ be_const_key(STYLE_SCALE_END_COLOR, -1), be_const_int(202) },
{ be_const_key(DISP_SIZE_EXTRA_LARGE, 198), be_const_int(3) },
{ be_const_key(LABEL_ALIGN_CENTER, -1), be_const_int(1) },
{ be_const_key(STYLE_SCALE_END_LINE_WIDTH, -1), be_const_int(195) },
{ be_const_key(FIT_NONE, -1), be_const_int(0) },
{ be_const_key(TEXT_DECOR_STRIKETHROUGH, 312), be_const_int(2) },
{ be_const_key(FS_RES_NOT_EX, 168), be_const_int(3) },
{ be_const_key(SYMBOL_DUMMY, 299), be_const_str(&be_local_const_str_SYMBOL_DUMMY) },
{ be_const_key(EVENT_LONG_PRESSED_REPEAT, 228), be_const_int(5) },
{ be_const_key(KEYBOARD_MODE_NUM, 27), be_const_int(3) },
{ be_const_key(LAYOUT_COLUMN_RIGHT, -1), be_const_int(4) },
{ be_const_key(DRAG_DIR_VER, -1), be_const_int(2) },
{ be_const_key(DROPDOWN_PART_LIST, -1), be_const_int(64) },
{ be_const_key(CHART_PART_SERIES_BG, -1), be_const_int(1) },
{ be_const_key(PROTECT_NONE, 266), be_const_int(0) },
{ be_const_key(DROPDOWN_DIR_RIGHT, -1), be_const_int(3) },
{ be_const_key(YELLOW, -1), be_const_int(16776960) },
{ be_const_key(SYMBOL_COPY, -1), be_const_str(&be_local_const_str_SYMBOL_COPY) },
{ be_const_key(SYMBOL_EDIT, 74), be_const_str(&be_local_const_str_SYMBOL_EDIT) },
{ be_const_key(STATE_CHECKED, -1), be_const_int(1) },
{ be_const_key(DRAG_DIR_HOR, -1), be_const_int(1) },
{ be_const_key(BTN_STATE_RELEASED, -1), be_const_int(0) },
{ be_const_key(EVENT_LEAVE, 322), be_const_int(15) },
{ be_const_key(ROLLER_MODE_INFINITE, -1), be_const_int(1) },
{ be_const_key(GESTURE_DIR_RIGHT, -1), be_const_int(3) },
{ be_const_key(BTNMATRIX_CTRL_NO_REPEAT, -1), be_const_int(16) },
{ be_const_key(KEYBOARD_PART_BTN, -1), be_const_int(1) },
{ be_const_key(FS_RES_DENIED, -1), be_const_int(6) },
{ be_const_key(DROPDOWN_DIR_LEFT, 117), be_const_int(2) },
{ be_const_key(STYLE_TEXT_COLOR, -1), be_const_int(32905) },
{ be_const_key(SYMBOL_GPS, -1), be_const_str(&be_local_const_str_SYMBOL_GPS) },
{ be_const_key(SYMBOL_EYE_CLOSE, 91), be_const_str(&be_local_const_str_SYMBOL_EYE_CLOSE) },
{ be_const_key(STYLE_TEXT_SEL_BG_COLOR, -1), be_const_int(32907) },
{ be_const_key(FS_RES_OK, -1), be_const_int(0) },
{ be_const_key(TXT_FLAG_FIT, 313), be_const_int(16) },
{ be_const_key(SYMBOL_BATTERY_EMPTY, -1), be_const_str(&be_local_const_str_SYMBOL_BATTERY_EMPTY) },
{ be_const_key(SYMBOL_TRASH, -1), be_const_str(&be_local_const_str_SYMBOL_TRASH) },
{ be_const_key(TXT_FLAG_RECOLOR, -1), be_const_int(1) },
{ be_const_key(STYLE_BORDER_POST, 5), be_const_int(51) },
{ be_const_key(TABVIEW_TAB_POS_BOTTOM, -1), be_const_int(2) },
{ be_const_key(CHECKBOX_PART_BULLET, -1), be_const_int(64) },
{ be_const_key(OBJ_PART_REAL_FIRST, 335), be_const_int(64) },
{ be_const_key(KEY_DOWN, 450), be_const_int(18) },
{ be_const_key(DRAG_DIR_ONE, 82), be_const_int(4) },
{ be_const_key(STYLE_TRANSITION_PROP_3, -1), be_const_int(180) },
{ be_const_key(STYLE_OUTLINE_OPA, 275), be_const_int(76) },
{ be_const_key(STYLE_TRANSFORM_WIDTH, -1), be_const_int(4) },
{ be_const_key(BORDER_SIDE_LEFT, 143), be_const_int(4) },
{ be_const_key(KEY_LEFT, -1), be_const_int(20) },
{ be_const_key(SYMBOL_VOLUME_MAX, -1), be_const_str(&be_local_const_str_SYMBOL_VOLUME_MAX) },
{ be_const_key(STYLE_IMAGE_BLEND_MODE, -1), be_const_int(32928) },
{ be_const_key(CHART_AXIS_SECONDARY_Y, 17), be_const_int(1) },
{ be_const_key(CPICKER_COLOR_MODE_SATURATION, -1), be_const_int(1) },
{ be_const_key(BORDER_SIDE_FULL, -1), be_const_int(15) },
{ be_const_key(SPINNER_TYPE_SPINNING_ARC, -1), be_const_int(0) },
{ be_const_key(ARC_TYPE_SYMMETRIC, -1), be_const_int(1) },
{ be_const_key(BTN_STATE_PRESSED, 93), be_const_int(1) },
{ be_const_key(STYLE_TRANSITION_PROP_5, -1), be_const_int(182) },
{ be_const_key(SYMBOL_NEW_LINE, 33), be_const_str(&be_local_const_str_SYMBOL_NEW_LINE) },
{ be_const_key(CALENDAR_PART_DAY_NAMES, -1), be_const_int(2) },
{ be_const_key(STYLE_BG_GRAD_COLOR, -1), be_const_int(42) },
{ be_const_key(STYLE_VALUE_OFS_Y, 71), be_const_int(116) },
{ be_const_key(DROPDOWN_PART_SELECTED, 441), be_const_int(66) },
{ be_const_key(STYLE_PATTERN_IMAGE, 97), be_const_int(110) },
{ be_const_key(BLUE, -1), be_const_int(255) },
{ be_const_key(CALENDAR_PART_DATE, -1), be_const_int(3) },
{ be_const_key(SYMBOL_CHARGE, 154), be_const_str(&be_local_const_str_SYMBOL_CHARGE) },
{ be_const_key(PROTECT_POS, -1), be_const_int(4) },
{ be_const_key(SYMBOL_STOP, 436), be_const_str(&be_local_const_str_SYMBOL_STOP) },
{ be_const_key(LAYOUT_ROW_TOP, 101), be_const_int(5) },
{ be_const_key(CALENDAR_PART_HEADER, -1), be_const_int(1) },
{ be_const_key(CHART_CURSOR_NONE, -1), be_const_int(0) },
{ be_const_key(STYLE_VALUE_LETTER_SPACE, -1), be_const_int(112) },
{ be_const_key(SYMBOL_PLUS, -1), be_const_str(&be_local_const_str_SYMBOL_PLUS) },
{ be_const_key(STATE_PRESSED, -1), be_const_int(16) },
{ be_const_key(ALIGN_IN_TOP_MID, 255), be_const_int(2) },
{ be_const_key(STYLE_CLIP_CORNER, 311), be_const_int(2) },
{ be_const_key(SYMBOL_HOME, -1), be_const_str(&be_local_const_str_SYMBOL_HOME) },
{ be_const_key(OPA_60, -1), be_const_int(153) },
{ be_const_key(KEYBOARD_PART_BG, -1), be_const_int(0) },
{ be_const_key(CHART_AXIS_SKIP_LAST_TICK, -1), be_const_int(0) },
{ be_const_key(SYMBOL_RIGHT, -1), be_const_str(&be_local_const_str_SYMBOL_RIGHT) },
{ be_const_key(SYMBOL_LOOP, -1), be_const_str(&be_local_const_str_SYMBOL_LOOP) },
{ be_const_key(STYLE_MARGIN_TOP, -1), be_const_int(21) },
{ be_const_key(STYLE_SCALE_GRAD_COLOR, -1), be_const_int(201) },
{ be_const_key(EVENT_DRAG_END, 227), be_const_int(9) },
{ be_const_key(OPA_0, -1), be_const_int(0) },
{ be_const_key(EVENT_PRESSED, 123), be_const_int(0) },
{ be_const_key(GESTURE_DIR_LEFT, -1), be_const_int(2) },
{ be_const_key(ALIGN_CENTER, -1), be_const_int(0) },
{ be_const_key(ALIGN_OUT_TOP_MID, -1), be_const_int(10) },
{ be_const_key(STYLE_PATTERN_RECOLOR, 92), be_const_int(105) },
{ be_const_key(TXT_FLAG_EXPAND, -1), be_const_int(2) },
{ be_const_key(STYLE_BORDER_WIDTH, 306), be_const_int(48) },
{ be_const_key(SYMBOL_BELL, -1), be_const_str(&be_local_const_str_SYMBOL_BELL) },
{ be_const_key(EVENT_KEY, -1), be_const_int(12) },
{ be_const_key(SYMBOL_BLUETOOTH, 55), be_const_str(&be_local_const_str_SYMBOL_BLUETOOTH) },
{ be_const_key(BTNMATRIX_CTRL_HIDDEN, -1), be_const_int(8) },
{ be_const_key(OPA_10, -1), be_const_int(25) },
{ be_const_key(EVENT_GESTURE, -1), be_const_int(11) },
{ be_const_key(SYMBOL_CALL, -1), be_const_str(&be_local_const_str_SYMBOL_CALL) },
{ be_const_key(BTN_STATE_CHECKED_DISABLED, -1), be_const_int(5) },
{ be_const_key(STYLE_BORDER_SIDE, -1), be_const_int(49) },
{ be_const_key(STATE_DISABLED, 289), be_const_int(32) },
{ be_const_key(PAGE_EDGE_TOP, -1), be_const_int(2) },
{ be_const_key(BTNMATRIX_CTRL_CLICK_TRIG, 37), be_const_int(256) },
{ be_const_key(NAVY, -1), be_const_int(128) },
{ be_const_key(SYMBOL_SAVE, 414), be_const_str(&be_local_const_str_SYMBOL_SAVE) },
{ be_const_key(STYLE_TRANSITION_PATH, 407), be_const_int(190) },
{ be_const_key(TABVIEW_TAB_POS_LEFT, 35), be_const_int(3) },
{ be_const_key(CYAN, -1), be_const_int(65535) },
{ be_const_key(EVENT_DRAG_BEGIN, 94), be_const_int(8) },
{ be_const_key(EVENT_PRESS_LOST, -1), be_const_int(2) },
{ be_const_key(SYMBOL_DRIVE, -1), be_const_str(&be_local_const_str_SYMBOL_DRIVE) },
{ be_const_key(SYMBOL_EJECT, -1), be_const_str(&be_local_const_str_SYMBOL_EJECT) },
{ be_const_key(SYMBOL_UP, -1), be_const_str(&be_local_const_str_SYMBOL_UP) },
{ be_const_key(OPA_COVER, -1), be_const_int(255) },
{ be_const_key(ALIGN_IN_TOP_LEFT, -1), be_const_int(1) },
{ be_const_key(SYMBOL_AUDIO, -1), be_const_str(&be_local_const_str_SYMBOL_AUDIO) },
{ be_const_key(PROTECT_EVENT_TO_DISABLED, 438), be_const_int(64) },
{ be_const_key(STYLE_TEXT_OPA, -1), be_const_int(32908) },
{ be_const_key(TXT_CMD_STATE_WAIT, -1), be_const_int(0) },
{ be_const_key(TEXTAREA_CURSOR_LAST, -1), be_const_int(32767) },
{ be_const_key(SPINNER_DIR_BACKWARD, -1), be_const_int(1) },
{ be_const_key(SYMBOL_STOP, -1), be_const_str(&be_local_const_str_SYMBOL_STOP) },
{ be_const_key(STYLE_PATTERN_REPEAT, -1), be_const_int(97) },
{ be_const_key(ALIGN_IN_TOP_RIGHT, -1), be_const_int(3) },
{ be_const_key(CHART_AXIS_INVERSE_LABELS_ORDER, -1), be_const_int(2) },
{ be_const_key(STYLE_PATTERN_OPA, 123), be_const_int(108) },
{ be_const_key(BLEND_MODE_SUBTRACTIVE, -1), be_const_int(2) },
{ be_const_key(SYMBOL_PASTE, 185), be_const_str(&be_local_const_str_SYMBOL_PASTE) },
{ be_const_key(BORDER_SIDE_NONE, -1), be_const_int(0) },
{ be_const_key(TEAL, -1), be_const_int(32896) },
{ be_const_key(FS_RES_HW_ERR, -1), be_const_int(1) },
{ be_const_key(STYLE_LINE_WIDTH, -1), be_const_int(144) },
{ be_const_key(EVENT_SHORT_CLICKED, -1), be_const_int(3) },
{ be_const_key(LIST_PART_SCROLLBAR, 72), be_const_int(1) },
{ be_const_key(STYLE_TEXT_SEL_COLOR, -1), be_const_int(32906) },
{ be_const_key(SYMBOL_LEFT, -1), be_const_str(&be_local_const_str_SYMBOL_LEFT) },
{ be_const_key(GRAD_DIR_VER, -1), be_const_int(1) },
{ be_const_key(EVENT_REFRESH, -1), be_const_int(18) },
{ be_const_key(KEY_ENTER, -1), be_const_int(10) },
{ be_const_key(TABVIEW_TAB_POS_TOP, 390), be_const_int(1) },
{ be_const_key(STYLE_SHADOW_BLEND_MODE, -1), be_const_int(84) },
{ be_const_key(SILVER, -1), be_const_int(12632256) },
{ be_const_key(SYMBOL_OK, -1), be_const_str(&be_local_const_str_SYMBOL_OK) },
{ be_const_key(TABVIEW_TAB_POS_NONE, -1), be_const_int(0) },
{ be_const_key(SYMBOL_PASTE, -1), be_const_str(&be_local_const_str_SYMBOL_PASTE) },
{ be_const_key(get_ver_res, 270), be_const_func(lv0_get_ver_res) },
{ be_const_key(STYLE_TRANSITION_TIME, -1), be_const_int(176) },
{ be_const_key(STYLE_PAD_TOP, -1), be_const_int(16) },
{ be_const_key(STYLE_TRANSFORM_ZOOM, -1), be_const_int(7) },
{ be_const_key(PAGE_EDGE_BOTTOM, -1), be_const_int(8) },
{ be_const_key(STYLE_LINE_COLOR, -1), be_const_int(153) },
{ be_const_key(STYLE_SHADOW_OFS_X, -1), be_const_int(81) },
{ be_const_key(SLIDER_TYPE_SYMMETRICAL, -1), be_const_int(1) },
{ be_const_key(OLIVE, -1), be_const_int(8421376) },
{ be_const_key(LIST_PART_BG, 223), be_const_int(0) },
{ be_const_key(SYMBOL_CUT, -1), be_const_str(&be_local_const_str_SYMBOL_CUT) },
{ be_const_key(STYLE_BG_COLOR, 244), be_const_int(41) },
{ be_const_key(SCROLLBAR_MODE_ON, 273), be_const_int(1) },
{ be_const_key(SYMBOL_BATTERY_FULL, 90), be_const_str(&be_local_const_str_SYMBOL_BATTERY_FULL) },
{ be_const_key(TEMPL_STYLE_Y, 48), be_const_int(1) },
{ be_const_key(STYLE_PAD_BOTTOM, -1), be_const_int(17) },
{ be_const_key(SYMBOL_NEW_LINE, -1), be_const_str(&be_local_const_str_SYMBOL_NEW_LINE) },
{ be_const_key(SYMBOL_NEXT, -1), be_const_str(&be_local_const_str_SYMBOL_NEXT) },
{ be_const_key(KEY_LEFT, 436), be_const_int(20) },
{ be_const_key(FIT_MAX, -1), be_const_int(3) },
{ be_const_key(LABEL_LONG_BREAK, -1), be_const_int(1) },
{ be_const_key(STYLE_TRANSITION_PROP_4, -1), be_const_int(181) },
{ be_const_key(SYMBOL_SD_CARD, -1), be_const_str(&be_local_const_str_SYMBOL_SD_CARD) },
{ be_const_key(STYLE_MARGIN_RIGHT, -1), be_const_int(24) },
{ be_const_key(SYMBOL_VIDEO, -1), be_const_str(&be_local_const_str_SYMBOL_VIDEO) },
{ be_const_key(CHART_UPDATE_MODE_CIRCULAR, -1), be_const_int(1) },
{ be_const_key(STYLE_MARGIN_RIGHT, 287), be_const_int(24) },
{ be_const_key(DROPDOWN_PART_MAIN, 455), be_const_int(0) },
{ be_const_key(DISP_ROT_180, -1), be_const_int(2) },
{ be_const_key(SPINNER_TYPE_CONSTANT_ARC, -1), be_const_int(2) },
{ be_const_key(TEXT_DECOR_UNDERLINE, 444), be_const_int(1) },
{ be_const_key(TXT_FLAG_CENTER, 164), be_const_int(4) },
{ be_const_key(SYMBOL_POWER, -1), be_const_str(&be_local_const_str_SYMBOL_POWER) },
{ be_const_key(STYLE_TRANSFORM_ANGLE, -1), be_const_int(6) },
{ be_const_key(ARC_TYPE_REVERSE, -1), be_const_int(2) },
{ be_const_key(SYMBOL_BATTERY_1, 342), be_const_str(&be_local_const_str_SYMBOL_BATTERY_1) },
{ be_const_key(DRAG_DIR_ONE, -1), be_const_int(4) },
{ be_const_key(BTNMATRIX_CTRL_CHECK_STATE, -1), be_const_int(128) },
{ be_const_key(STYLE_TRANSITION_DELAY, -1), be_const_int(177) },
{ be_const_key(EVENT_LONG_PRESSED_REPEAT, -1), be_const_int(5) },
{ be_const_key(LABEL_LONG_SROLL_CIRC, -1), be_const_int(4) },
{ be_const_key(WHITE, 429), be_const_int(16777215) },
{ be_const_key(LABEL_ALIGN_AUTO, -1), be_const_int(3) },
{ be_const_key(TXT_FLAG_FIT, -1), be_const_int(16) },
{ be_const_key(OPA_30, -1), be_const_int(76) },
{ be_const_key(SYMBOL_DUMMY, -1), be_const_str(&be_local_const_str_SYMBOL_DUMMY) },
{ be_const_key(TEXT_DECOR_UNDERLINE, -1), be_const_int(1) },
{ be_const_key(TABVIEW_TAB_POS_LEFT, -1), be_const_int(3) },
{ be_const_key(SYMBOL_EJECT, -1), be_const_str(&be_local_const_str_SYMBOL_EJECT) },
{ be_const_key(SPINNER_TYPE_FILLSPIN_ARC, -1), be_const_int(1) },
{ be_const_key(BORDER_SIDE_LEFT, -1), be_const_int(4) },
{ be_const_key(TABVIEW_TAB_POS_NONE, -1), be_const_int(0) },
{ be_const_key(TXT_FLAG_NONE, -1), be_const_int(0) },
{ be_const_key(STYLE_IMAGE_OPA, -1), be_const_int(32940) },
{ be_const_key(EVENT_DELETE, -1), be_const_int(21) },
{ be_const_key(SCROLLBAR_MODE_UNHIDE, 36), be_const_int(8) },
{ be_const_key(OBJMASK_PART_MAIN, -1), be_const_int(0) },
{ be_const_key(GESTURE_DIR_TOP, -1), be_const_int(0) },
{ be_const_key(TEMPL_STYLE_X, -1), be_const_int(0) },
{ be_const_key(BTNMATRIX_CTRL_DISABLED, -1), be_const_int(32) },
{ be_const_key(I2C, -1), be_const_int(1) },
{ be_const_key(CHART_AXIS_SKIP_LAST_TICK, -1), be_const_int(0) },
{ be_const_key(STYLE_BG_GRAD_COLOR, -1), be_const_int(42) },
{ be_const_key(SYMBOL_CUT, 207), be_const_str(&be_local_const_str_SYMBOL_CUT) },
{ be_const_key(CHART_TYPE_COLUMN, -1), be_const_int(2) },
{ be_const_key(start, -1), be_const_func(lv0_start) },
{ be_const_key(SCROLLBAR_MODE_DRAG, -1), be_const_int(2) },
{ be_const_key(FS_RES_BUSY, -1), be_const_int(7) },
{ be_const_key(BTNMATRIX_CTRL_CHECKABLE, 65), be_const_int(64) },
{ be_const_key(OPA_TRANSP, -1), be_const_int(0) },
{ be_const_key(PAGE_EDGE_RIGHT, -1), be_const_int(4) },
{ be_const_key(GESTURE_DIR_TOP, -1), be_const_int(0) },
{ be_const_key(KEY_DOWN, -1), be_const_int(18) },
{ be_const_key(OBJ_PART_REAL_FIRST, -1), be_const_int(64) },
{ be_const_key(seg7_font, -1), be_const_func(lv0_load_seg7_font) },
{ be_const_key(layer_top, 194), be_const_func(lv0_layer_top) },
{ be_const_key(SYMBOL_GPS, 279), be_const_str(&be_local_const_str_SYMBOL_GPS) },
};
static be_define_const_map(
m_liblvgl_map,
457
459
);
static be_define_const_module(

View File

@ -0,0 +1,25 @@
#include "be_constobj.h"
static be_define_const_map_slots(tasmota_driver_map) {
{ be_const_key(get_tasmota, -1), be_const_func(d_getTasmotaGlob) },
{ be_const_key(web_sensor, -1), be_const_int(0) },
{ be_const_key(json_append, 0), be_const_int(1) },
{ be_const_key(every_second, 4), be_const_int(2) },
{ be_const_key(every_100ms, 7), be_const_int(3) },
{ be_const_key(web_add_main_button, -1), be_const_int(4) },
{ be_const_key(web_add_button, -1), be_const_int(5) },
{ be_const_key(save_before_restart, -1), be_const_int(6) },
{ be_const_key(button_pressed, 1), be_const_int(7) },
};
static be_define_const_map(
tasmota_driver_map,
9
);
BE_EXPORT_VARIABLE be_define_const_class(
tasmota_driver,
8,
NULL,
Driver
);

View File

@ -47,8 +47,8 @@ extern "C" {
.type = BE_REAL \
}
#define be_const_str(_val) { \
.v.s = (bstring*)(_val), \
#define be_const_str(_str) { \
.v.s = (bstring*)(_str), \
.type = BE_STRING \
}
@ -57,6 +57,11 @@ extern "C" {
.type = BE_CLASS \
}
#define be_const_closure(_closure) { \
.v.c = &(_closure), \
.type = BE_CLOSURE \
}
#define be_const_module(_module) { \
.v.c = &(_module), \
.type = BE_MODULE \
@ -131,11 +136,21 @@ const bntvmodule be_native_module(_module) = { \
BE_REAL \
}
#define be_const_str(_string) { \
bvaldata(bstring(_string)), \
BE_STRING \
}
#define be_const_class(_class) { \
bvaldata(&(_class)), \
BE_CLASS \
}
#define be_const_closure(_closure) { \
bvaldata(&(_closure)), \
BE_CLOSURE \
}
#define be_const_module(_module) { \
bvaldata(&(_module)), \
BE_MODULE \

View File

@ -80,9 +80,9 @@ static void m_solidify_proto(bvm *vm, bproto *pr, const char * func_name, int bu
}
/* create static strings for name and source */
logfmt("be_define_local_const_str(%s_str_name, \"%s\", %i, 0, %u, 0);\n",
logfmt("be_define_local_const_str(%s_str_name, \"%s\", %i, %u);\n",
func_name, str(pr->name), be_strhash(pr->name), str_len(pr->name));
logfmt("be_define_local_const_str(%s_str_source, \"%s\", %i, 0, %u, 0);\n",
logfmt("be_define_local_const_str(%s_str_source, \"%s\", %i, %u);\n",
func_name, func_source, be_strhash(pr->source), str_len(pr->source));
/* create static strings first */
@ -95,7 +95,7 @@ static void m_solidify_proto(bvm *vm, bproto *pr, const char * func_name, int bu
if (len >= 255) {
be_raise(vm, "internal_error", "Strings greater than 255 chars not supported yet");
}
logfmt("\", %i, 0, %zu, 0);\n", be_strhash(pr->ktab[i].v.s), len >= 255 ? 255 : len);
logfmt("\", %i, %zu);\n", be_strhash(pr->ktab[i].v.s), len >= 255 ? 255 : len);
}
}
logfmt("\n");

View File

@ -252,15 +252,15 @@ typedef struct bntvmodule {
/* support for solidified berry functions */
/* native const strings outside of global string hash */
#define be_define_local_const_str(_name, _s, _hash, _extra, _len, _next) \
static const bcstring be_local_const_str_##_name = { \
.next = (bgcobject *)NULL, \
.type = BE_STRING, \
.marked = GC_CONST, \
.extra = 0, \
.slen = _len, \
.hash = 0, \
.s = _s \
#define be_define_local_const_str(_name, _s, _hash, _len) \
static const bcstring be_local_const_str_##_name = { \
.next = (bgcobject *)NULL, \
.type = BE_STRING, \
.marked = GC_CONST, \
.extra = 0, \
.slen = _len, \
.hash = 0, \
.s = _s \
}
#define be_local_const_str(_name) (bstring*) &be_local_const_str_##_name
@ -296,16 +296,16 @@ typedef struct bntvmodule {
#define be_define_local_proto(_name, _nstack, _argc, _is_const, _is_subproto, _is_upval) \
static const bproto _name##_proto = { \
NULL, /* bgcobject *next */ \
8, /* type BE_PROTO */ \
GC_CONST, /* marked outside of GC */ \
BE_PROTO, /* type BE_PROTO */ \
0x08, /* marked outside of GC */ \
(_nstack), /* nstack */ \
BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0),/* nupvals */ \
BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0),/* nupvals */ \
(_argc), /* argc */ \
0, /* varg */ \
NULL, /* bgcobject *gray */ \
BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /* bupvaldesc *upvals */ \
BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /* bupvaldesc *upvals */\
BE_IIF(_is_const)((bvalue*)&_name##_ktab,NULL), /* ktab */ \
BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL),/* bproto **ptab */ \
BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL),/* bproto **ptab */\
(binstruction*) &_name##_code, /* code */ \
be_local_const_str(_name##_str_name), /* name */ \
sizeof(_name##_code)/sizeof(uint32_t), /* codesize */ \
@ -319,8 +319,8 @@ typedef struct bntvmodule {
#define be_define_local_closure(_name) \
const bclosure _name##_closure = { \
NULL, /* bgcobject *next */ \
36, /* type BE_CLOSURE */ \
GC_CONST, /* marked */ \
BE_CLOSURE, /* type BE_CLOSURE */ \
GC_CONST, /* marked GC_CONST */ \
0, /* nupvals */ \
NULL, /* bgcobject *gray */ \
(bproto*) &_name##_proto, /* proto */ \

View File

@ -55,19 +55,20 @@ uint16_t Epd47::GetColorFromIndex(uint8_t index) {
Epd47::Epd47(int16_t dwidth, int16_t dheight) : Renderer(dwidth, dheight) {
width = dwidth;
height = dheight;
disp_bpp = 4;
}
int32_t Epd47::Init(void) {
epd_init(EPD_LUT_1K);
hl = epd_hl_init(WAVEFORM);
epd47_buffer = epd_hl_get_framebuffer(&hl);
framebuffer = epd47_buffer;
lvgl_param.fluslines = 10;
return 0;
}
void Epd47::DisplayInit(int8_t p, int8_t size, int8_t rot, int8_t font) {
if (p == DISPLAY_INIT_MODE) {
epd_poweron();
epd_clear();
@ -157,26 +158,49 @@ void Epd47::drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) {
}
void Epd47::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
xp = x0;
yp = y0;
//setAddrWindow_int(x0,y0,x1-1,y1-1);
// just save params or update frame
if (!x0 && !y0 && !x1 && !y1) {
//Updateframe();
} else {
seta_xp1 = x0;
seta_xp2 = x1;
seta_yp1 = y0;
seta_yp2 = y1;
}
}
void Epd47::pushColors(uint16_t *data, uint16_t len, boolean first) {
uint16_t color;
uint16_t cxp = xp;
while (len--) {
color = *data++;
uint8_t red = ((color >> 11) & 0x1f) << 3;
uint8_t green = ((color >> 5) & 0x3f) << 2;
uint8_t blue = (color & 0x1f) << 3;
color = (red + green + blue) / 3;
color >>= 4;
drawPixel(cxp, yp, color);
cxp++;
}
yp++;
static inline void lvgl_color_swap2(uint16_t *data, uint16_t len) { for (uint32_t i = 0; i < len; i++) (data[i] = data[i] << 8 | data[i] >> 8); }
void Epd47::pushColors(uint16_t *data, uint16_t len, boolean not_swapped) {
if (not_swapped == false) {
lvgl_color_swap2(data, len);
}
// stupid bw version
uint16_t x1 = seta_xp1;
uint16_t x2 = seta_xp2;
uint16_t y1 = seta_yp1;
uint16_t y2 = seta_yp2;
for (uint32_t y = y1; y < y2; y++) {
for (uint32_t x = x1; x < x2; x++) {
uint16_t color = *data++;
uint8_t red = ((color >> 11) & 0x1f) << 3;
uint8_t green = ((color >> 5) & 0x3f) << 2;
uint8_t blue = (color & 0x1f) << 3;
color = (red + green + blue) / 3;
color >>= 4;
drawPixel(x, y, color);
len--;
if (!len) {
seta_yp1 = y + 1;
return;
}
}
}
}
/* END OF FILE */

View File

@ -57,6 +57,10 @@ private:
uint16_t height;
uint16_t xp;
uint16_t yp;
uint16_t seta_xp1;
uint16_t seta_xp2;
uint16_t seta_yp1;
uint16_t seta_yp2;
};
#endif /* EPD4IN7_H */

View File

@ -3,6 +3,8 @@
// ARCHITECTURE-SPECIFIC TIMER STUFF ---------------------------------------
extern void lv_flush_callback(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
// Tick interval for LittlevGL internal timekeeping; 1 to 10 ms recommended
static const int lv_tick_interval_ms = 10;
@ -22,107 +24,16 @@ static void lv_tick_handler(void) { lv_tick_inc(lv_tick_interval_ms); }
#define ADC_YMIN 240
#define ADC_YMAX 840
uint32_t Touch_Status(uint32_t sel);
static bool touchscreen_read(struct _lv_indev_drv_t *indev_drv, lv_indev_data_t *data) {
// static lv_coord_t last_x = 0, last_y = 0;
// static uint8_t release_count = 0;
// // Get pointer to glue object from indev user data
// Adafruit_LvGL_Glue *glue = (Adafruit_LvGL_Glue *)indev_drv->user_data;
// uDisplay_lvgl *disp = glue->display;
// if (glue->is_adc_touch) {
// TouchScreen *touch = (TouchScreen *)glue->touchscreen;
// TSPoint p = touch->getPoint();
// // Serial.printf("%d %d %d\r\n", p.x, p.y, p.z);
// // Having an issue with spurious z=0 results from TouchScreen lib.
// // Since touch is polled periodically, workaround is to watch for
// // several successive z=0 results, and only then regard it as
// // a release event (otherwise still touched).
// if (p.z < touch->pressureThreshhold) { // A zero-ish value
// release_count += (release_count < 255);
// if (release_count >= 4) {
// data->state = LV_INDEV_STATE_REL; // Is REALLY RELEASED
// } else {
// data->state = LV_INDEV_STATE_PR; // Is STILL PRESSED
// }
// } else {
// release_count = 0; // Reset release counter
// data->state = LV_INDEV_STATE_PR; // Is PRESSED
// switch (glue->display->getRotation()) {
// case 0:
// last_x = map(p.x, ADC_XMIN, ADC_XMAX, 0, disp->width() - 1);
// last_y = map(p.y, ADC_YMAX, ADC_YMIN, 0, disp->height() - 1);
// break;
// case 1:
// last_x = map(p.y, ADC_YMAX, ADC_YMIN, 0, disp->width() - 1);
// last_y = map(p.x, ADC_XMAX, ADC_XMIN, 0, disp->height() - 1);
// break;
// case 2:
// last_x = map(p.x, ADC_XMAX, ADC_XMIN, 0, disp->width() - 1);
// last_y = map(p.y, ADC_YMIN, ADC_YMAX, 0, disp->height() - 1);
// break;
// case 3:
// last_x = map(p.y, ADC_YMIN, ADC_YMAX, 0, disp->width() - 1);
// last_y = map(p.x, ADC_XMIN, ADC_XMAX, 0, disp->height() - 1);
// break;
// }
// }
// data->point.x = last_x; // Last-pressed coordinates
// data->point.y = last_y;
// return false; // No buffering of ADC touch data
// } else {
// uint8_t fifo; // Number of points in touchscreen FIFO
// bool moar = false;
// Adafruit_STMPE610 *touch = (Adafruit_STMPE610 *)glue->touchscreen;
// // Before accessing SPI touchscreen, wait on any in-progress
// // DMA screen transfer to finish (shared bus).
// //disp->dmaWait();
// // disp->endWrite();
// if ((fifo = touch->bufferSize())) { // 1 or more points await
// data->state = LV_INDEV_STATE_PR; // Is PRESSED
// TS_Point p = touch->getPoint();
// // Serial.printf("%d %d %d\r\n", p.x, p.y, p.z);
// // On big TFT FeatherWing, raw X axis is flipped??
// if ((glue->display->width() == 480) || (glue->display->height() == 480)) {
// p.x = (TS_MINX + TS_MAXX) - p.x;
// }
// switch (glue->display->getRotation()) {
// case 0:
// last_x = map(p.x, TS_MAXX, TS_MINX, 0, disp->width() - 1);
// last_y = map(p.y, TS_MINY, TS_MAXY, 0, disp->height() - 1);
// break;
// case 1:
// last_x = map(p.y, TS_MINY, TS_MAXY, 0, disp->width() - 1);
// last_y = map(p.x, TS_MINX, TS_MAXX, 0, disp->height() - 1);
// break;
// case 2:
// last_x = map(p.x, TS_MINX, TS_MAXX, 0, disp->width() - 1);
// last_y = map(p.y, TS_MAXY, TS_MINY, 0, disp->height() - 1);
// break;
// case 3:
// last_x = map(p.y, TS_MAXY, TS_MINY, 0, disp->width() - 1);
// last_y = map(p.x, TS_MAXX, TS_MINX, 0, disp->height() - 1);
// break;
// }
// moar = (fifo > 1); // true if more in FIFO, false if last point
// #if defined(NRF52_SERIES)
// // Not sure what's up here, but nRF doesn't seem to always poll
// // the FIFO size correctly, causing false release events. If it
// // looks like we've read the last point from the FIFO, pause
// // briefly to allow any more FIFO events to pile up. This
// // doesn't seem to be necessary on SAMD or ESP32. ???
// if (!moar) {
// delay(50);
// }
// #endif
// } else { // FIFO empty
// data->state = LV_INDEV_STATE_REL; // Is RELEASED
// }
// data->point.x = last_x; // Last-pressed coordinates
// data->point.y = last_y;
// return moar;
// }
//lv_coord_t last_x = 0, last_y = 0;
//static uint8_t release_count = 0;
data->point.x = Touch_Status(1); // Last-pressed coordinates
data->point.y = Touch_Status(2);
data->state = Touch_Status(0);
return false; /*No buffering now so no more data read*/
}
@ -139,64 +50,65 @@ static bool touchscreen_read(struct _lv_indev_drv_t *indev_drv, lv_indev_data_t
// Actual RAM usage will be 2X these figures, since using 2 DMA buffers...
#define LV_BUFFER_ROWS 60 // Most others have a bit more space
// This is the flush function required for LittlevGL screen updates.
// It receives a bounding rect and an array of pixel data (conveniently
// already in 565 format, so the Earth was lucky there).
static void lv_flush_callback(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) {
// Get pointer to glue object from indev user data
Adafruit_LvGL_Glue *glue = (Adafruit_LvGL_Glue *)disp->user_data;
uint16_t width = (area->x2 - area->x1 + 1);
uint16_t height = (area->y2 - area->y1 + 1);
// // This is the flush function required for LittlevGL screen updates.
// // It receives a bounding rect and an array of pixel data (conveniently
// // already in 565 format, so the Earth was lucky there).
// static void lv_flush_callback(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) {
// // Get pointer to glue object from indev user data
// Adafruit_LvGL_Glue *glue = (Adafruit_LvGL_Glue *)disp->user_data;
if (glue->getScreenshotFile() != nullptr) {
// save pixels to file
int32_t btw = (width * height * LV_COLOR_DEPTH + 7) / 8;
while (btw > 0) {
int32_t ret = glue->getScreenshotFile()->write((const uint8_t*) color_p, btw);
//Serial.printf(">>> btw %d, written %d\n", btw, ret);
if (ret >= 0) {
btw -= ret;
} else {
btw = 0; // abort
}
}
lv_disp_flush_ready(disp);
return; // ok
}
// uint16_t width = (area->x2 - area->x1 + 1);
// uint16_t height = (area->y2 - area->y1 + 1);
uDisplay_lvgl *display = glue->display;
// // check if we are currently doing a screenshot
// if (glue->getScreenshotFile() != nullptr) {
// // save pixels to file
// int32_t btw = (width * height * LV_COLOR_DEPTH + 7) / 8;
// while (btw > 0) {
// int32_t ret = glue->getScreenshotFile()->write((const uint8_t*) color_p, btw);
// if (ret >= 0) {
// btw -= ret;
// } else {
// btw = 0; // abort
// }
// }
// lv_disp_flush_ready(disp);
// return; // ok
// // }
if (!glue->first_frame) {
//display->dmaWait(); // Wait for prior DMA transfer to complete
//display->endWrite(); // End transaction from any prior call
} else {
glue->first_frame = false;
}
// Renderer *display = glue->display;
// display->startWrite();
// display->setAddrWindow(area->x1, area->y1, width, height);
display->writePixels(area->x1, area->y1, width, height,
(uint16_t *)color_p, width * height);
// display->pushColors((uint16_t *)color_p, width * height, false);
// if (!glue->first_frame) {
// //display->dmaWait(); // Wait for prior DMA transfer to complete
// //display->endWrite(); // End transaction from any prior call
// } else {
// glue->first_frame = false;
// }
lv_disp_flush_ready(disp);
}
// display->setAddrWindow(area->x1, area->y1, area->x1+width, area->y1+height);
// display->pushColors((uint16_t *)color_p, width * height, true);
// display->setAddrWindow(0,0,0,0);
// lv_disp_flush_ready(disp);
// }
// #if (LV_USE_LOG)
// // Optional LittlevGL debug print function, writes to Serial if debug is
// // enabled when calling glue begin() function.
// static void lv_debug(lv_log_level_t level, const char *file, uint32_t line, const char *fname,
// const char *dsc) {
// Serial.print(file);
// Serial.write('@');
// Serial.print(line);
// Serial.print(":");
// Serial.print(fname);
// Serial.write("->");
// Serial.println(dsc);
// }
// #endif
#if (LV_USE_LOG)
// Optional LittlevGL debug print function, writes to Serial if debug is
// enabled when calling glue begin() function.
static void lv_debug(lv_log_level_t level, const char *file, uint32_t line, const char *fname,
const char *dsc) {
Serial.print(file);
Serial.write('@');
Serial.print(line);
Serial.print(":");
Serial.print(fname);
Serial.write("->");
Serial.println(dsc);
}
#endif
// GLUE LIB FUNCTIONS ------------------------------------------------------
@ -208,9 +120,6 @@ static void lv_debug(lv_log_level_t level, const char *file, uint32_t line, cons
*/
Adafruit_LvGL_Glue::Adafruit_LvGL_Glue(void)
: first_frame(true), lv_pixel_buf(NULL) {
#if defined(ARDUINO_ARCH_SAMD)
zerotimer = NULL;
#endif
}
// Destructor
@ -221,9 +130,6 @@ Adafruit_LvGL_Glue::Adafruit_LvGL_Glue(void)
*/
Adafruit_LvGL_Glue::~Adafruit_LvGL_Glue(void) {
delete[] lv_pixel_buf;
#if defined(ARDUINO_ARCH_SAMD)
delete zerotimer;
#endif
// Probably other stuff that could be deallocated here
}
@ -286,23 +192,34 @@ Adafruit_LvGL_Glue::~Adafruit_LvGL_Glue(void) {
* * LVGL_ERR_TIMER : Failure to set up timers
* * LVGL_ERR_ALLOC : Failure to allocate memory
*/
LvGLStatus Adafruit_LvGL_Glue::begin(uDisplay_lvgl *tft, bool debug) {
LvGLStatus Adafruit_LvGL_Glue::begin(Renderer *tft, bool debug) {
return begin(tft, (void *)NULL, debug);
}
LvGLStatus Adafruit_LvGL_Glue::begin(uDisplay_lvgl *tft, void *touch, bool debug) {
LvGLStatus Adafruit_LvGL_Glue::begin(Renderer *tft, void *touch, bool debug) {
lv_init();
// #if (LV_USE_LOG)
// if (debug) {
// lv_log_register_print_cb(lv_debug); // Register debug print function
// }
// #endif
// Allocate LvGL display buffer (x2 because DMA double buffering)
LvGLStatus status = LVGL_ERR_ALLOC;
// if ((lv_pixel_buf = new lv_color_t[LV_HOR_RES_MAX * LV_BUFFER_ROWS * 2])) {
if ((lv_pixel_buf = new lv_color_t[LV_HOR_RES_MAX * LV_BUFFER_ROWS])) {
uint32_t lvgl_buffer_size;
//lvgl_buffer_size = LV_HOR_RES_MAX * LV_BUFFER_ROWS;
uint8_t flushlines = tft->lvgl_pars()->fluslines;
lvgl_buffer_size = tft->width() * (flushlines ? flushlines:LV_BUFFER_ROWS);
if (tft->lvgl_pars()->use_dma) {
lvgl_buffer_size /= 2;
lv_pixel_buf2 = new lv_color_t[lvgl_buffer_size];
if (!lv_pixel_buf2) {
return status;
}
} else {
lv_pixel_buf2 = nullptr;
}
if ((lv_pixel_buf = new lv_color_t[lvgl_buffer_size])) {
display = tft;
touchscreen = (void *)touch;
@ -316,8 +233,8 @@ LvGLStatus Adafruit_LvGL_Glue::begin(uDisplay_lvgl *tft, void *touch, bool debug
// Initialize LvGL display buffers
lv_disp_buf_init(
&lv_disp_buf, lv_pixel_buf, // 1st half buf
nullptr, // 2nd half buf
LV_HOR_RES_MAX * LV_BUFFER_ROWS);
lv_pixel_buf2, // 2nd half buf
lvgl_buffer_size);
// Initialize LvGL display driver
lv_disp_drv_init(&lv_disp_drv);

View File

@ -2,7 +2,7 @@
#define _ADAFRUIT_LVGL_GLUE_H_
#include <lvgl.h> // LittlevGL core lib
#include <uDisplay_lvgl.h>
#include <renderer.h>
#include <Ticker.h> // ESP32-specific timer lib
#include <FS.h>
@ -27,10 +27,11 @@ public:
// bool debug = false);
// LvGLStatus begin(uDisplay_lvgl *tft, TouchScreen *touch,
// bool debug = false);
LvGLStatus begin(uDisplay_lvgl *tft, bool debug = false);
LvGLStatus begin(Renderer *tft, bool debug = false);
LvGLStatus begin(Renderer *tft, void *touch, bool debug);
// These items need to be public for some internal callbacks,
// but should be avoided by user code please!
uDisplay_lvgl *display; ///< Pointer to the SPITFT display instance
Renderer *display; ///< Pointer to the SPITFT display instance
void *touchscreen; ///< Pointer to the touchscreen object to use
bool is_adc_touch; ///< determines if the touchscreen controlelr is ADC based
bool first_frame; ///< Tracks if a call to `lv_flush_callback` needs to wait
@ -40,10 +41,10 @@ public:
void stopScreenshot(void) { screenshot = nullptr; }
private:
LvGLStatus begin(uDisplay_lvgl *tft, void *touch, bool debug);
lv_disp_drv_t lv_disp_drv;
lv_disp_buf_t lv_disp_buf;
lv_color_t *lv_pixel_buf;
lv_color_t *lv_pixel_buf2;
lv_indev_drv_t lv_indev_drv;
lv_indev_t *lv_input_dev_ptr;
Ticker tick;

View File

View File

View File

View File

View File

View File

@ -0,0 +1,17 @@
{
"name":"LVGL_assets",
"description":"Assets for LVGL on ESP32",
"keywords":"lvgl, display",
"authors":
{
"name": "xx",
"maintainer": true
},
"version": "7.0",
"license": "MIT License",
"frameworks": "arduino",
"platforms": "espressif32",
"build": {
"flags": [ "-DLV_LVGL_H_INCLUDE_SIMPLE" ]
}
}

View File

@ -0,0 +1,171 @@
/*******************************************************************************
* Size: 10 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 10 --format lvgl --bpp 1 -o c_files//seg7_10.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_10
#define SEG7_10 1
#endif
#if SEG7_10
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0xf0,
/* U+002E "." */
0xc0,
/* U+0030 "0" */
0x7a, 0x18, 0x61, 0x86, 0x18, 0x61, 0x85, 0xe0,
/* U+0031 "1" */
0xf7, 0x80,
/* U+0032 "2" */
0x78, 0x10, 0x41, 0x7a, 0x8, 0x20, 0x81, 0xe0,
/* U+0033 "3" */
0x78, 0x10, 0x41, 0x78, 0x10, 0x41, 0x5, 0xe0,
/* U+0034 "4" */
0x86, 0x18, 0x61, 0x78, 0x10, 0x41, 0x4,
/* U+0035 "5" */
0x7a, 0x8, 0x20, 0x78, 0x10, 0x41, 0x5, 0xe0,
/* U+0036 "6" */
0x7a, 0x8, 0x20, 0x7a, 0x18, 0x61, 0x85, 0xe0,
/* U+0037 "7" */
0x7a, 0x18, 0x61, 0x84, 0x10, 0x41, 0x4, 0x0,
/* U+0038 "8" */
0x7a, 0x18, 0x61, 0x7a, 0x18, 0x61, 0x85, 0xe0,
/* U+0039 "9" */
0x7a, 0x18, 0x61, 0x78, 0x10, 0x41, 0x5, 0xe0,
/* U+003A ":" */
0xc0, 0xc0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 32, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 131, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 131, .box_w = 4, .box_h = 1, .ofs_x = 2, .ofs_y = 5},
{.bitmap_index = 3, .adv_w = 0, .box_w = 2, .box_h = 1, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 4, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 12, .adv_w = 131, .box_w = 1, .box_h = 10, .ofs_x = 6, .ofs_y = 0},
{.bitmap_index = 14, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 22, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 30, .adv_w = 131, .box_w = 6, .box_h = 9, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 37, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 45, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 53, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 61, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 69, .adv_w = 131, .box_w = 6, .box_h = 10, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 77, .adv_w = 32, .box_w = 2, .box_h = 5, .ofs_x = 0, .ofs_y = 2}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_10 = {
#else
lv_font_t seg7_10 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 10, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -1,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_10*/

View File

@ -0,0 +1,180 @@
/*******************************************************************************
* Size: 12 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 12 --format lvgl --bpp 1 -o c_files//seg7_12.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_12
#define SEG7_12 1
#endif
#if SEG7_12
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0xfc,
/* U+002E "." */
0xc0,
/* U+0030 "0" */
0x7d, 0x6, 0xc, 0x18, 0x30, 0x60, 0xc1, 0x83,
0x6, 0xb, 0xe0,
/* U+0031 "1" */
0xfb, 0xe0,
/* U+0032 "2" */
0x7c, 0x4, 0x8, 0x10, 0x2f, 0xa0, 0x40, 0x81,
0x2, 0x3, 0xe0,
/* U+0033 "3" */
0xf8, 0x10, 0x41, 0x7, 0xe0, 0x41, 0x4, 0x10,
0x7e,
/* U+0034 "4" */
0x83, 0x6, 0xc, 0x18, 0x2f, 0x80, 0x81, 0x2,
0x4, 0x8,
/* U+0035 "5" */
0x7d, 0x2, 0x4, 0x8, 0xf, 0x80, 0x81, 0x2,
0x4, 0xb, 0xe0,
/* U+0036 "6" */
0x7d, 0x2, 0x4, 0x8, 0xf, 0xa0, 0xc1, 0x83,
0x6, 0xb, 0xe0,
/* U+0037 "7" */
0x7d, 0x6, 0xc, 0x18, 0x30, 0x40, 0x81, 0x2,
0x4, 0x8, 0x0,
/* U+0038 "8" */
0x7d, 0x6, 0xc, 0x18, 0x2f, 0xa0, 0xc1, 0x83,
0x6, 0xb, 0xe0,
/* U+0039 "9" */
0x7d, 0x6, 0xc, 0x18, 0x2f, 0x80, 0x81, 0x2,
0x4, 0xb, 0xe0,
/* U+003A ":" */
0xc0, 0x30
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 38, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 157, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 157, .box_w = 6, .box_h = 1, .ofs_x = 2, .ofs_y = 6},
{.bitmap_index = 3, .adv_w = 0, .box_w = 2, .box_h = 1, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 4, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 15, .adv_w = 157, .box_w = 1, .box_h = 12, .ofs_x = 7, .ofs_y = 0},
{.bitmap_index = 17, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 28, .adv_w = 157, .box_w = 6, .box_h = 12, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 37, .adv_w = 157, .box_w = 7, .box_h = 11, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 47, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 58, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 69, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 80, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 91, .adv_w = 157, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 102, .adv_w = 38, .box_w = 2, .box_h = 6, .ofs_x = 0, .ofs_y = 3}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_12 = {
#else
lv_font_t seg7_12 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 12, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -1,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_12*/

View File

@ -0,0 +1,186 @@
/*******************************************************************************
* Size: 14 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 14 --format lvgl --bpp 1 -o c_files//seg7_14.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_14
#define SEG7_14 1
#endif
#if SEG7_14
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0x7e, 0xfc,
/* U+002E "." */
0xf0,
/* U+0030 "0" */
0x7f, 0x5f, 0x70, 0x78, 0x3c, 0x1e, 0xf, 0x6,
0x0, 0xc1, 0xe0, 0xf0, 0x78, 0x3c, 0x1d, 0xf5,
0xfc,
/* U+0031 "1" */
0x7f, 0xf7, 0xff, 0xc0,
/* U+0032 "2" */
0x7f, 0x1f, 0x40, 0x60, 0x30, 0x18, 0xc, 0x6,
0x7d, 0xbe, 0x60, 0x30, 0x18, 0xc, 0x5, 0xf1,
0xfc,
/* U+0033 "3" */
0xfe, 0x7d, 0x3, 0x3, 0x3, 0x3, 0x3, 0x7d,
0x7d, 0x3, 0x3, 0x3, 0x3, 0x7d, 0xfe,
/* U+0034 "4" */
0x80, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0xe, 0xfa,
0x7d, 0x1, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x4,
/* U+0035 "5" */
0x7f, 0x5f, 0x30, 0x18, 0xc, 0x6, 0x3, 0x1,
0x7c, 0x3e, 0x80, 0xc0, 0x60, 0x30, 0x19, 0xf5,
0xfc,
/* U+0036 "6" */
0x7f, 0x5f, 0x30, 0x18, 0xc, 0x6, 0x3, 0x1,
0x7c, 0xbe, 0xe0, 0xf0, 0x78, 0x3c, 0x1d, 0xf5,
0xfc,
/* U+0037 "7" */
0x7f, 0x5f, 0x70, 0x78, 0x3c, 0x1e, 0xf, 0x6,
0x1, 0x1, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x4,
/* U+0038 "8" */
0x7f, 0x5f, 0x70, 0x78, 0x3c, 0x1e, 0xf, 0x7,
0x7d, 0xbe, 0xe0, 0xf0, 0x78, 0x3c, 0x1d, 0xf5,
0xfc,
/* U+0039 "9" */
0x7f, 0x5f, 0x70, 0x78, 0x3c, 0x1e, 0xf, 0x7,
0x7d, 0x3e, 0x80, 0xc0, 0x60, 0x30, 0x19, 0xf5,
0xfc,
/* U+003A ":" */
0xc3
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 45, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 183, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 183, .box_w = 7, .box_h = 2, .ofs_x = 2, .ofs_y = 6},
{.bitmap_index = 4, .adv_w = 0, .box_w = 2, .box_h = 2, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 5, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 22, .adv_w = 183, .box_w = 2, .box_h = 13, .ofs_x = 8, .ofs_y = 1},
{.bitmap_index = 26, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 43, .adv_w = 183, .box_w = 8, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 58, .adv_w = 183, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 74, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 91, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 108, .adv_w = 183, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 124, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 141, .adv_w = 183, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 158, .adv_w = 45, .box_w = 1, .box_h = 8, .ofs_x = 1, .ofs_y = 3}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_14 = {
#else
lv_font_t seg7_14 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 15, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -2,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_14*/

View File

@ -0,0 +1,189 @@
/*******************************************************************************
* Size: 16 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 16 --format lvgl --bpp 1 -o c_files//seg7_16.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_16
#define SEG7_16 1
#endif
#if SEG7_16
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0xff, 0xfc,
/* U+002E "." */
0xf0,
/* U+0030 "0" */
0x7f, 0xaf, 0xdc, 0xf, 0x3, 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x30, 0xc, 0x3, 0x0,
0xc0, 0x33, 0xf5, 0xfe,
/* U+003A ":" */
0xa0, 0xa
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 51, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 209, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 209, .box_w = 7, .box_h = 2, .ofs_x = 3, .ofs_y = 7},
{.bitmap_index = 4, .adv_w = 0, .box_w = 2, .box_h = 2, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 5, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 25, .adv_w = 209, .box_w = 2, .box_h = 14, .ofs_x = 9, .ofs_y = 1},
{.bitmap_index = 29, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 49, .adv_w = 209, .box_w = 9, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 67, .adv_w = 209, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 85, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 105, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 125, .adv_w = 209, .box_w = 10, .box_h = 15, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 144, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 164, .adv_w = 209, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 184, .adv_w = 51, .box_w = 2, .box_h = 8, .ofs_x = 1, .ofs_y = 3}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_16 = {
#else
lv_font_t seg7_16 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 16, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -2,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_16*/

View File

@ -0,0 +1,195 @@
/*******************************************************************************
* Size: 18 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 18 --format lvgl --bpp 1 -o c_files//seg7_18.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_18
#define SEG7_18 1
#endif
#if SEG7_18
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0x7f, 0x3f, 0x80,
/* U+002E "." */
0xf0,
/* U+0030 "0" */
0x7f, 0xd7, 0xf7, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0x80, 0x30, 0x7, 0x1, 0xe0,
0x3c, 0x7, 0x80, 0xf0, 0x1e, 0x3, 0xbf, 0xaf,
0xf8,
/* U+0031 "1" */
0x7f, 0xfd, 0x7f, 0xfd,
/* U+0032 "2" */
0x7f, 0xc7, 0xf4, 0x1, 0x80, 0x30, 0x6, 0x0,
0xc0, 0x18, 0x3, 0x3f, 0xb7, 0xf3, 0x0, 0x60,
0xc, 0x1, 0x80, 0x30, 0x6, 0x0, 0xbf, 0x8f,
0xf8,
/* U+0033 "3" */
0xff, 0x9f, 0xd0, 0xc, 0x3, 0x0, 0xc0, 0x30,
0xc, 0x3, 0x7f, 0x5f, 0xd0, 0xc, 0x3, 0x0,
0xc0, 0x30, 0xc, 0x3, 0x7f, 0x7f, 0xe0,
/* U+0034 "4" */
0x80, 0x38, 0xf, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1d, 0xfd, 0x3f, 0xa0, 0xc, 0x1, 0x80,
0x30, 0x6, 0x0, 0xc0, 0x18, 0x1,
/* U+0035 "5" */
0x7f, 0xd7, 0xf3, 0x0, 0x60, 0xc, 0x1, 0x80,
0x30, 0x6, 0x0, 0xbf, 0x87, 0xf4, 0x1, 0x80,
0x30, 0x6, 0x0, 0xc0, 0x18, 0x3, 0x3f, 0xaf,
0xf8,
/* U+0036 "6" */
0x7f, 0xd7, 0xf3, 0x0, 0x60, 0xc, 0x1, 0x80,
0x30, 0x6, 0x0, 0xbf, 0x97, 0xf7, 0x1, 0xe0,
0x3c, 0x7, 0x80, 0xf0, 0x1e, 0x3, 0xbf, 0xaf,
0xf8,
/* U+0037 "7" */
0x7f, 0xd7, 0xf7, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0x80, 0x20, 0x4, 0x1, 0x80,
0x30, 0x6, 0x0, 0xc0, 0x18, 0x3, 0x0, 0x20,
/* U+0038 "8" */
0x7f, 0xd7, 0xf7, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0xbf, 0xb7, 0xf7, 0x1, 0xe0,
0x3c, 0x7, 0x80, 0xf0, 0x1e, 0x3, 0xbf, 0xaf,
0xf8,
/* U+0039 "9" */
0x7f, 0xd7, 0xf7, 0x1, 0xe0, 0x3c, 0x7, 0x80,
0xf0, 0x1e, 0x3, 0xbf, 0xa7, 0xf4, 0x1, 0x80,
0x30, 0x6, 0x0, 0xc0, 0x18, 0x3, 0x3f, 0xaf,
0xf8,
/* U+003A ":" */
0xf0, 0x3, 0xc0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 58, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 235, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 235, .box_w = 9, .box_h = 2, .ofs_x = 3, .ofs_y = 8},
{.bitmap_index = 5, .adv_w = 0, .box_w = 2, .box_h = 2, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 6, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 31, .adv_w = 235, .box_w = 2, .box_h = 16, .ofs_x = 11, .ofs_y = 1},
{.bitmap_index = 35, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 60, .adv_w = 235, .box_w = 10, .box_h = 18, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 83, .adv_w = 235, .box_w = 11, .box_h = 16, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 105, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 130, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 155, .adv_w = 235, .box_w = 11, .box_h = 17, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 179, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 204, .adv_w = 235, .box_w = 11, .box_h = 18, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 229, .adv_w = 58, .box_w = 2, .box_h = 9, .ofs_x = 1, .ofs_y = 4}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_18 = {
#else
lv_font_t seg7_18 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 18, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -2,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_18*/

View File

@ -0,0 +1,219 @@
/*******************************************************************************
* Size: 20 px
* Bpp: 2
* Opts: --font DSEG7Classic-BoldItalic.ttf -r 0x20-0x3F --size 20 --format lvgl --bpp 2 -o c_files//seg7_20.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_20
#define SEG7_20 1
#endif
#if SEG7_20
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+0021 "!" */
/* U+002D "-" */
0x2, 0xfc, 0xe, 0xbe, 0x43, 0xf9,
/* U+002E "." */
0x2, 0xe, 0x42, 0x40,
/* U+0030 "0" */
0xb, 0xff, 0xc1, 0xb4, 0x3f, 0x38, 0x11, 0xaf,
0xc8, 0x79, 0x7e, 0xc3, 0x61, 0xff, 0xce, 0x43,
0x21, 0xf2, 0x19, 0xf, 0xfe, 0x26, 0x1f, 0xd8,
0x52, 0x1f, 0x61, 0xff, 0xc4, 0x42, 0x83, 0xf6,
0x12, 0x1f, 0xc8, 0x7f, 0xf4, 0x70, 0xd8, 0x7f,
0xf4, 0xd7, 0xf0, 0x10, 0x95, 0x5f, 0x2b, 0x4,
0x1f, 0xed, 0x0,
/* U+0031 "1" */
0xf, 0x9c, 0xc, 0x16, 0x1f, 0xc8, 0x87, 0xff,
0x1, 0x30, 0x51, 0x3, 0x20, 0x84, 0x43, 0xfb,
0xf, 0xf9, 0x6, 0x19, 0xb0, 0x0,
/* U+0032 "2" */
0xb, 0xff, 0xc1, 0xd0, 0x7e, 0xa0, 0x66, 0xbf,
0x90, 0xe5, 0xfb, 0xf, 0xff, 0x2, 0x21, 0xff,
0xd1, 0xc3, 0x5f, 0xf4, 0x1a, 0x50, 0x7e, 0xd0,
0x35, 0xfc, 0x87, 0x97, 0xf0, 0x64, 0x3f, 0xfc,
0x18, 0x7f, 0xf1, 0x17, 0xf0, 0x7c, 0xd7, 0xd8,
0x69, 0xf, 0xe4, 0x20,
/* U+0033 "3" */
0x7, 0xff, 0x83, 0x41, 0xfa, 0x81, 0x35, 0xfc,
0x86, 0x5f, 0xb0, 0xff, 0xee, 0xa2, 0x1f, 0xfc,
0xfc, 0x2b, 0xfe,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 0xc1, 0xf9,
0x60, 0xff, 0xb4, 0x3f, 0xe4, 0x3f, 0xf9, 0xf8,
0x7f, 0xf7, 0xd0, 0xff, 0xa0, 0xff, 0xe1, 0x70,
0x0,
/* U+0038 "8" */
0xb, 0xff, 0xc1, 0xb4, 0x3f, 0x50, 0x8, 0xd7,
0xf2, 0x1c, 0xbf, 0x61, 0xb0, 0xff, 0xed, 0xa2,
0x4, 0x43, 0xff, 0x99, 0x84, 0x9f, 0xf4, 0x19,
0xd0, 0xfb, 0x50, 0x1a, 0xfe, 0x50, 0x72, 0xfc,
0x1c, 0x87, 0xff, 0x33, 0xf, 0xfe, 0x3e, 0x1f,
0xfc, 0x45, 0xfc, 0x4, 0x33, 0x5f, 0x2b, 0x4,
0x87, 0xf6, 0x80,
/* U+0039 "9" */
0x7, 0xff, 0x82, 0xd0, 0xfd, 0x41, 0x1a, 0xfe,
0x43, 0x2f, 0xd8, 0x58, 0x7f, 0xf6, 0x51, 0x11,
0xf, 0xfe, 0x5e, 0x4, 0xff, 0xa0, 0xb9, 0xf,
0xb5, 0x5, 0x5f, 0x94, 0x19, 0x7e, 0xf, 0xfe,
0x86, 0x1f, 0xfd, 0x65, 0xf8, 0x8, 0x5d, 0x7c,
0xac, 0x10, 0x7f, 0x68, 0x0,
/* U+003A ":" */
0x2, 0xe, 0x82, 0x65, 0xa1, 0xff, 0xc5, 0x41,
0x4c, 0xc4
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 64, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 261, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 261, .box_w = 10, .box_h = 3, .ofs_x = 3, .ofs_y = 9},
{.bitmap_index = 6, .adv_w = 0, .box_w = 4, .box_h = 3, .ofs_x = -3, .ofs_y = 0},
{.bitmap_index = 10, .adv_w = 261, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 61, .adv_w = 261, .box_w = 5, .box_h = 19, .ofs_x = 11, .ofs_y = 1},
{.bitmap_index = 83, .adv_w = 261, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 127, .adv_w = 261, .box_w = 14, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 169, .adv_w = 261, .box_w = 14, .box_h = 19, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 214, .adv_w = 261, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 255, .adv_w = 261, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 301, .adv_w = 261, .box_w = 14, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 342, .adv_w = 261, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 393, .adv_w = 261, .box_w = 14, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 438, .adv_w = 64, .box_w = 4, .box_h = 11, .ofs_x = 0, .ofs_y = 4}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 2,
.kern_classes = 0,
.bitmap_format = 1,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_20 = {
#else
lv_font_t seg7_20 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 20, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -2,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_20*/

View File

@ -0,0 +1,235 @@
/*******************************************************************************
* Size: 24 px
* Bpp: 2
* Opts: --font DSEG7Classic-BoldItalic.ttf -r 0x20-0x3F --size 24 --format lvgl --bpp 2 -o c_files//seg7_24.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_24
#define SEG7_24 1
#endif
#if SEG7_24
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+0021 "!" */
/* U+002D "-" */
0x2f, 0xfc, 0x92, 0x1f, 0xa2, 0xf, 0xe8,
/* U+002E "." */
0x3c, 0x20, 0x50, 0x10,
/* U+0030 "0" */
0x9, 0xff, 0xfe, 0x0, 0x67, 0xf, 0xf9, 0x82,
0x98, 0x3f, 0xa5, 0x7, 0x5f, 0xfd, 0x7, 0xff,
0xa1, 0x2, 0x1c, 0x87, 0xff, 0x9, 0xf, 0xfe,
0x8e, 0xc, 0x3a, 0xf, 0xd8, 0x79, 0xc3, 0xf9,
0x84, 0x18, 0x7f, 0xf1, 0x55, 0x87, 0xf5, 0x3,
0xff, 0x88, 0x87, 0xff, 0xad, 0xf, 0xfe, 0x12,
0x1c, 0x81, 0xf, 0xfe, 0x8e, 0x19, 0x3f, 0xf8,
0x39, 0x42, 0x1f, 0x97, 0x5, 0xa1, 0xfe, 0x60,
0x80,
/* U+0031 "1" */
0xf, 0xe7, 0x9, 0x83, 0x41, 0xff, 0xc4, 0x40,
0x87, 0xfd, 0x83, 0xe, 0x83, 0xda, 0x82, 0x90,
0xa4, 0x32, 0x1f, 0xfc, 0x44, 0x8, 0x7f, 0xf1,
0x70, 0x28, 0x3a, 0x88, 0x0,
/* U+0032 "2" */
0x9, 0xff, 0xfe, 0x0, 0x72, 0x1f, 0xfc, 0xc,
0x3b, 0xf, 0xfe, 0x37, 0xff, 0x7, 0xff, 0x69,
0xf, 0xfe, 0x12, 0x1f, 0xfd, 0xac, 0x3f, 0xf8,
0x58, 0x7e, 0xbf, 0xf8, 0x3e, 0x90, 0xfd, 0x72,
0xb, 0xc1, 0xfd, 0x8, 0x49, 0x7f, 0xf2, 0x1f,
0xff, 0xf0, 0xc8, 0x7f, 0xf0, 0x90, 0xff, 0xe4,
0x61, 0xff, 0xc4, 0xbf, 0xfa, 0xe, 0x7c, 0x87,
0xe5, 0x7, 0x28, 0x3f, 0xd0, 0x60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0x26, 0xf, 0xfe, 0x25, 0xff, 0xc1, 0xff, 0xd8,
0x43, 0xff, 0x82, 0x86, 0x40, 0x87, 0xff, 0x43,
0xd, 0x87, 0xec, 0x36, 0x3f, 0xfe, 0xd, 0x62,
0x1f, 0xa8, 0xa0, 0xa0, 0xfe, 0xa2, 0x1d, 0xff,
0xd0, 0x7f, 0xfd, 0x90, 0x21, 0xff, 0xe6, 0xc3,
0x5f, 0xfc, 0x87, 0x48, 0x7e, 0x45, 0x1, 0x41,
0xfe, 0x60, 0x80,
/* U+003A ":" */
0x7, 0x2, 0x14, 0x60, 0x47, 0xc1, 0xff, 0xd4,
0xf0, 0x10, 0x22, 0x4
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 77, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 313, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 313, .box_w = 12, .box_h = 3, .ofs_x = 4, .ofs_y = 11},
{.bitmap_index = 7, .adv_w = 0, .box_w = 4, .box_h = 3, .ofs_x = -3, .ofs_y = 0},
{.bitmap_index = 11, .adv_w = 313, .box_w = 18, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 76, .adv_w = 313, .box_w = 6, .box_h = 23, .ofs_x = 13, .ofs_y = 1},
{.bitmap_index = 105, .adv_w = 313, .box_w = 18, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 167, .adv_w = 313, .box_w = 17, .box_h = 24, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 223, .adv_w = 313, .box_w = 17, .box_h = 23, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 276, .adv_w = 313, .box_w = 16, .box_h = 24, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 328, .adv_w = 313, .box_w = 17, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 388, .adv_w = 313, .box_w = 17, .box_h = 24, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 449, .adv_w = 313, .box_w = 18, .box_h = 24, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 516, .adv_w = 313, .box_w = 17, .box_h = 24, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 575, .adv_w = 77, .box_w = 5, .box_h = 13, .ofs_x = 0, .ofs_y = 5}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 2,
.kern_classes = 0,
.bitmap_format = 1,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_24 = {
#else
lv_font_t seg7_24 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 24, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -3,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_24*/

View File

@ -0,0 +1,262 @@
/*******************************************************************************
* Size: 28 px
* Bpp: 2
* Opts: --font DSEG7Classic-BoldItalic.ttf -r 0x20-0x3F --size 28 --format lvgl --bpp 2 -o c_files//seg7_28.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_28
#define SEG7_28 1
#endif
#if SEG7_28
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+0021 "!" */
/* U+002D "-" */
0xa, 0xbf, 0x90, 0x3a, 0xff, 0x40, 0x83, 0xfe,
0x8c, 0x3f, 0xcc,
/* U+002E "." */
0x14, 0x54, 0xa0, 0xa0, 0x20,
/* U+0030 "0" */
0xe, 0xaf, 0xfe, 0x8, 0x7d, 0x2f, 0xff, 0x6,
0xe, 0xf0, 0x7f, 0xf0, 0x1f, 0x4, 0x94, 0xf,
0xf3, 0xc1, 0xf5, 0xff, 0xf4, 0x1f, 0xfc, 0x7c,
0x3d, 0x87, 0xff, 0x59, 0x2, 0x1f, 0xfc, 0xc4,
0x8, 0x7f, 0xf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x6d, 0x2, 0x1f,
0xfd, 0xbc, 0x3f, 0xfd, 0xe8, 0x73, 0x5f, 0xc8,
0x7e, 0x65, 0xfe, 0xa0, 0x79, 0x83, 0xfe, 0xa8,
0x36, 0x1f, 0xfc, 0x24, 0x20,
/* U+003A ":" */
0x5, 0xa0, 0x51, 0x1, 0xf, 0x76, 0x19, 0xf,
0xfe, 0xe2, 0x1b, 0xb0, 0x21, 0xc8, 0x20, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 90, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 366, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 366, .box_w = 14, .box_h = 4, .ofs_x = 4, .ofs_y = 12},
{.bitmap_index = 11, .adv_w = 0, .box_w = 4, .box_h = 4, .ofs_x = -3, .ofs_y = 0},
{.bitmap_index = 16, .adv_w = 366, .box_w = 21, .box_h = 29, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 111, .adv_w = 366, .box_w = 7, .box_h = 27, .ofs_x = 15, .ofs_y = 1},
{.bitmap_index = 147, .adv_w = 366, .box_w = 21, .box_h = 29, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 227, .adv_w = 366, .box_w = 20, .box_h = 29, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 302, .adv_w = 366, .box_w = 20, .box_h = 27, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 382, .adv_w = 366, .box_w = 19, .box_h = 29, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 456, .adv_w = 366, .box_w = 20, .box_h = 29, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 540, .adv_w = 366, .box_w = 20, .box_h = 28, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 618, .adv_w = 366, .box_w = 21, .box_h = 29, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 714, .adv_w = 366, .box_w = 20, .box_h = 29, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 799, .adv_w = 90, .box_w = 6, .box_h = 15, .ofs_x = 0, .ofs_y = 6}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 2,
.kern_classes = 0,
.bitmap_format = 1,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_28 = {
#else
lv_font_t seg7_28 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 29, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -3,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_28*/

View File

@ -0,0 +1,309 @@
/*******************************************************************************
* Size: 36 px
* Bpp: 2
* Opts: --font DSEG7Classic-BoldItalic.ttf -r 0x20-0x3F --size 36 --format lvgl --bpp 2 -o c_files//seg7_36.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_36
#define SEG7_36 1
#endif
#if SEG7_36
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+0021 "!" */
/* U+002D "-" */
0x3, 0x5f, 0xfc, 0x0, 0xcc, 0xbf, 0xfc, 0xc,
0xc, 0x1f, 0xfc, 0x2c, 0x43, 0xff, 0x87, 0x3,
0xf, 0xfe, 0xe, 0x80,
/* U+002E "." */
0x14, 0x6, 0x99, 0x5, 0x21, 0x72, 0x28,
/* U+0030 "0" */
0xf, 0x57, 0xff, 0x11, 0xf, 0xda, 0xff, 0xf1,
0x24, 0x39, 0x60, 0xff, 0xe2, 0x24, 0x1a, 0x9a,
0x1f, 0xfc, 0x27, 0x90, 0xf5, 0xa1, 0xff, 0xc0,
0x78, 0x39, 0xa, 0x9f, 0xff, 0xc1, 0x83, 0xff,
0x99, 0x87, 0xff, 0x57, 0xf, 0xfe, 0x2a, 0x12,
0x1f, 0xfd, 0x54, 0x3f, 0xf9, 0x28, 0x7f, 0x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0x81, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 115, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 470, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 470, .box_w = 18, .box_h = 5, .ofs_x = 6, .ofs_y = 16},
{.bitmap_index = 20, .adv_w = 0, .box_w = 5, .box_h = 5, .ofs_x = -4, .ofs_y = 0},
{.bitmap_index = 27, .adv_w = 470, .box_w = 26, .box_h = 37, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 166, .adv_w = 470, .box_w = 8, .box_h = 35, .ofs_x = 20, .ofs_y = 1},
{.bitmap_index = 215, .adv_w = 470, .box_w = 26, .box_h = 37, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 330, .adv_w = 470, .box_w = 25, .box_h = 37, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 441, .adv_w = 470, .box_w = 25, .box_h = 34, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 547, .adv_w = 470, .box_w = 23, .box_h = 37, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 655, .adv_w = 470, .box_w = 24, .box_h = 37, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 777, .adv_w = 470, .box_w = 25, .box_h = 36, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 888, .adv_w = 470, .box_w = 26, .box_h = 37, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1029, .adv_w = 470, .box_w = 25, .box_h = 37, .ofs_x = 3, .ofs_y = 0},
{.bitmap_index = 1155, .adv_w = 115, .box_w = 7, .box_h = 20, .ofs_x = 0, .ofs_y = 8}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 2,
.kern_classes = 0,
.bitmap_format = 1,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_36 = {
#else
lv_font_t seg7_36 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 37, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -4,
.underline_thickness = 2,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_36*/

View File

@ -0,0 +1,368 @@
/*******************************************************************************
* Size: 48 px
* Bpp: 2
* Opts: --font DSEG7Classic-BoldItalic.ttf -r 0x20-0x3F --size 48 --format lvgl --bpp 2 -o c_files//seg7_48.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_48
#define SEG7_48 1
#endif
#if SEG7_48
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
/* U+0021 "!" */
/* U+002D "-" */
0xb, 0xff, 0xf8, 0xa8, 0x6c, 0x3f, 0xf8, 0xb2,
0xc, 0x3f, 0xf8, 0xf0, 0x7f, 0xf2, 0xd2, 0xf,
0xfe, 0x3e, 0x8c, 0x1f, 0xfc, 0x5c, 0x0,
/* U+002E "." */
0x5, 0xe4, 0x12, 0x9, 0x10, 0xd0, 0x7e, 0x43,
0x44, 0x82, 0x40,
/* U+0030 "0" */
0xf, 0xdf, 0xff, 0xcb, 0x43, 0xfd, 0x87, 0xff,
0x2e, 0xf, 0xca, 0xc3, 0xff, 0x97, 0xc1, 0xe6,
0x8c, 0x1f, 0xfc, 0x9e, 0x70, 0xec, 0x11, 0x7,
0xff, 0x1f, 0x90, 0xff, 0xa6, 0xf, 0xfe, 0x2f,
0x90, 0xff, 0xe0, 0xef, 0xff, 0xf1, 0x83, 0xfc,
0x87, 0xff, 0xfc, 0x3f, 0xf8, 0xa8, 0x72, 0x1f,
0xff, 0xf0, 0xe4, 0x3f, 0xf8, 0xb8, 0x76, 0x19,
0xf, 0xfe, 0xe6, 0x1f, 0xfc, 0xb4, 0x36, 0x1f,
0xfc, 0xb4, 0x3f, 0xfc, 0xe8, 0x7f, 0xf4, 0x10,
0xff, 0xff, 0x87, 0xff, 0x2d, 0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7f,
0xff, 0xc3, 0xff, 0xb5, 0x7f, 0xff, 0x12, 0xc3,
0xff, 0x83, 0x21, 0xff, 0xc4, 0x6c, 0x24, 0x3e,
0xd0, 0xff, 0xe3, 0x2b, 0x6, 0x1e, 0xc3, 0xff,
0x93, 0x34, 0x43, 0xb0, 0xff, 0xe5, 0xca, 0xf,
0x61, 0xff, 0xcb, 0x83, 0xe0,
/* U+003A ":" */
0xd, 0x79, 0xd, 0xa0, 0x83, 0xfa, 0xf, 0xfe,
0x2c, 0x16, 0x82, 0xe, 0xbc, 0x87, 0xff, 0xfc,
0x3f, 0xfc, 0x37, 0x90, 0xd2, 0x9, 0x9, 0xd,
0x7, 0xff, 0x1, 0xd, 0x5, 0x20, 0x90, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 154, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 627, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 0, .adv_w = 627, .box_w = 23, .box_h = 6, .ofs_x = 8, .ofs_y = 21},
{.bitmap_index = 23, .adv_w = 0, .box_w = 7, .box_h = 6, .ofs_x = -6, .ofs_y = 0},
{.bitmap_index = 34, .adv_w = 627, .box_w = 35, .box_h = 48, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 227, .adv_w = 627, .box_w = 11, .box_h = 45, .ofs_x = 26, .ofs_y = 2},
{.bitmap_index = 293, .adv_w = 627, .box_w = 35, .box_h = 48, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 467, .adv_w = 627, .box_w = 33, .box_h = 48, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 627, .adv_w = 627, .box_w = 33, .box_h = 44, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 769, .adv_w = 627, .box_w = 31, .box_h = 48, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 924, .adv_w = 627, .box_w = 33, .box_h = 48, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1102, .adv_w = 627, .box_w = 33, .box_h = 46, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 1247, .adv_w = 627, .box_w = 35, .box_h = 48, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1442, .adv_w = 627, .box_w = 33, .box_h = 48, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 1615, .adv_w = 154, .box_w = 9, .box_h = 26, .ofs_x = 0, .ofs_y = 11}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 2,
.kern_classes = 0,
.bitmap_format = 1,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_48 = {
#else
lv_font_t seg7_48 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 48, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -6,
.underline_thickness = 2,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_48*/

View File

@ -0,0 +1,171 @@
/*******************************************************************************
* Size: 8 px
* Bpp: 1
* Opts: --font DSEG7Classic-Bold.ttf -r 0x20-0x3F --size 8 --format lvgl --bpp 1 -o c_files//seg7_8.c
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#ifndef SEG7_8
#define SEG7_8 1
#endif
#if SEG7_8
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0x0,
/* U+002D "-" */
0xf0,
/* U+002E "." */
0xc0,
/* U+0030 "0" */
0x74, 0x63, 0x18, 0xc6, 0x2e,
/* U+0031 "1" */
0x7e,
/* U+0032 "2" */
0x70, 0x42, 0xe8, 0x42, 0xe,
/* U+0033 "3" */
0x70, 0x42, 0xe0, 0x84, 0x2e,
/* U+0034 "4" */
0x8c, 0x62, 0xe0, 0x84, 0x20,
/* U+0035 "5" */
0x74, 0x20, 0xe0, 0x84, 0x2e,
/* U+0036 "6" */
0x74, 0x20, 0xe8, 0xc6, 0x2e,
/* U+0037 "7" */
0x74, 0x63, 0x10, 0x84, 0x21,
/* U+0038 "8" */
0x74, 0x62, 0xe8, 0xc6, 0x2e,
/* U+0039 "9" */
0x74, 0x62, 0xe0, 0x84, 0x2e,
/* U+003A ":" */
0x90
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 26, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1, .adv_w = 104, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 2, .adv_w = 104, .box_w = 4, .box_h = 1, .ofs_x = 1, .ofs_y = 4},
{.bitmap_index = 3, .adv_w = 0, .box_w = 2, .box_h = 1, .ofs_x = -1, .ofs_y = 0},
{.bitmap_index = 4, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 9, .adv_w = 104, .box_w = 1, .box_h = 8, .ofs_x = 5, .ofs_y = 0},
{.bitmap_index = 10, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 15, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 20, .adv_w = 104, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 25, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 30, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 35, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 40, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 45, .adv_w = 104, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 50, .adv_w = 26, .box_w = 1, .box_h = 4, .ofs_x = 0, .ofs_y = 2}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
static const uint16_t unicode_list_0[] = {
0x0, 0x1, 0xd, 0xe
};
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
{
.range_start = 32, .range_length = 15, .glyph_id_start = 1,
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
},
{
.range_start = 48, .range_length = 11, .glyph_id_start = 5,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 2,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t seg7_8 = {
#else
lv_font_t seg7_8 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 8, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
.underline_position = -1,
.underline_thickness = 0,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if SEG7_8*/

View File

@ -0,0 +1 @@
/* empty file required to force compilation of this lib */

View File

@ -50,8 +50,8 @@ uint16_t uDisplay_lvgl::GetColorFromIndex(uint8_t index) {
return udisp_colors[index];
}
extern uint8_t *buffer;
extern uint8_t color_type;
extern uint8_t *buffer_lvgl;
extern uint8_t color_type_lvgl;
uDisplay_lvgl::uDisplay_lvgl(char *lp) {
// analyse decriptor
@ -103,9 +103,9 @@ uDisplay_lvgl::uDisplay_lvgl(char *lp) {
gys = next_val(&lp1);
bpp = next_val(&lp1);
if (bpp == 1) {
color_type = uCOLOR_BW;
color_type_lvgl = uCOLOR_BW;
} else {
color_type = uCOLOR_COLOR;
color_type_lvgl = uCOLOR_COLOR;
}
str2c(&lp1, ibuff, sizeof(ibuff));
if (!strncmp(ibuff, "I2C", 3)) {
@ -350,14 +350,14 @@ void uDisplay_lvgl::Init(void) {
wire = &Wire;
wire->begin(i2c_sda, i2c_scl);
if (bpp < 16) {
if (buffer) free(buffer);
if (buffer_lvgl) free(buffer_lvgl);
#ifdef ESP8266
buffer = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
buffer_lvgl = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
#else
if (psramFound()) {
buffer = (uint8_t*)heap_caps_malloc((gxs * gys * bpp) / 8, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
buffer_lvgl = (uint8_t*)heap_caps_malloc((gxs * gys * bpp) / 8, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
} else {
buffer = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
buffer_lvgl = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
}
#endif
}
@ -377,12 +377,12 @@ void uDisplay_lvgl::Init(void) {
if (ep_mode) {
#ifdef ESP8266
buffer = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
buffer_lvgl = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
#else
if (psramFound()) {
buffer = (uint8_t*)heap_caps_malloc((gxs * gys * bpp) / 8, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
buffer_lvgl = (uint8_t*)heap_caps_malloc((gxs * gys * bpp) / 8, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
} else {
buffer = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
buffer_lvgl = (uint8_t*)calloc((gxs * gys * bpp) / 8, 1);
}
#endif
}
@ -609,70 +609,70 @@ void uDisplay_lvgl::i2c_command(uint8_t val) {
void uDisplay_lvgl::Updateframe(void) {
if (ep_mode) {
Updateframe_EPD();
return;
}
// if (ep_mode) {
// Updateframe_EPD();
// return;
// }
if (interface == _UDSP_I2C) {
// if (interface == _UDSP_I2C) {
#if 0
i2c_command(saw_1);
i2c_command(i2c_page_start);
i2c_command(i2c_page_end);
i2c_command(saw_2);
i2c_command(i2c_col_start);
i2c_command(i2c_col_end);
// #if 0
// i2c_command(saw_1);
// i2c_command(i2c_page_start);
// i2c_command(i2c_page_end);
// i2c_command(saw_2);
// i2c_command(i2c_col_start);
// i2c_command(i2c_col_end);
uint16_t count = gxs * ((gys + 7) / 8);
uint8_t *ptr = buffer;
wire->beginTransmission(i2caddr);
i2c_command(saw_3);
uint8_t bytesOut = 1;
while (count--) {
if (bytesOut >= WIRE_MAX) {
wire->endTransmission();
wire->beginTransmission(i2caddr);
i2c_command(saw_3);
bytesOut = 1;
}
i2c_command(*ptr++);
bytesOut++;
}
wire->endTransmission();
#else
// uint16_t count = gxs * ((gys + 7) / 8);
// uint8_t *ptr = buffer_lvgl;
// wire->beginTransmission(i2caddr);
// i2c_command(saw_3);
// uint8_t bytesOut = 1;
// while (count--) {
// if (bytesOut >= WIRE_MAX) {
// wire->endTransmission();
// wire->beginTransmission(i2caddr);
// i2c_command(saw_3);
// bytesOut = 1;
// }
// i2c_command(*ptr++);
// bytesOut++;
// }
// wire->endTransmission();
// #else
i2c_command(saw_1 | 0x0); // set low col = 0, 0x00
i2c_command(i2c_page_start | 0x0); // set hi col = 0, 0x10
i2c_command(i2c_page_end | 0x0); // set startline line #0, 0x40
// i2c_command(saw_1 | 0x0); // set low col = 0, 0x00
// i2c_command(i2c_page_start | 0x0); // set hi col = 0, 0x10
// i2c_command(i2c_page_end | 0x0); // set startline line #0, 0x40
uint8_t ys = gys >> 3;
uint8_t xs = gxs >> 3;
//uint8_t xs = 132 >> 3;
uint8_t m_row = saw_2;
uint8_t m_col = i2c_col_start;
// uint8_t ys = gys >> 3;
// uint8_t xs = gxs >> 3;
// //uint8_t xs = 132 >> 3;
// uint8_t m_row = saw_2;
// uint8_t m_col = i2c_col_start;
uint16_t p = 0;
// uint16_t p = 0;
uint8_t i, j, k = 0;
// uint8_t i, j, k = 0;
for ( i = 0; i < ys; i++) {
// send a bunch of data in one xmission
i2c_command(0xB0 + i + m_row); //set page address
i2c_command(m_col & 0xf); //set lower column address
i2c_command(0x10 | (m_col >> 4)); //set higher column address
// for ( i = 0; i < ys; i++) {
// // send a bunch of data in one xmission
// i2c_command(0xB0 + i + m_row); //set page address
// i2c_command(m_col & 0xf); //set lower column address
// i2c_command(0x10 | (m_col >> 4)); //set higher column address
for ( j = 0; j < 8; j++) {
wire->beginTransmission(i2caddr);
wire->write(0x40);
for ( k = 0; k < xs; k++, p++) {
wire->write(buffer[p]);
}
wire->endTransmission();
}
}
#endif
}
// for ( j = 0; j < 8; j++) {
// wire->beginTransmission(i2caddr);
// wire->write(0x40);
// for ( k = 0; k < xs; k++, p++) {
// wire->write(buffer_lvgl[p]);
// }
// wire->endTransmission();
// }
// }
// #endif
// }
}
@ -884,7 +884,7 @@ void uDisplay_lvgl::setRotation(uint8_t rotation) {
}
void udisp_bpwr(uint8_t on);
void udisp_bpwr_lvgl(uint8_t on);
void uDisplay_lvgl::DisplayOnff(int8_t on) {
@ -892,7 +892,7 @@ void uDisplay_lvgl::DisplayOnff(int8_t on) {
return;
}
udisp_bpwr(on);
udisp_bpwr_lvgl(on);
if (interface == _UDSP_I2C) {
if (on) {
@ -946,7 +946,7 @@ void uDisplay_lvgl::invertDisplay(bool i) {
}
}
void udisp_dimm(uint8_t dim);
void udisp_dimm_lvgl(uint8_t dim);
void uDisplay_lvgl::dim(uint8_t dim) {
dimmer = dim;
@ -962,7 +962,7 @@ void uDisplay_lvgl::dim(uint8_t dim) {
if (bpanel >= 0) {
ledcWrite(ESP32_PWM_CHANNEL, dimmer);
} else {
udisp_dimm(dim);
udisp_dimm_lvgl(dim);
}
#endif
@ -1224,7 +1224,7 @@ void uDisplay_lvgl::SetLut(const unsigned char* lut) {
}
void uDisplay_lvgl::Updateframe_EPD(void) {
SetFrameMemory(buffer, 0, 0, gxs, gys);
SetFrameMemory(buffer_lvgl, 0, 0, gxs, gys);
DisplayFrame();
}
@ -1333,21 +1333,21 @@ void uDisplay_lvgl::DrawAbsolutePixel(int x, int y, int16_t color) {
}
if (IF_INVERT_COLOR) {
if (color) {
buffer[(x + y * w) / 8] |= 0x80 >> (x % 8);
buffer_lvgl[(x + y * w) / 8] |= 0x80 >> (x % 8);
} else {
buffer[(x + y * w) / 8] &= ~(0x80 >> (x % 8));
buffer_lvgl[(x + y * w) / 8] &= ~(0x80 >> (x % 8));
}
} else {
if (color) {
buffer[(x + y * w) / 8] &= ~(0x80 >> (x % 8));
buffer_lvgl[(x + y * w) / 8] &= ~(0x80 >> (x % 8));
} else {
buffer[(x + y * w) / 8] |= 0x80 >> (x % 8);
buffer_lvgl[(x + y * w) / 8] |= 0x80 >> (x % 8);
}
}
}
void uDisplay_lvgl::drawPixel_EPD(int16_t x, int16_t y, uint16_t color) {
if (!buffer) return;
if (!buffer_lvgl) return;
if ((x < 0) || (x >= width()) || (y < 0) || (y >= height()))
return;

View File

@ -13,3 +13,9 @@ if os.path.isfile("platformio_override.ini"):
print ("*** use provided platformio_override.ini as planned ***")
else:
shutil.copy("platformio_override_sample.ini", "platformio_override.ini")
# copy platformio_tasmota_cenv_sample.ini to platformio_tasmota_cenv.ini
if os.path.isfile("platformio_tasmota_cenv.ini"):
print ("*** use provided platformio_tasmota_cenv.ini as planned ***")
else:
shutil.copy("platformio_tasmota_cenv_sample.ini", "platformio_tasmota_cenv.ini")

View File

@ -11,6 +11,7 @@
[platformio]
; For best Gitpod performance remove the ";" in the next line. Needed Platformio files are cached and installed at first run
;core_dir = .platformio
; Custom config Zigbee [env] -> platformio_tasmota_cenv_example.ini
extra_configs = platformio_tasmota_cenv.ini
; *** Build/upload environment
@ -101,8 +102,8 @@ build_flags = ${esp82xx_defaults.build_flags}
[core_stage]
; *** Esp8266 core for Arduino version stage
platform_packages = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
; *** Use Xtensa build chain 10.2. GNU13 from https://github.com/earlephilhower/esp-quick-toolchain
mcspr/toolchain-xtensa @ 5.100200.201223
; *** Use Xtensa build chain 10.2. GNU23 from https://github.com/earlephilhower/esp-quick-toolchain
tasmota/toolchain-xtensa @ 5.100200.210303
build_unflags = ${esp_defaults.build_unflags}
-Wswitch-unreachable
build_flags = ${esp82xx_defaults.build_flags}
@ -119,12 +120,12 @@ upload_port = COM4
lib_extra_dirs = ${library.lib_extra_dirs}
; *** ESP32 lib. ALWAYS needed for ESP32 !!!
lib/libesp32
; *** uncomment the following line if you want to use LVGL in a Tasmota32 build
; lib/libesp32_lvgl
; *** uncomment the following line if you want to use Bluetooth or Apple Homekit in a Tasmota32 build
; lib/libesp32_div
; *** uncomment the following line if you want to use Epaper driver epidy in your Tasmota32 build
; lib/libesp32_epdiy
; *** comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time
lib/libesp32_lvgl
; *** comment the following line if you dont use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time
lib/libesp32_div
; *** uncomment the following line if you dont use Epaper driver epidy in your Tasmota32 build. Reduces compile time
lib/libesp32_epdiy
[core32]
; Activate Stage Core32 by removing ";" in next 3 lines, if you want to override the standard core32
@ -161,63 +162,3 @@ lib_extra_dirs =
lib/lib_rf
; *** Mostly not used functions. Recommended to disable
lib/lib_div
; *** EXPERIMENTAL Tasmota version for ESP32-S2
[env:tasmota32s2]
extends = env:tasmota32_base
board = esp32s2
board_build.flash_mode = qio
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
platformio/tool-mklittlefs @ ~1.203.200522
platformio/tool-esptoolpy @ ~1.30000.0
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${common32.build_flags} -DFIRMWARE_LITE
lib_extra_dirs = lib/libesp32
lib_ignore =
NimBLE-Arduino
Micro-RTSP
ESP32-HomeKit
; *** EXPERIMENTAL Tasmota version for ESP32-C3
[env:tasmota32c3]
extends = env:tasmota32_base
board = esp32c3
platform = https://github.com/Jason2866/platform-espressif32.git#feature/arduino-c3
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
tasmota/toolchain-riscv32
platformio/tool-mklittlefs @ ~1.203.200522
build_unflags = ${esp32_defaults.build_unflags} -mtarget-align
build_flags = ${esp32_defaults.build_flags} -DFIRMWARE_LITE
-I$PROJECT_DIR/include
-include "fix_esp32c3.h"
;-DESP32_STAGE=true
lib_extra_dirs = lib/libesp32
lib_ignore =
NimBLE-Arduino
Micro-RTSP
; *** EXPERIMENTAL Tasmota version for ESP32 IDF4.4.
[env:tasmota32idf4]
extends = env:tasmota32_base
platform = https://github.com/Jason2866/platform-espressif32.git#feature/arduino-idf-v4.4
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
platformio/tool-mklittlefs @ ~1.203.200522
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
;-DESP32_STAGE=true
; *** Debug version used for PlatformIO Home Project Inspection
[env:tasmota-debug]
build_type = debug
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
; -Wstack-usage=300
[env:tasmota32-debug]
extends = env:tasmota32_base
build_type = debug
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
; -Wstack-usage=300

View File

@ -0,0 +1,63 @@
[env:tasmota-zigbee]
board = esp8266_4M2M
build_flags = ${common.build_flags}
-DUSE_ZIGBEE
-DUSE_UFILESYS
; *** EXPERIMENTAL Tasmota version for ESP32-S2
[env:tasmota32s2]
extends = env:tasmota32_base
board = esp32s2
board_build.flash_mode = qio
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
platformio/tool-mklittlefs @ ~1.203.200522
platformio/tool-esptoolpy @ ~1.30000.0
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${common32.build_flags} -DFIRMWARE_LITE
lib_extra_dirs = lib/libesp32
lib_ignore =
NimBLE-Arduino
Micro-RTSP
ESP32-HomeKit
; *** EXPERIMENTAL Tasmota version for ESP32-C3
[env:tasmota32c3]
extends = env:tasmota32_base
board = esp32c3
platform = https://github.com/Jason2866/platform-espressif32.git#feature/arduino-c3
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
tasmota/toolchain-riscv32
platformio/tool-mklittlefs @ ~1.203.200522
build_unflags = ${esp32_defaults.build_unflags} -mtarget-align
build_flags = ${esp32_defaults.build_flags} -DFIRMWARE_LITE
-I$PROJECT_DIR/include
-include "fix_esp32c3.h"
;-DESP32_STAGE=true
lib_extra_dirs = lib/libesp32
lib_ignore =
NimBLE-Arduino
Micro-RTSP
; *** EXPERIMENTAL Tasmota version for ESP32 IDF4.4.
[env:tasmota32idf4]
extends = env:tasmota32_base
platform = https://github.com/Jason2866/platform-espressif32.git#feature/arduino-idf-v4.4
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/v.2.0.0.pre/framework-arduinoespressif32-master-cf457d412.tar.gz
platformio/tool-mklittlefs @ ~1.203.200522
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
;-DESP32_STAGE=true
; *** Debug version used for PlatformIO Home Project Inspection
[env:tasmota-debug]
build_type = debug
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
; -Wstack-usage=300
[env:tasmota32-debug]
extends = env:tasmota32_base
build_type = debug
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
; -Wstack-usage=300

View File

@ -1,4 +1,3 @@
:H,ST7789,240,240,16,SPI,1,*,*,*,*,*,*,*,40
:S,2,1,3,0,80,30
:I
@ -17,6 +16,6 @@
:1,A0,50,00,01
:2,00,00,00,02
:3,60,00,00,03
i:20,21
:i,20,21
:TI2,38,32,23
#

View File

@ -345,6 +345,7 @@
#define D_JSON_GPIO "GPIO"
#define D_JSON_FLAG "FLAG"
#define D_JSON_BASE "BASE"
#define D_JSON_CMND "CMND"
#define D_CMND_TEMPOFFSET "TempOffset"
#define D_CMND_HUMOFFSET "HumOffset"
#define D_CMND_GLOBAL_TEMP "GlobalTemp"

View File

@ -303,7 +303,7 @@
#define D_CHECK_CREDENTIALS "Bitte SSID/Passwort überprüfen"
#define D_SUCCESSFUL_WIFI_CONNECTION "mit Wifi verbunden"
#define D_NOW_YOU_CAN_CLOSE_THIS_WINDOW "das Fenster kann geschlossen werden"
#define D_REDIRECTING_TO_NEW_IP "Umleitung zur neuen Geräte IP-Addresse"
#define D_REDIRECTING_TO_NEW_IP "Umleitung zur neuen Geräte IP-Adresse"
#define D_MQTT_PARAMETERS "MQTT-Einstellungen"
#define D_CLIENT "client"
@ -495,7 +495,7 @@
#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Nicht unterstützter Attribut Typ"
#define D_ZIGBEE_JSON_REQUIRED "Konfiguration muss JSON basiert sein"
#define D_ZIGBEE_RESET_1_OR_2 "1 oder 2 für Reset"
#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM gefunden auf Addresse"
#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM gefunden auf Adresse"
#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Zufällige Zigbee Parameter erstellt, Überprüfung mit 'ZbConfig'"
// xdrv_03_energy.ino
@ -659,9 +659,9 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
#define D_SENSOR_HX711_SCK "HX711 SCK"
#define D_SENSOR_HX711_DAT "HX711 DAT"
#define D_SENSOR_FTC532 "FTC532"
@ -741,9 +741,9 @@
#define D_SENSOR_SM2135_DAT "SM2135 Dat"
#define D_SENSOR_DEEPSLEEP "DeepSleep"
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_CLIENT_TX "Client TX"
#define D_SENSOR_CLIENT_RX "Client RX"
#define D_SENSOR_CLIENT_RESET "Client RST"
#define D_SENSOR_CLIENT_TX "Client TX"
#define D_SENSOR_CLIENT_RX "Client RX"
#define D_SENSOR_CLIENT_RESET "Client RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
@ -817,8 +817,8 @@
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
#define D_SENSOR_VL53L0X_XSHUT "VL53L0X XSHUT"
#define D_SENSOR_TFMINIPLUS_TX "TFmini+ TX"
#define D_SENSOR_TFMINIPLUS_RX "TFmini+ RX"
#define D_SENSOR_TFMINIPLUS_TX "TFmini+ TX"
#define D_SENSOR_TFMINIPLUS_RX "TFmini+ RX"
#define D_SENSOR_ZEROCROSS "ZC Puls"
#define D_SENSOR_HALLEFFECT "HallEffect"
#define D_SENSOR_EPD_DATA "EPD Data"
@ -869,7 +869,7 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
#define D_NEW_ADDRESS "Neue Addresse"
#define D_NEW_ADDRESS "Neue Adresse"
#define D_OUT_OF_RANGE "Außerhalb Bereich"
#define D_SENSOR_DETECTED "erkannt"
@ -985,7 +985,7 @@
#define D_FP_IMAGEFAIL "Abbildungsfehler" // 0x03 Failed to enroll the finger
#define D_FP_IMAGEMESS "schlechtes Abbild" // 0x06 Failed to generate character file due to overly disorderly fingerprint image
#define D_FP_FEATUREFAIL "Fingerabdruck zu klein" // 0x07 Failed to generate character file due to the lack of character point or small fingerprint image
#define D_FP_NOMATCH "keine Übereinstimmung" // 0x08 Finger doesn't match
#define D_FP_NOMATCH "keine Übereinstimmung" // 0x08 Finger doesn't match
#define D_FP_NOTFOUND "keinen Eintrag gefunden" // 0x09 Failed to find matching finger
#define D_FP_ENROLLMISMATCH "Fingerabdruck fehlerhaft" // 0x0A Failed to combine the character files
#define D_FP_BADLOCATION "Eintrag Fehler" // 0x0B Addressed PageID is beyond the finger library

View File

@ -496,7 +496,7 @@
#define D_ZIGBEE_JSON_REQUIRED "Configurazione richiede oggetti JSON"
#define D_ZIGBEE_RESET_1_OR_2 "1 o 2 per ripristino"
#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "Trovata EEPROM ZBBridge all'indirizzo"
#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizzazione parametri Zigbee, controlla con "ZbConfig""
#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizzazione parametri Zigbee, controlla con \"ZbConfig\""
// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energia - oggi"

View File

@ -0,0 +1,95 @@
Copyright (c) 2017, keshikan (http://www.keshikan.net),
with Reserved Font Name "DSEG".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More