esphome 2025.8.4__py3-none-any.whl → 2025.9.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- esphome/__main__.py +177 -105
- esphome/components/absolute_humidity/absolute_humidity.cpp +3 -5
- esphome/components/adc/__init__.py +1 -26
- esphome/components/adc/adc_sensor_esp32.cpp +29 -6
- esphome/components/adc/sensor.py +20 -0
- esphome/components/ags10/ags10.cpp +3 -18
- esphome/components/ags10/ags10.h +2 -12
- esphome/components/aht10/aht10.cpp +3 -3
- esphome/components/airthings_ble/__init__.py +2 -2
- esphome/components/alarm_control_panel/__init__.py +2 -2
- esphome/components/am2315c/am2315c.cpp +1 -17
- esphome/components/am2315c/am2315c.h +2 -3
- esphome/components/api/__init__.py +2 -2
- esphome/components/api/api_connection.cpp +38 -34
- esphome/components/api/api_connection.h +20 -40
- esphome/components/api/api_frame_helper.cpp +25 -25
- esphome/components/api/api_frame_helper.h +3 -3
- esphome/components/api/api_frame_helper_noise.cpp +75 -40
- esphome/components/api/api_frame_helper_noise.h +3 -7
- esphome/components/api/api_frame_helper_plaintext.cpp +17 -4
- esphome/components/api/api_frame_helper_plaintext.h +1 -4
- esphome/components/api/api_pb2.cpp +12 -2
- esphome/components/api/api_pb2.h +144 -143
- esphome/components/api/api_pb2_dump.cpp +6 -1
- esphome/components/api/api_pb2_service.cpp +0 -14
- esphome/components/api/api_pb2_service.h +1 -3
- esphome/components/api/client.py +5 -3
- esphome/components/api/proto.cpp +33 -37
- esphome/components/async_tcp/__init__.py +2 -2
- esphome/components/atm90e26/sensor.py +2 -0
- esphome/components/atm90e32/sensor.py +4 -2
- esphome/components/audio_adc/__init__.py +2 -2
- esphome/components/audio_dac/__init__.py +2 -2
- esphome/components/axs15231/touchscreen/axs15231_touchscreen.cpp +1 -1
- esphome/components/bedjet/bedjet_hub.cpp +1 -1
- esphome/components/binary_sensor/__init__.py +2 -2
- esphome/components/binary_sensor/binary_sensor.cpp +13 -0
- esphome/components/binary_sensor/binary_sensor.h +4 -7
- esphome/components/bl0940/__init__.py +6 -1
- esphome/components/bl0940/bl0940.cpp +178 -41
- esphome/components/bl0940/bl0940.h +121 -76
- esphome/components/bl0940/button/__init__.py +27 -0
- esphome/components/bl0940/button/calibration_reset_button.cpp +20 -0
- esphome/components/bl0940/button/calibration_reset_button.h +19 -0
- esphome/components/bl0940/number/__init__.py +94 -0
- esphome/components/bl0940/number/calibration_number.cpp +29 -0
- esphome/components/bl0940/number/calibration_number.h +26 -0
- esphome/components/bl0940/sensor.py +151 -2
- esphome/components/bl0942/bl0942.cpp +1 -1
- esphome/components/ble_client/output/__init__.py +4 -4
- esphome/components/bluetooth_proxy/__init__.py +1 -1
- esphome/components/bluetooth_proxy/bluetooth_connection.h +1 -1
- esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +15 -7
- esphome/components/bluetooth_proxy/bluetooth_proxy.h +6 -3
- esphome/components/button/__init__.py +2 -2
- esphome/components/button/button.cpp +13 -0
- esphome/components/button/button.h +4 -7
- esphome/components/camera/buffer.h +18 -0
- esphome/components/camera/buffer_impl.cpp +20 -0
- esphome/components/camera/buffer_impl.h +26 -0
- esphome/components/camera/camera.h +43 -0
- esphome/components/camera/encoder.h +69 -0
- esphome/components/camera_encoder/__init__.py +62 -0
- esphome/components/camera_encoder/encoder_buffer_impl.cpp +23 -0
- esphome/components/camera_encoder/encoder_buffer_impl.h +25 -0
- esphome/components/camera_encoder/esp32_camera_jpeg_encoder.cpp +82 -0
- esphome/components/camera_encoder/esp32_camera_jpeg_encoder.h +39 -0
- esphome/components/captive_portal/__init__.py +2 -2
- esphome/components/captive_portal/captive_index.h +77 -97
- esphome/components/captive_portal/captive_portal.cpp +35 -12
- esphome/components/captive_portal/captive_portal.h +3 -3
- esphome/components/ccs811/ccs811.cpp +3 -3
- esphome/components/climate/__init__.py +2 -2
- esphome/components/climate/climate.cpp +1 -1
- esphome/components/cover/__init__.py +5 -5
- esphome/components/cover/cover.cpp +1 -1
- esphome/components/cover/cover.h +2 -2
- esphome/components/dallas_temp/dallas_temp.cpp +2 -2
- esphome/components/datetime/__init__.py +2 -2
- esphome/components/datetime/date_entity.h +2 -2
- esphome/components/datetime/datetime_entity.h +2 -2
- esphome/components/datetime/time_entity.h +2 -2
- esphome/components/debug/debug_esp32.cpp +1 -1
- esphome/components/display/__init__.py +4 -4
- esphome/components/duty_time/duty_time_sensor.cpp +1 -1
- esphome/components/esp32/__init__.py +0 -5
- esphome/components/esp32/gpio.cpp +27 -23
- esphome/components/esp32/gpio.h +26 -11
- esphome/components/esp32/preferences.cpp +8 -4
- esphome/components/esp32_ble/__init__.py +7 -2
- esphome/components/esp32_ble/ble_uuid.cpp +30 -9
- esphome/components/esp32_ble_beacon/esp32_ble_beacon.cpp +4 -3
- esphome/components/esp32_ble_client/ble_client_base.cpp +7 -3
- esphome/components/esp32_ble_client/ble_client_base.h +8 -5
- esphome/components/esp32_ble_tracker/__init__.py +2 -2
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +11 -47
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.h +2 -14
- esphome/components/esp8266/__init__.py +2 -2
- esphome/components/esp8266/core.cpp +2 -2
- esphome/components/esp8266/gpio.py +4 -4
- esphome/components/esp8266/preferences.cpp +30 -28
- esphome/components/esphome/ota/__init__.py +2 -2
- esphome/components/esphome/ota/ota_esphome.cpp +21 -19
- esphome/components/esphome/ota/ota_esphome.h +6 -5
- esphome/components/ethernet/__init__.py +7 -2
- esphome/components/ethernet/ethernet_component.cpp +49 -3
- esphome/components/ethernet/ethernet_component.h +2 -0
- esphome/components/event/__init__.py +2 -2
- esphome/components/event/event.h +4 -4
- esphome/components/factory_reset/button/factory_reset_button.cpp +18 -1
- esphome/components/factory_reset/button/factory_reset_button.h +6 -1
- esphome/components/factory_reset/switch/factory_reset_switch.cpp +18 -1
- esphome/components/factory_reset/switch/factory_reset_switch.h +5 -1
- esphome/components/fan/__init__.py +2 -2
- esphome/components/fan/fan.cpp +2 -1
- esphome/components/gdk101/gdk101.cpp +4 -4
- esphome/components/globals/__init__.py +2 -2
- esphome/components/gpio/binary_sensor/gpio_binary_sensor.cpp +19 -18
- esphome/components/gpio_expander/cached_gpio.h +36 -16
- esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp +5 -5
- esphome/components/gt911/touchscreen/gt911_touchscreen.cpp +1 -1
- esphome/components/haier/haier_base.cpp +1 -1
- esphome/components/haier/hon_climate.cpp +1 -1
- esphome/components/hlw8012/hlw8012.cpp +5 -5
- esphome/components/honeywellabp2_i2c/honeywellabp2.cpp +4 -4
- esphome/components/host/preferences.h +3 -2
- esphome/components/hte501/hte501.cpp +3 -21
- esphome/components/hte501/hte501.h +2 -3
- esphome/components/http_request/ota/__init__.py +2 -2
- esphome/components/i2c/__init__.py +2 -2
- esphome/components/i2c/i2c.cpp +13 -9
- esphome/components/i2c/i2c_bus.h +36 -6
- esphome/components/i2s_audio/__init__.py +8 -2
- esphome/components/i2s_audio/media_player/__init__.py +1 -1
- esphome/components/i2s_audio/microphone/__init__.py +1 -1
- esphome/components/i2s_audio/speaker/__init__.py +1 -1
- esphome/components/ina2xx_base/__init__.py +4 -2
- esphome/components/inkplate/__init__.py +1 -0
- esphome/components/inkplate/const.py +105 -0
- esphome/components/inkplate/display.py +238 -0
- esphome/components/{inkplate6 → inkplate}/inkplate.cpp +156 -74
- esphome/components/{inkplate6 → inkplate}/inkplate.h +28 -68
- esphome/components/inkplate6/__init__.py +0 -1
- esphome/components/inkplate6/display.py +2 -211
- esphome/components/integration/integration_sensor.cpp +1 -1
- esphome/components/json/__init__.py +2 -2
- esphome/components/lc709203f/lc709203f.cpp +4 -17
- esphome/components/lc709203f/lc709203f.h +2 -3
- esphome/components/ld2420/text_sensor/{text_sensor.cpp → ld2420_text_sensor.cpp} +1 -1
- esphome/components/ld2450/ld2450.cpp +1 -1
- esphome/components/libretiny/preferences.cpp +13 -5
- esphome/components/light/__init__.py +2 -2
- esphome/components/light/addressable_light_effect.h +7 -0
- esphome/components/light/base_light_effects.h +8 -0
- esphome/components/light/light_call.cpp +22 -20
- esphome/components/light/light_effect.cpp +36 -0
- esphome/components/light/light_effect.h +14 -0
- esphome/components/light/light_json_schema.cpp +9 -1
- esphome/components/light/light_state.cpp +2 -2
- esphome/components/light/light_state.h +38 -0
- esphome/components/lock/__init__.py +2 -2
- esphome/components/lock/lock.h +2 -2
- esphome/components/logger/__init__.py +2 -2
- esphome/components/logger/logger.cpp +25 -4
- esphome/components/logger/logger.h +1 -1
- esphome/components/logger/logger_esp32.cpp +16 -8
- esphome/components/logger/logger_esp8266.cpp +11 -3
- esphome/components/logger/logger_libretiny.cpp +13 -3
- esphome/components/logger/logger_rp2040.cpp +14 -3
- esphome/components/logger/logger_zephyr.cpp +15 -4
- esphome/components/lvgl/defines.py +1 -0
- esphome/components/lvgl/hello_world.py +96 -33
- esphome/components/lvgl/number/lvgl_number.h +1 -1
- esphome/components/lvgl/select/lvgl_select.h +1 -1
- esphome/components/lvgl/widgets/__init__.py +0 -1
- esphome/components/lvgl/widgets/spinbox.py +20 -11
- esphome/components/m5stack_8angle/binary_sensor/m5stack_8angle_binary_sensor.cpp +1 -1
- esphome/components/m5stack_8angle/sensor/m5stack_8angle_sensor.cpp +1 -1
- esphome/components/mapping/__init__.py +13 -5
- esphome/components/mapping/mapping.h +69 -0
- esphome/components/max17043/max17043.cpp +2 -2
- esphome/components/mcp23016/__init__.py +1 -0
- esphome/components/mcp23016/mcp23016.cpp +20 -5
- esphome/components/mcp23016/mcp23016.h +10 -4
- esphome/components/mcp23x08_base/mcp23x08_base.cpp +1 -1
- esphome/components/mcp23x17_base/mcp23x17_base.cpp +2 -2
- esphome/components/md5/md5.cpp +3 -2
- esphome/components/mdns/__init__.py +2 -2
- esphome/components/mdns/mdns_component.cpp +145 -54
- esphome/components/media_player/__init__.py +2 -2
- esphome/components/micro_wake_word/__init__.py +2 -2
- esphome/components/microphone/__init__.py +2 -2
- esphome/components/mipi/__init__.py +77 -33
- esphome/components/mipi_rgb/__init__.py +2 -0
- esphome/components/mipi_rgb/display.py +321 -0
- esphome/components/mipi_rgb/mipi_rgb.cpp +388 -0
- esphome/components/mipi_rgb/mipi_rgb.h +127 -0
- esphome/components/mipi_rgb/models/guition.py +24 -0
- esphome/components/mipi_rgb/models/lilygo.py +228 -0
- esphome/components/mipi_rgb/models/rpi.py +9 -0
- esphome/components/mipi_rgb/models/st7701s.py +214 -0
- esphome/components/mipi_rgb/models/waveshare.py +64 -0
- esphome/components/mipi_spi/models/jc.py +229 -0
- esphome/components/mlx90614/mlx90614.cpp +1 -16
- esphome/components/mlx90614/mlx90614.h +0 -1
- esphome/components/mqtt/__init__.py +2 -2
- esphome/components/mqtt/mqtt_sensor.cpp +7 -2
- esphome/components/ms5611/ms5611.cpp +7 -6
- esphome/components/network/__init__.py +2 -2
- esphome/components/nextion/nextion_upload.cpp +4 -1
- esphome/components/nrf52/__init__.py +49 -6
- esphome/components/nrf52/const.py +1 -0
- esphome/components/nrf52/dfu.cpp +51 -0
- esphome/components/nrf52/dfu.h +24 -0
- esphome/components/ntc/ntc.cpp +1 -1
- esphome/components/number/__init__.py +2 -2
- esphome/components/number/automation.cpp +1 -1
- esphome/components/number/number.cpp +21 -0
- esphome/components/number/number.h +4 -13
- esphome/components/opentherm/hub.h +6 -6
- esphome/components/opentherm/number/{number.cpp → opentherm_number.cpp} +2 -2
- esphome/components/opentherm/output/{output.cpp → opentherm_output.cpp} +1 -1
- esphome/components/opentherm/switch/{switch.cpp → opentherm_switch.cpp} +1 -1
- esphome/components/openthread/openthread.cpp +41 -7
- esphome/components/openthread/openthread.h +11 -0
- esphome/components/ota/__init__.py +2 -2
- esphome/components/pca6416a/__init__.py +1 -0
- esphome/components/pca6416a/pca6416a.cpp +20 -5
- esphome/components/pca6416a/pca6416a.h +12 -5
- esphome/components/pca9554/__init__.py +2 -1
- esphome/components/pca9554/pca9554.cpp +12 -18
- esphome/components/pca9554/pca9554.h +10 -9
- esphome/components/pcf8574/__init__.py +1 -0
- esphome/components/pcf8574/pcf8574.cpp +14 -5
- esphome/components/pcf8574/pcf8574.h +13 -6
- esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp +7 -7
- esphome/components/pipsolar/__init__.py +3 -3
- esphome/components/pipsolar/output/__init__.py +4 -4
- esphome/components/pulse_width/pulse_width.cpp +2 -2
- esphome/components/qmp6988/qmp6988.cpp +81 -126
- esphome/components/qmp6988/qmp6988.h +31 -37
- esphome/components/radon_eye_ble/__init__.py +2 -2
- esphome/components/remote_base/__init__.py +6 -8
- esphome/components/rotary_encoder/rotary_encoder.cpp +1 -1
- esphome/components/rp2040/__init__.py +2 -2
- esphome/components/runtime_stats/runtime_stats.cpp +10 -23
- esphome/components/runtime_stats/runtime_stats.h +4 -10
- esphome/components/safe_mode/__init__.py +2 -2
- esphome/components/safe_mode/safe_mode.cpp +33 -31
- esphome/components/script/script.cpp +6 -0
- esphome/components/script/script.h +19 -5
- esphome/components/sdm_meter/sensor.py +3 -1
- esphome/components/select/__init__.py +2 -2
- esphome/components/select/select.h +2 -2
- esphome/components/sen5x/sen5x.cpp +57 -55
- esphome/components/sen5x/sen5x.h +21 -15
- esphome/components/sen5x/sensor.py +67 -44
- esphome/components/sensirion_common/i2c_sensirion.cpp +18 -47
- esphome/components/sensirion_common/i2c_sensirion.h +39 -55
- esphome/components/sensor/__init__.py +2 -2
- esphome/components/sensor/automation.h +1 -1
- esphome/components/sensor/sensor.cpp +34 -6
- esphome/components/sensor/sensor.h +4 -21
- esphome/components/sgp30/sgp30.cpp +34 -35
- esphome/components/sgp30/sgp30.h +11 -10
- esphome/components/sgp4x/sgp4x.cpp +2 -2
- esphome/components/shelly_dimmer/light.py +7 -7
- esphome/components/sht4x/sht4x.cpp +1 -1
- esphome/components/sntp/sntp_component.cpp +36 -9
- esphome/components/sntp/sntp_component.h +7 -0
- esphome/components/sound_level/sound_level.cpp +1 -1
- esphome/components/speaker/__init__.py +2 -2
- esphome/components/speaker/media_player/__init__.py +2 -2
- esphome/components/speaker/media_player/speaker_media_player.cpp +1 -1
- esphome/components/spi/__init__.py +2 -2
- esphome/components/sprinkler/sprinkler.cpp +1 -1
- esphome/components/sps30/sps30.cpp +18 -23
- esphome/components/sps30/sps30.h +3 -3
- esphome/components/status_led/__init__.py +2 -2
- esphome/components/stepper/__init__.py +2 -2
- esphome/components/switch/__init__.py +2 -2
- esphome/components/switch/switch.cpp +5 -5
- esphome/components/sx1509/__init__.py +1 -1
- esphome/components/sx1509/sx1509.cpp +12 -7
- esphome/components/sx1509/sx1509.h +11 -4
- esphome/components/tca9555/tca9555.cpp +5 -5
- esphome/components/tee501/tee501.cpp +2 -21
- esphome/components/tee501/tee501.h +2 -4
- esphome/components/template/alarm_control_panel/template_alarm_control_panel.cpp +1 -1
- esphome/components/template/datetime/template_date.cpp +1 -1
- esphome/components/template/datetime/template_datetime.cpp +2 -2
- esphome/components/template/datetime/template_time.cpp +1 -1
- esphome/components/template/number/template_number.cpp +1 -1
- esphome/components/template/select/template_select.cpp +1 -1
- esphome/components/template/text/template_text.cpp +1 -1
- esphome/components/text/__init__.py +2 -2
- esphome/components/text/text.h +2 -2
- esphome/components/text_sensor/__init__.py +2 -2
- esphome/components/text_sensor/text_sensor.h +4 -4
- esphome/components/thermostat/climate.py +11 -7
- esphome/components/thermostat/thermostat_climate.cpp +237 -206
- esphome/components/thermostat/thermostat_climate.h +52 -41
- esphome/components/time/__init__.py +2 -2
- esphome/components/tmp1075/tmp1075.cpp +1 -1
- esphome/components/total_daily_energy/total_daily_energy.cpp +1 -1
- esphome/components/touchscreen/__init__.py +2 -2
- esphome/components/tuya/number/tuya_number.cpp +1 -1
- esphome/components/udp/udp_component.cpp +3 -3
- esphome/components/ufire_ec/ufire_ec.cpp +4 -4
- esphome/components/ufire_ise/ufire_ise.cpp +4 -4
- esphome/components/update/__init__.py +2 -2
- esphome/components/usb_uart/usb_uart.cpp +1 -1
- esphome/components/valve/__init__.py +5 -5
- esphome/components/valve/valve.cpp +1 -1
- esphome/components/valve/valve.h +2 -2
- esphome/components/wake_on_lan/wake_on_lan.cpp +2 -2
- esphome/components/waveshare_epaper/waveshare_213v3.cpp +1 -1
- esphome/components/web_server/__init__.py +2 -2
- esphome/components/web_server/ota/__init__.py +2 -2
- esphome/components/web_server/ota/ota_web_server.cpp +11 -0
- esphome/components/web_server/server_index_v2.h +149 -149
- esphome/components/web_server/web_server.cpp +58 -12
- esphome/components/web_server_base/__init__.py +2 -2
- esphome/components/wifi/__init__.py +5 -5
- esphome/components/wifi/wifi_component.cpp +4 -4
- esphome/components/wifi/wifi_component_esp_idf.cpp +2 -0
- esphome/components/wifi_info/wifi_info_text_sensor.h +3 -2
- esphome/config_validation.py +2 -2
- esphome/const.py +3 -1
- esphome/core/__init__.py +1 -0
- esphome/core/application.cpp +89 -51
- esphome/core/application.h +1 -0
- esphome/core/component.cpp +41 -19
- esphome/core/component.h +17 -13
- esphome/core/config.py +7 -7
- esphome/core/defines.h +4 -0
- esphome/core/entity_base.cpp +22 -8
- esphome/core/entity_base.h +43 -0
- esphome/core/helpers.cpp +34 -20
- esphome/core/helpers.h +33 -3
- esphome/core/ring_buffer.cpp +6 -2
- esphome/core/ring_buffer.h +2 -1
- esphome/core/scheduler.cpp +178 -97
- esphome/core/scheduler.h +67 -36
- esphome/core/time.cpp +6 -20
- esphome/coroutine.py +80 -3
- esphome/cpp_generator.py +13 -0
- esphome/cpp_helpers.py +2 -2
- esphome/dashboard/web_server.py +67 -10
- esphome/espota2.py +13 -6
- esphome/helpers.py +68 -83
- esphome/resolver.py +67 -0
- esphome/util.py +9 -6
- esphome/wizard.py +39 -26
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/METADATA +9 -9
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/RECORD +364 -333
- /esphome/components/ld2420/text_sensor/{text_sensor.h → ld2420_text_sensor.h} +0 -0
- /esphome/components/opentherm/number/{number.h → opentherm_number.h} +0 -0
- /esphome/components/opentherm/output/{output.h → opentherm_output.h} +0 -0
- /esphome/components/opentherm/switch/{switch.h → opentherm_switch.h} +0 -0
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/WHEEL +0 -0
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/entry_points.txt +0 -0
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/licenses/LICENSE +0 -0
- {esphome-2025.8.4.dist-info → esphome-2025.9.0b2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,228 @@
|
|
1
|
+
from esphome.config_validation import UNDEFINED
|
2
|
+
|
3
|
+
from .st7701s import ST7701S
|
4
|
+
|
5
|
+
# fmt: off
|
6
|
+
ST7701S(
|
7
|
+
"T-PANEL-S3",
|
8
|
+
width=480,
|
9
|
+
height=480,
|
10
|
+
color_order="BGR",
|
11
|
+
invert_colors=False,
|
12
|
+
swap_xy=UNDEFINED,
|
13
|
+
spi_mode="MODE3",
|
14
|
+
cs_pin={"xl9535": None, "number": 17},
|
15
|
+
reset_pin={"xl9535": None, "number": 5},
|
16
|
+
hsync_pin=39,
|
17
|
+
vsync_pin=40,
|
18
|
+
pclk_pin=41,
|
19
|
+
data_pins={
|
20
|
+
"red": [12, 13, 42, 46, 45],
|
21
|
+
"green": [6, 7, 8, 9, 10, 11],
|
22
|
+
"blue": [1, 2, 3, 4, 5],
|
23
|
+
},
|
24
|
+
hsync_front_porch=20,
|
25
|
+
hsync_back_porch=0,
|
26
|
+
hsync_pulse_width=2,
|
27
|
+
vsync_front_porch=30,
|
28
|
+
vsync_back_porch=1,
|
29
|
+
vsync_pulse_width=8,
|
30
|
+
pclk_frequency="6MHz",
|
31
|
+
pclk_inverted=False,
|
32
|
+
initsequence=(
|
33
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
34
|
+
(0xC0, 0x3B, 0x00), (0xC1, 0x0B, 0x02), (0xC2, 0x30, 0x02, 0x37), (0xCC, 0x10),
|
35
|
+
(0xB0, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x09, 0x08, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18),
|
36
|
+
(0xB1, 0x00, 0x0F, 0x16, 0x0E, 0x11, 0x07, 0x09, 0x08, 0x09, 0x23, 0x05, 0x11, 0x0F, 0x28, 0x2D, 0x18),
|
37
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
|
38
|
+
(0xB0, 0x4D), (0xB1, 0x33), (0xB2, 0x87), (0xB5, 0x4B), (0xB7, 0x8C), (0xB8, 0x20), (0xC1, 0x78),
|
39
|
+
(0xC2, 0x78), (0xD0, 0x88), (0xE0, 0x00, 0x00, 0x02),
|
40
|
+
(0xE1, 0x02, 0xF0, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x44, 0x44),
|
41
|
+
(0xE2, 0x10, 0x10, 0x40, 0x40, 0xF2, 0xF0, 0x00, 0x00, 0xF2, 0xF0, 0x00, 0x00),
|
42
|
+
(0xE3, 0x00, 0x00, 0x11, 0x11), (0xE4, 0x44, 0x44),
|
43
|
+
(0xE5, 0x07, 0xEF, 0xF0, 0xF0, 0x09, 0xF1, 0xF0, 0xF0, 0x03, 0xF3, 0xF0, 0xF0, 0x05, 0xED, 0xF0, 0xF0),
|
44
|
+
(0xE6, 0x00, 0x00, 0x11, 0x11), (0xE7, 0x44, 0x44),
|
45
|
+
(0xE8, 0x08, 0xF0, 0xF0, 0xF0, 0x0A, 0xF2, 0xF0, 0xF0, 0x04, 0xF4, 0xF0, 0xF0, 0x06, 0xEE, 0xF0, 0xF0),
|
46
|
+
(0xEB, 0x00, 0x00, 0xE4, 0xE4, 0x44, 0x88, 0x40),
|
47
|
+
(0xEC, 0x78, 0x00),
|
48
|
+
(0xED, 0x20, 0xF9, 0x87, 0x76, 0x65, 0x54, 0x4F, 0xFF, 0xFF, 0xF4, 0x45, 0x56, 0x67, 0x78, 0x9F, 0x02),
|
49
|
+
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
|
50
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
51
|
+
),
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
t_rgb = ST7701S(
|
56
|
+
"T-RGB-2.1",
|
57
|
+
width=480,
|
58
|
+
height=480,
|
59
|
+
color_order="BGR",
|
60
|
+
pixel_mode="18bit",
|
61
|
+
invert_colors=False,
|
62
|
+
swap_xy=UNDEFINED,
|
63
|
+
spi_mode="MODE3",
|
64
|
+
cs_pin={"xl9535": None, "number": 3},
|
65
|
+
de_pin=45,
|
66
|
+
hsync_pin=47,
|
67
|
+
vsync_pin=41,
|
68
|
+
pclk_pin=42,
|
69
|
+
data_pins={
|
70
|
+
"red": [7, 6, 5, 3, 2],
|
71
|
+
"green": [14, 13, 12, 11, 10, 9],
|
72
|
+
"blue": [21, 18, 17, 16, 15],
|
73
|
+
},
|
74
|
+
hsync_front_porch=50,
|
75
|
+
hsync_pulse_width=1,
|
76
|
+
hsync_back_porch=30,
|
77
|
+
vsync_front_porch=20,
|
78
|
+
vsync_pulse_width=1,
|
79
|
+
vsync_back_porch=30,
|
80
|
+
pclk_frequency="12MHz",
|
81
|
+
pclk_inverted=False,
|
82
|
+
initsequence=(
|
83
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
84
|
+
|
85
|
+
(0xC0, 0x3B, 0x00),
|
86
|
+
(0xC1, 0x0B, 0x02),
|
87
|
+
(0xC2, 0x07, 0x02),
|
88
|
+
(0xCC, 0x10),
|
89
|
+
(0xCD, 0x08),
|
90
|
+
|
91
|
+
(0xB0,
|
92
|
+
0x00, 0x11, 0x16, 0x0e,
|
93
|
+
0x11, 0x06, 0x05, 0x09,
|
94
|
+
0x08, 0x21, 0x06, 0x13,
|
95
|
+
0x10, 0x29, 0x31, 0x18),
|
96
|
+
|
97
|
+
(0xB1,
|
98
|
+
0x00, 0x11, 0x16, 0x0e,
|
99
|
+
0x11, 0x07, 0x05, 0x09,
|
100
|
+
0x09, 0x21, 0x05, 0x13,
|
101
|
+
0x11, 0x2a, 0x31, 0x18),
|
102
|
+
|
103
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
|
104
|
+
|
105
|
+
(0xB0, 0x6D),
|
106
|
+
(0xB1, 0x37),
|
107
|
+
(0xB2, 0x81),
|
108
|
+
(0xB3, 0x80),
|
109
|
+
(0xB5, 0x43),
|
110
|
+
(0xB7, 0x85),
|
111
|
+
(0xB8, 0x20),
|
112
|
+
|
113
|
+
(0xC1, 0x78),
|
114
|
+
(0xC2, 0x78),
|
115
|
+
(0xC3, 0x8C),
|
116
|
+
|
117
|
+
(0xD0, 0x88),
|
118
|
+
|
119
|
+
(0xE0, 0x00, 0x00, 0x02),
|
120
|
+
(0xE1,
|
121
|
+
0x03, 0xA0, 0x00, 0x00,
|
122
|
+
0x04, 0xA0, 0x00, 0x00,
|
123
|
+
0x00, 0x20, 0x20),
|
124
|
+
|
125
|
+
(0xE2,
|
126
|
+
0x00, 0x00, 0x00, 0x00,
|
127
|
+
0x00, 0x00, 0x00, 0x00,
|
128
|
+
0x00, 0x00, 0x00, 0x00,
|
129
|
+
0x00),
|
130
|
+
|
131
|
+
(0xE3, 0x00, 0x00, 0x11, 0x00),
|
132
|
+
(0xE4, 0x22, 0x00),
|
133
|
+
|
134
|
+
(0xE5,
|
135
|
+
0x05, 0xEC, 0xA0, 0xA0,
|
136
|
+
0x07, 0xEE, 0xA0, 0xA0,
|
137
|
+
0x00, 0x00, 0x00, 0x00,
|
138
|
+
0x00, 0x00, 0x00, 0x00),
|
139
|
+
|
140
|
+
(0xE6, 0x00, 0x00, 0x11, 0x00),
|
141
|
+
(0xE7, 0x22, 0x00),
|
142
|
+
|
143
|
+
(0xE8,
|
144
|
+
0x06, 0xED, 0xA0, 0xA0,
|
145
|
+
0x08, 0xEF, 0xA0, 0xA0,
|
146
|
+
0x00, 0x00, 0x00, 0x00,
|
147
|
+
0x00, 0x00, 0x00, 0x00),
|
148
|
+
|
149
|
+
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x10),
|
150
|
+
|
151
|
+
(0xED,
|
152
|
+
0xFF, 0xFF, 0xFF, 0xBA,
|
153
|
+
0x0A, 0xBF, 0x45, 0xFF,
|
154
|
+
0xFF, 0x54, 0xFB, 0xA0,
|
155
|
+
0xAB, 0xFF, 0xFF, 0xFF),
|
156
|
+
|
157
|
+
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
|
158
|
+
|
159
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13),
|
160
|
+
(0xEF, 0x08),
|
161
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10)
|
162
|
+
)
|
163
|
+
|
164
|
+
)
|
165
|
+
t_rgb.extend(
|
166
|
+
"T-RGB-2.8",
|
167
|
+
initsequence=(
|
168
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13),
|
169
|
+
(0xEF, 0x08),
|
170
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
171
|
+
(0xC0, 0x3B, 0x00),
|
172
|
+
(0xC1, 0x10, 0x0C),
|
173
|
+
(0xC2, 0x07, 0x0A),
|
174
|
+
(0xC7, 0x00),
|
175
|
+
(0xC7, 0x10),
|
176
|
+
(0xCD, 0x08),
|
177
|
+
(0xB0,
|
178
|
+
0x05, 0x12, 0x98, 0x0e, 0x0F,
|
179
|
+
0x07, 0x07, 0x09, 0x09, 0x23,
|
180
|
+
0x05, 0x52, 0x0F, 0x67, 0x2C, 0x11),
|
181
|
+
(0xB1,
|
182
|
+
0x0B, 0x11, 0x97, 0x0C, 0x12,
|
183
|
+
0x06, 0x06, 0x08, 0x08, 0x22,
|
184
|
+
0x03, 0x51, 0x11, 0x66, 0x2B, 0x0F),
|
185
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
|
186
|
+
(0xB0, 0x5D),
|
187
|
+
(0xB1, 0x2D),
|
188
|
+
(0xB2, 0x81),
|
189
|
+
(0xB3, 0x80),
|
190
|
+
(0xB5, 0x4E),
|
191
|
+
(0xB7, 0x85),
|
192
|
+
(0xB8, 0x20),
|
193
|
+
(0xC1, 0x78),
|
194
|
+
(0xC2, 0x78),
|
195
|
+
(0xD0, 0x88),
|
196
|
+
(0xE0, 0x00, 0x00, 0x02),
|
197
|
+
(0xE1,
|
198
|
+
0x06, 0x30, 0x08, 0x30, 0x05,
|
199
|
+
0x30, 0x07, 0x30, 0x00, 0x33,
|
200
|
+
0x33),
|
201
|
+
(0xE2,
|
202
|
+
0x11, 0x11, 0x33, 0x33, 0xf4,
|
203
|
+
0x00, 0x00, 0x00, 0xf4, 0x00,
|
204
|
+
0x00, 0x00),
|
205
|
+
(0xE3, 0x00, 0x00, 0x11, 0x11),
|
206
|
+
(0xE4, 0x44, 0x44),
|
207
|
+
(0xE5,
|
208
|
+
0x0d, 0xf5, 0x30, 0xf0, 0x0f,
|
209
|
+
0xf7, 0x30, 0xf0, 0x09, 0xf1,
|
210
|
+
0x30, 0xf0, 0x0b, 0xf3, 0x30, 0xf0),
|
211
|
+
(0xE6, 0x00, 0x00, 0x11, 0x11),
|
212
|
+
(0xE7, 0x44, 0x44),
|
213
|
+
(0xE8,
|
214
|
+
0x0c, 0xf4, 0x30, 0xf0,
|
215
|
+
0x0e, 0xf6, 0x30, 0xf0,
|
216
|
+
0x08, 0xf0, 0x30, 0xf0,
|
217
|
+
0x0a, 0xf2, 0x30, 0xf0),
|
218
|
+
(0xe9, 0x36),
|
219
|
+
(0xEB, 0x00, 0x01, 0xe4, 0xe4, 0x44, 0x88, 0x40),
|
220
|
+
(0xED,
|
221
|
+
0xff, 0x10, 0xaf, 0x76,
|
222
|
+
0x54, 0x2b, 0xcf, 0xff,
|
223
|
+
0xff, 0xfc, 0xb2, 0x45,
|
224
|
+
0x67, 0xfa, 0x01, 0xff),
|
225
|
+
(0xEF, 0x08, 0x08, 0x08, 0x45, 0x3f, 0x54),
|
226
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
227
|
+
)
|
228
|
+
)
|
@@ -0,0 +1,214 @@
|
|
1
|
+
from esphome.components.mipi import (
|
2
|
+
MADCTL,
|
3
|
+
MADCTL_ML,
|
4
|
+
MADCTL_XFLIP,
|
5
|
+
MODE_BGR,
|
6
|
+
DriverChip,
|
7
|
+
)
|
8
|
+
from esphome.config_validation import UNDEFINED
|
9
|
+
from esphome.const import CONF_COLOR_ORDER, CONF_HEIGHT, CONF_MIRROR_X, CONF_MIRROR_Y
|
10
|
+
|
11
|
+
SDIR_CMD = 0xC7
|
12
|
+
|
13
|
+
|
14
|
+
class ST7701S(DriverChip):
|
15
|
+
# The ST7701s does not use the standard MADCTL bits for x/y mirroring
|
16
|
+
def add_madctl(self, sequence: list, config: dict):
|
17
|
+
transform = self.get_transform(config)
|
18
|
+
madctl = 0x00
|
19
|
+
if config[CONF_COLOR_ORDER] == MODE_BGR:
|
20
|
+
madctl |= 0x08
|
21
|
+
if transform.get(CONF_MIRROR_Y):
|
22
|
+
madctl |= MADCTL_ML
|
23
|
+
sequence.append((MADCTL, madctl))
|
24
|
+
sdir = 0
|
25
|
+
if transform.get(CONF_MIRROR_X):
|
26
|
+
sdir |= 0x04
|
27
|
+
madctl |= MADCTL_XFLIP
|
28
|
+
sequence.append((SDIR_CMD, sdir))
|
29
|
+
return madctl
|
30
|
+
|
31
|
+
@property
|
32
|
+
def transforms(self) -> set[str]:
|
33
|
+
"""
|
34
|
+
The ST7701 never supports axis swapping, and mirroring the y-axis only works for full height.
|
35
|
+
"""
|
36
|
+
if self.get_default(CONF_HEIGHT) != 864:
|
37
|
+
return {CONF_MIRROR_X}
|
38
|
+
return {CONF_MIRROR_X, CONF_MIRROR_Y}
|
39
|
+
|
40
|
+
|
41
|
+
# fmt: off
|
42
|
+
st7701s = ST7701S(
|
43
|
+
"ST7701S",
|
44
|
+
width=480,
|
45
|
+
height=864,
|
46
|
+
swap_xy=UNDEFINED,
|
47
|
+
hsync_front_porch=20,
|
48
|
+
hsync_back_porch=10,
|
49
|
+
hsync_pulse_width=10,
|
50
|
+
vsync_front_porch=10,
|
51
|
+
vsync_back_porch=10,
|
52
|
+
vsync_pulse_width=10,
|
53
|
+
pclk_frequency="16MHz",
|
54
|
+
pclk_inverted=True,
|
55
|
+
initsequence=(
|
56
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), # Page 0
|
57
|
+
(0xC0, 0x3B, 0x00), (0xC1, 0x0D, 0x02), (0xC2, 0x31, 0x05),
|
58
|
+
(0xB0, 0x00, 0x11, 0x18, 0x0E, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22, 0x04, 0x12, 0x0F, 0xAA, 0x31, 0x18,),
|
59
|
+
(0xB1, 0x00, 0x11, 0x19, 0x0E, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22, 0x04, 0x11, 0x11, 0xA9, 0x32, 0x18,),
|
60
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11), # page 1
|
61
|
+
(0xB0, 0x60), (0xB1, 0x32), (0xB2, 0x07), (0xB3, 0x80), (0xB5, 0x49), (0xB7, 0x85), (0xB8, 0x21), (0xC1, 0x78),
|
62
|
+
(0xC2, 0x78), (0xE0, 0x00, 0x1B, 0x02),
|
63
|
+
(0xE1, 0x08, 0xA0, 0x00, 0x00, 0x07, 0xA0, 0x00, 0x00, 0x00, 0x44, 0x44),
|
64
|
+
(0xE2, 0x11, 0x11, 0x44, 0x44, 0xED, 0xA0, 0x00, 0x00, 0xEC, 0xA0, 0x00, 0x00),
|
65
|
+
(0xE3, 0x00, 0x00, 0x11, 0x11),
|
66
|
+
(0xE4, 0x44, 0x44),
|
67
|
+
(0xE5, 0x0A, 0xE9, 0xD8, 0xA0, 0x0C, 0xEB, 0xD8, 0xA0, 0x0E, 0xED, 0xD8, 0xA0, 0x10, 0xEF, 0xD8, 0xA0,),
|
68
|
+
(0xE6, 0x00, 0x00, 0x11, 0x11), (0xE7, 0x44, 0x44),
|
69
|
+
(0xE8, 0x09, 0xE8, 0xD8, 0xA0, 0x0B, 0xEA, 0xD8, 0xA0, 0x0D, 0xEC, 0xD8, 0xA0, 0x0F, 0xEE, 0xD8, 0xA0,),
|
70
|
+
(0xEB, 0x02, 0x00, 0xE4, 0xE4, 0x88, 0x00, 0x40), (0xEC, 0x3C, 0x00),
|
71
|
+
(0xED, 0xAB, 0x89, 0x76, 0x54, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x45, 0x67, 0x98, 0xBA,),
|
72
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), # Page 3
|
73
|
+
(0xE5, 0xE4),
|
74
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), # Page 0
|
75
|
+
(0xCD, 0x08),
|
76
|
+
)
|
77
|
+
)
|
78
|
+
|
79
|
+
st7701s.extend(
|
80
|
+
"MAKERFABS-4",
|
81
|
+
width=480,
|
82
|
+
height=480,
|
83
|
+
color_order="RGB",
|
84
|
+
invert_colors=True,
|
85
|
+
pixel_mode="18bit",
|
86
|
+
cs_pin=1,
|
87
|
+
de_pin={
|
88
|
+
"number": 45,
|
89
|
+
"ignore_strapping_warning": True
|
90
|
+
},
|
91
|
+
hsync_pin=5,
|
92
|
+
vsync_pin=4,
|
93
|
+
pclk_pin=21,
|
94
|
+
data_pins={
|
95
|
+
"red": [39, 40, 41, 42, 2],
|
96
|
+
"green": [0, 9, 14, 47, 48, 3],
|
97
|
+
"blue": [6, 7, 15, 16, 8]
|
98
|
+
}
|
99
|
+
)
|
100
|
+
|
101
|
+
st7701s.extend(
|
102
|
+
"SEEED-INDICATOR-D1",
|
103
|
+
width=480,
|
104
|
+
height=480,
|
105
|
+
mirror_x=True,
|
106
|
+
mirror_y=True,
|
107
|
+
invert_colors=True,
|
108
|
+
pixel_mode="18bit",
|
109
|
+
spi_mode="MODE3",
|
110
|
+
data_rate="2MHz",
|
111
|
+
hsync_front_porch=10,
|
112
|
+
hsync_pulse_width=8,
|
113
|
+
hsync_back_porch=50,
|
114
|
+
vsync_front_porch=10,
|
115
|
+
vsync_pulse_width=8,
|
116
|
+
vsync_back_porch=20,
|
117
|
+
cs_pin={"pca9554": None, "number": 4},
|
118
|
+
de_pin=18,
|
119
|
+
hsync_pin=16,
|
120
|
+
vsync_pin=17,
|
121
|
+
pclk_pin=21,
|
122
|
+
pclk_inverted=False,
|
123
|
+
data_pins={
|
124
|
+
"red": [4, 3, 2, 1, 0],
|
125
|
+
"green": [10, 9, 8, 7, 6, 5],
|
126
|
+
"blue": [15, 14, 13, 12, 11]
|
127
|
+
},
|
128
|
+
)
|
129
|
+
|
130
|
+
st7701s.extend(
|
131
|
+
"UEDX48480021-MD80ET",
|
132
|
+
width=480,
|
133
|
+
height=480,
|
134
|
+
pixel_mode="18bit",
|
135
|
+
cs_pin=18,
|
136
|
+
reset_pin=8,
|
137
|
+
de_pin=17,
|
138
|
+
vsync_pin={"number": 3, "ignore_strapping_warning": True},
|
139
|
+
hsync_pin={"number": 46, "ignore_strapping_warning": True},
|
140
|
+
pclk_pin=9,
|
141
|
+
data_pins={
|
142
|
+
"red": [40, 41, 42, 2, 1],
|
143
|
+
"green": [21, 47, 48, 45, 38, 39],
|
144
|
+
"blue": [10, 11, {"number": 12, "allow_other_uses": True}, {"number": 13, "allow_other_uses": True}, 14]
|
145
|
+
},
|
146
|
+
initsequence=(
|
147
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10),
|
148
|
+
(0xC0, 0x3B, 0x00), (0xC1, 0x0B, 0x02), (0xC2, 0x07, 0x02), (0xC7, 0x00), (0xCC, 0x10), (0xCD, 0x08),
|
149
|
+
(0xB0, 0x00, 0x11, 0x16, 0x0E, 0x11, 0x06, 0x05, 0x09, 0x08, 0x21, 0x06, 0x13, 0x10, 0x29, 0x31, 0x18),
|
150
|
+
(0xB1, 0x00, 0x11, 0x16, 0x0E, 0x11, 0x07, 0x05, 0x09, 0x09, 0x21, 0x05, 0x13, 0x11, 0x2A, 0x31, 0x18),
|
151
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11),
|
152
|
+
(0xB0, 0x6D), (0xB1, 0x37), (0xB2, 0x8B), (0xB3, 0x80), (0xB5, 0x43), (0xB7, 0x85),
|
153
|
+
(0xB8, 0x20), (0xC0, 0x09), (0xC1, 0x78), (0xC2, 0x78), (0xD0, 0x88),
|
154
|
+
(0xE0, 0x00, 0x00, 0x02),
|
155
|
+
(0xE1, 0x03, 0xA0, 0x00, 0x00, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x20, 0x20),
|
156
|
+
(0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
157
|
+
(0xE3, 0x00, 0x00, 0x11, 0x00),
|
158
|
+
(0xE4, 0x22, 0x00),
|
159
|
+
(0xE5, 0x05, 0xEC, 0xF6, 0xCA, 0x07, 0xEE, 0xF6, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
160
|
+
(0xE6, 0x00, 0x00, 0x11, 0x00),
|
161
|
+
(0xE7, 0x22, 0x00),
|
162
|
+
(0xE8, 0x06, 0xED, 0xF6, 0xCA, 0x08, 0xEF, 0xF6, 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
163
|
+
(0xE9, 0x36, 0x00),
|
164
|
+
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00),
|
165
|
+
(0xED, 0xFF, 0xFF, 0xFF, 0xBA, 0x0A, 0xFF, 0x45, 0xFF, 0xFF, 0x54, 0xFF, 0xA0, 0xAB, 0xFF, 0xFF, 0xFF),
|
166
|
+
(0xEF, 0x08, 0x08, 0x08, 0x45, 0x3F, 0x54),
|
167
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xE8, 0x00, 0x0E), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00),
|
168
|
+
(0x11, 0x00), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xE8, 0x00, 0x0C),
|
169
|
+
(0xE8, 0x00, 0x00), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00)
|
170
|
+
)
|
171
|
+
)
|
172
|
+
|
173
|
+
st7701s.extend(
|
174
|
+
"ZX2D10GE01R-V4848",
|
175
|
+
width=480,
|
176
|
+
height=480,
|
177
|
+
pixel_mode="18bit",
|
178
|
+
cs_pin=21,
|
179
|
+
de_pin=39,
|
180
|
+
vsync_pin=48,
|
181
|
+
hsync_pin=40,
|
182
|
+
pclk_pin={"number": 45, "ignore_strapping_warning": True},
|
183
|
+
pclk_frequency="15MHz",
|
184
|
+
pclk_inverted=True,
|
185
|
+
hsync_pulse_width=10,
|
186
|
+
hsync_back_porch=10,
|
187
|
+
hsync_front_porch=10,
|
188
|
+
vsync_pulse_width=2,
|
189
|
+
vsync_back_porch=12,
|
190
|
+
vsync_front_porch=14,
|
191
|
+
data_pins={
|
192
|
+
"red": [10, 16, 9, 15, 46],
|
193
|
+
"green": [8, 13, 18, 12, 11, 17],
|
194
|
+
"blue": [{"number": 47, "allow_other_uses": True}, {"number": 41, "allow_other_uses": True}, 0, 42, 14]
|
195
|
+
},
|
196
|
+
initsequence=(
|
197
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x10), (0xC0, 0x3B, 0x00),
|
198
|
+
(0xC1, 0x0B, 0x02), (0xC2, 0x07, 0x02), (0xCC, 0x10), (0xCD, 0x08),
|
199
|
+
(0xB0, 0x00, 0x11, 0x16, 0x0e, 0x11, 0x06, 0x05, 0x09, 0x08, 0x21, 0x06, 0x13, 0x10, 0x29, 0x31, 0x18),
|
200
|
+
(0xB1, 0x00, 0x11, 0x16, 0x0e, 0x11, 0x07, 0x05, 0x09, 0x09, 0x21, 0x05, 0x13, 0x11, 0x2a, 0x31, 0x18),
|
201
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x11), (0xB0, 0x6d), (0xB1, 0x37), (0xB2, 0x81), (0xB3, 0x80), (0xB5, 0x43),
|
202
|
+
(0xB7, 0x85), (0xB8, 0x20), (0xC1, 0x78), (0xC2, 0x78), (0xD0, 0x88), (0xE0, 0x00, 0x00, 0x02),
|
203
|
+
(0xE1, 0x03, 0xA0, 0x00, 0x00, 0x04, 0xA0, 0x00, 0x00, 0x00, 0x20, 0x20),
|
204
|
+
(0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
205
|
+
(0xE3, 0x00, 0x00, 0x11, 0x00), (0xE4, 0x22, 0x00),
|
206
|
+
(0xE5, 0x05, 0xEC, 0xA0, 0xA0, 0x07, 0xEE, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
207
|
+
(0xE6, 0x00, 0x00, 0x11, 0x00), (0xE7, 0x22, 0x00),
|
208
|
+
(0xE8, 0x06, 0xED, 0xA0, 0xA0, 0x08, 0xEF, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
|
209
|
+
(0xEB, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00),
|
210
|
+
(0xED, 0xFF, 0xFF, 0xFF, 0xBA, 0x0A, 0xBF, 0x45, 0xFF, 0xFF, 0x54, 0xFB, 0xA0, 0xAB, 0xFF, 0xFF, 0xFF),
|
211
|
+
(0xEF, 0x10, 0x0D, 0x04, 0x08, 0x3F, 0x1F),
|
212
|
+
(0xFF, 0x77, 0x01, 0x00, 0x00, 0x13), (0xEF, 0x08), (0xFF, 0x77, 0x01, 0x00, 0x00, 0x00)
|
213
|
+
)
|
214
|
+
)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
from esphome.components.mipi import DriverChip
|
2
|
+
from esphome.config_validation import UNDEFINED
|
3
|
+
|
4
|
+
from .st7701s import st7701s
|
5
|
+
|
6
|
+
wave_4_3 = DriverChip(
|
7
|
+
"ESP32-S3-TOUCH-LCD-4.3",
|
8
|
+
swap_xy=UNDEFINED,
|
9
|
+
initsequence=(),
|
10
|
+
width=800,
|
11
|
+
height=480,
|
12
|
+
pclk_frequency="16MHz",
|
13
|
+
reset_pin={"ch422g": None, "number": 3},
|
14
|
+
enable_pin={"ch422g": None, "number": 2},
|
15
|
+
de_pin=5,
|
16
|
+
hsync_pin={"number": 46, "ignore_strapping_warning": True},
|
17
|
+
vsync_pin={"number": 3, "ignore_strapping_warning": True},
|
18
|
+
pclk_pin=7,
|
19
|
+
pclk_inverted=True,
|
20
|
+
hsync_front_porch=210,
|
21
|
+
hsync_pulse_width=30,
|
22
|
+
hsync_back_porch=30,
|
23
|
+
vsync_front_porch=4,
|
24
|
+
vsync_pulse_width=4,
|
25
|
+
vsync_back_porch=4,
|
26
|
+
data_pins={
|
27
|
+
"red": [1, 2, 42, 41, 40],
|
28
|
+
"green": [39, 0, 45, 48, 47, 21],
|
29
|
+
"blue": [14, 38, 18, 17, 10],
|
30
|
+
},
|
31
|
+
)
|
32
|
+
wave_4_3.extend(
|
33
|
+
"ESP32-S3-TOUCH-LCD-7-800X480",
|
34
|
+
enable_pin=[{"ch422g": None, "number": 2}, {"ch422g": None, "number": 6}],
|
35
|
+
hsync_back_porch=8,
|
36
|
+
hsync_front_porch=8,
|
37
|
+
hsync_pulse_width=4,
|
38
|
+
vsync_back_porch=16,
|
39
|
+
vsync_front_porch=16,
|
40
|
+
vsync_pulse_width=4,
|
41
|
+
)
|
42
|
+
|
43
|
+
st7701s.extend(
|
44
|
+
"WAVESHARE-4-480x480",
|
45
|
+
data_rate="2MHz",
|
46
|
+
spi_mode="MODE3",
|
47
|
+
color_order="BGR",
|
48
|
+
pixel_mode="18bit",
|
49
|
+
width=480,
|
50
|
+
height=480,
|
51
|
+
invert_colors=True,
|
52
|
+
cs_pin=42,
|
53
|
+
de_pin=40,
|
54
|
+
hsync_pin=38,
|
55
|
+
vsync_pin=39,
|
56
|
+
pclk_pin=41,
|
57
|
+
pclk_frequency="12MHz",
|
58
|
+
pclk_inverted=False,
|
59
|
+
data_pins={
|
60
|
+
"red": [46, 3, 8, 18, 17],
|
61
|
+
"green": [14, 13, 12, 11, 10, 9],
|
62
|
+
"blue": [5, 45, 48, 47, 21],
|
63
|
+
},
|
64
|
+
)
|