summaryrefslogtreecommitdiff
path: root/shared-module
diff options
context:
space:
mode:
authorLucian Copeland <hierophect@gmail.com>2020-07-22 14:11:00 -0400
committerLucian Copeland <hierophect@gmail.com>2020-07-22 14:22:05 -0400
commitc1f731d62e6d7bce385baec9ead3bafc46234805 (patch)
tree4952b913b22b87734a3527a75060375d80801c7b /shared-module
parente232ec10ceb9c78df27cb4b5cee79079efd85d84 (diff)
Claim USB pins at startup to prevent overwrites
Diffstat (limited to 'shared-module')
-rw-r--r--shared-module/touchio/TouchIn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared-module/touchio/TouchIn.c b/shared-module/touchio/TouchIn.c
index 88d12b8b8..3fdf3e0ca 100644
--- a/shared-module/touchio/TouchIn.c
+++ b/shared-module/touchio/TouchIn.c
@@ -31,6 +31,7 @@
#include "py/runtime.h"
#include "py/mphal.h"
#include "shared-bindings/touchio/TouchIn.h"
+#include "shared-bindings/microcontroller/Pin.h"
// This is a capacitive touch sensing routine using a single digital
// pin. The pin should be connected to the sensing pad, and to ground
@@ -67,7 +68,7 @@ static uint16_t get_raw_reading(touchio_touchin_obj_t *self) {
}
void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self, const mcu_pin_obj_t *pin) {
- claim_pin(pin);
+ common_hal_mcu_pin_claim(pin);
self->digitalinout = m_new_obj(digitalio_digitalinout_obj_t);
self->digitalinout->base.type = &digitalio_digitalinout_type;