Skip to content

Commit

Permalink
Use request.set_values directly
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Nov 30, 2023
1 parent ff506de commit f8dee5a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions universal_silabs_flasher/flasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ def _send_gpio_pattern(pin_states: dict[int, list[bool]], toggle_delay: float) -
# Send all subsequent states
for i in range(1, num_states):
time.sleep(toggle_delay)

for pin, states in pin_states.items():
request.set_value(pin, gpiod.line.Value(int(pin_states[pin][i])))
request.set_values(
{
pin: gpiod.line.Value(int(pin_states[pin][i]))
for pin, states in pin_states.items()
}
)


async def send_gpio_pattern(
Expand Down

0 comments on commit f8dee5a

Please sign in to comment.