diff --git a/src/codal_app/microbithal.cpp b/src/codal_app/microbithal.cpp index 67ec283..c675108 100644 --- a/src/codal_app/microbithal.cpp +++ b/src/codal_app/microbithal.cpp @@ -213,6 +213,10 @@ void microbit_hal_pin_write_analog_u10(int pin, int value) { pin_obj[pin]->setAnalogValue(value); } +void microbit_hal_pin_touch_calibrate(int pin) { + pin_obj[pin]->touchCalibrate(); +} + int microbit_hal_pin_touch_state(int pin, int *was_touched, int *num_touches) { if (was_touched != NULL || num_touches != NULL) { int pin_state_index; diff --git a/src/codal_app/microbithal.h b/src/codal_app/microbithal.h index 2ebeaf0..114e67c 100644 --- a/src/codal_app/microbithal.h +++ b/src/codal_app/microbithal.h @@ -132,6 +132,7 @@ int microbit_hal_pin_read(int pin); void microbit_hal_pin_write(int pin, int value); int microbit_hal_pin_read_analog_u10(int pin); void microbit_hal_pin_write_analog_u10(int pin, int value); +void microbit_hal_pin_touch_calibrate(int pin); int microbit_hal_pin_touch_state(int pin, int *was_touched, int *num_touches); void microbit_hal_pin_write_ws2812(int pin, const uint8_t *buf, size_t len);