Skip to content

Commit

Permalink
codal_app/microbithal: Add microbit_hal_pin_touch_calibrate() function.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Sep 9, 2024
1 parent 251bd63 commit a6f8372
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/codal_app/microbithal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/codal_app/microbithal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a6f8372

Please sign in to comment.