diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 13:35:52 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-08-28 13:55:17 -0400 |
commit | 3e45de7deade177b5caa921ee72a0e36300474c7 (patch) | |
tree | a93006c058d0efeb50353227a06eedb240005060 /watch-library/watch/watch_gpio.c | |
parent | 39a5c822a2a2e798e2e39ff8a98b7af84253026c (diff) | |
download | Sensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.tar.gz Sensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.tar.bz2 Sensor-Watch-3e45de7deade177b5caa921ee72a0e36300474c7.zip |
implement USB console
Diffstat (limited to 'watch-library/watch/watch_gpio.c')
-rw-r--r-- | watch-library/watch/watch_gpio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/watch-library/watch/watch_gpio.c b/watch-library/watch/watch_gpio.c index 460a38df..a9bc139d 100644 --- a/watch-library/watch/watch_gpio.c +++ b/watch-library/watch/watch_gpio.c @@ -27,6 +27,12 @@ gpio_set_pin_function(pin, GPIO_PIN_FUNCTION_OFF); } +void watch_disable_digital_input(const uint8_t pin) { + gpio_set_pin_direction(pin, GPIO_DIRECTION_OFF); + gpio_set_pin_pull_mode(pin, GPIO_PULL_OFF); + gpio_set_pin_function(pin, GPIO_PIN_FUNCTION_OFF); +} + void watch_enable_pull_up(const uint8_t pin) { gpio_set_pin_pull_mode(pin, GPIO_PULL_UP); } |