diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-02-27 11:07:51 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-02-27 11:13:21 -0500 |
commit | dddfb681c737c5623dc270bf6c8e59fd3b13b092 (patch) | |
tree | c295b1c5837c2f1d6f6f569b595b2506cd2f69b7 /src/tmcuart.c | |
parent | b6589406d46186bc9ae76a3db49363c5168e30e9 (diff) | |
download | kutter-dddfb681c737c5623dc270bf6c8e59fd3b13b092.tar.gz kutter-dddfb681c737c5623dc270bf6c8e59fd3b13b092.tar.xz kutter-dddfb681c737c5623dc270bf6c8e59fd3b13b092.zip |
pins: Add support for pull down resistors
Add initial support for selecting pull down resistors (for
micro-controllers that support it).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/tmcuart.c')
-rw-r--r-- | src/tmcuart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmcuart.c b/src/tmcuart.c index 82846b88..e4b04cb8 100644 --- a/src/tmcuart.c +++ b/src/tmcuart.c @@ -176,7 +176,7 @@ command_config_tmcuart(uint32_t *args) , sizeof(*t)); uint8_t pull_up = args[2]; uint32_t rx_pin = args[1], tx_pin = args[3]; - t->rx_pin = gpio_in_setup(rx_pin, pull_up); + t->rx_pin = gpio_in_setup(rx_pin, !!pull_up); t->tx_pin = gpio_out_setup(tx_pin, 1); t->cfg_bit_time = args[4]; t->flags = (TU_LINE_HIGH | (pull_up ? TU_PULLUP : 0) |