mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 06:33:51 +00:00 
			
		
		
		
	[spi] Add mosi pin checks for displays (#7702)
This commit is contained in:
		| @@ -1,22 +1,23 @@ | ||||
| import esphome.codegen as cg | ||||
| import esphome.config_validation as cv | ||||
| from esphome import pins | ||||
| from esphome.components import display, spi, power_supply | ||||
| import esphome.codegen as cg | ||||
| from esphome.components import display, power_supply, spi | ||||
| import esphome.config_validation as cv | ||||
| from esphome.const import ( | ||||
|     CONF_BACKLIGHT_PIN, | ||||
|     CONF_CS_PIN, | ||||
|     CONF_DC_PIN, | ||||
|     CONF_HEIGHT, | ||||
|     CONF_ID, | ||||
|     CONF_LAMBDA, | ||||
|     CONF_MODEL, | ||||
|     CONF_RESET_PIN, | ||||
|     CONF_WIDTH, | ||||
|     CONF_POWER_SUPPLY, | ||||
|     CONF_ROTATION, | ||||
|     CONF_CS_PIN, | ||||
|     CONF_OFFSET_HEIGHT, | ||||
|     CONF_OFFSET_WIDTH, | ||||
|     CONF_POWER_SUPPLY, | ||||
|     CONF_RESET_PIN, | ||||
|     CONF_ROTATION, | ||||
|     CONF_WIDTH, | ||||
| ) | ||||
|  | ||||
| from . import st7789v_ns | ||||
|  | ||||
| CONF_EIGHTBITCOLOR = "eightbitcolor" | ||||
| @@ -168,6 +169,10 @@ CONFIG_SCHEMA = cv.All( | ||||
|     validate_st7789v, | ||||
| ) | ||||
|  | ||||
| FINAL_VALIDATE_SCHEMA = spi.final_validate_device_schema( | ||||
|     "st7789v", require_miso=False, require_mosi=True | ||||
| ) | ||||
|  | ||||
|  | ||||
| async def to_code(config): | ||||
|     var = cg.new_Pvariable(config[CONF_ID]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user