aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-07-13 00:00:57 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-07-13 00:00:57 -0400
commit0af5b9ff6d43fc5ca9a3139bcb207800105a85d3 (patch)
treecdeafe1fff714c75c39519af9972fb7c7695cc3c /src
parentbe2d0abbab03667404c784f8543df858af82e7fe (diff)
downloadkutter-0af5b9ff6d43fc5ca9a3139bcb207800105a85d3.tar.gz
kutter-0af5b9ff6d43fc5ca9a3139bcb207800105a85d3.tar.xz
kutter-0af5b9ff6d43fc5ca9a3139bcb207800105a85d3.zip
neopixel: Be sure to set the line low on a failed write
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/neopixel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/neopixel.c b/src/neopixel.c
index 2fc02dd7..8954d25d 100644
--- a/src/neopixel.c
+++ b/src/neopixel.c
@@ -87,7 +87,8 @@ send_data(struct neopixel_s *n, uint32_t data)
return 0;
fail:
// A hardware irq messed up the transmission - report a failure
- n->last_req_time = cur;
+ gpio_out_write(pin, 0);
+ n->last_req_time = timer_read_time();
return -1;
}