From dddfb681c737c5623dc270bf6c8e59fd3b13b092 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 27 Feb 2019 11:07:51 -0500 Subject: 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 --- src/tmcuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tmcuart.c') 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) -- cgit v1.2.3-70-g09d2