mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
use cleaner and more obvious pin names for SM16716 output component
This commit is contained in:
parent
6b397a9ea5
commit
38d53c9be0
@ -25,11 +25,11 @@ CONFIG_SCHEMA = cv.Schema({
|
|||||||
|
|
||||||
|
|
||||||
def to_code(config):
|
def to_code(config):
|
||||||
for mosi in gpio_output_pin_expression(config[CONF_DATA_PIN]):
|
for data in gpio_output_pin_expression(config[CONF_DATA_PIN]):
|
||||||
yield
|
yield
|
||||||
for sclk in gpio_output_pin_expression(config[CONF_CLOCK_PIN]):
|
for clock in gpio_output_pin_expression(config[CONF_CLOCK_PIN]):
|
||||||
yield
|
yield
|
||||||
rhs = App.make_sm16716_component(mosi, sclk)
|
rhs = App.make_sm16716_component(data, clock)
|
||||||
sm16716 = Pvariable(config[CONF_ID], rhs)
|
sm16716 = Pvariable(config[CONF_ID], rhs)
|
||||||
if CONF_NUM_CHANNELS in config:
|
if CONF_NUM_CHANNELS in config:
|
||||||
add(sm16716.set_num_channels(config[CONF_NUM_CHANNELS]))
|
add(sm16716.set_num_channels(config[CONF_NUM_CHANNELS]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user