1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 02:02:21 +01:00

[spi] Add mosi pin checks for displays (#7702)

This commit is contained in:
Clyde Stubbs
2024-10-31 09:28:18 +11:00
committed by GitHub
parent e85157db4b
commit 5a2fed3569
13 changed files with 88 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
import esphome.codegen as cg
from esphome.components import spi, ssd1331_base
import esphome.config_validation as cv
from esphome.const import CONF_DC_PIN, CONF_ID, CONF_LAMBDA, CONF_PAGES
CODEOWNERS = ["@kbx81"]
@@ -24,6 +24,10 @@ CONFIG_SCHEMA = cv.All(
cv.has_at_most_one_key(CONF_PAGES, CONF_LAMBDA),
)
FINAL_VALIDATE_SCHEMA = spi.final_validate_device_schema(
"ssd1331_spi", require_miso=False, require_mosi=True
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])