Skip to content

Commit bbc70b6

Browse files
committed
codal_app: Use uBit.io.logo instead of uBit.io.face.
The uBit.io.face object is a (deprecated) reference to uBit.io.logo. Signed-off-by: Damien George <damien@micropython.org>
1 parent 3af0abd commit bbc70b6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/codal_app/microbithal.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ NRF52Pin *const pin_obj[] = {
5050
&uBit.io.P16,
5151
&uBit.io.P19, // external I2C SCL
5252
&uBit.io.P20, // external I2C SDA
53-
&uBit.io.face,
53+
&uBit.io.logo,
5454
&uBit.io.speaker,
5555
&uBit.io.runmic,
5656
&uBit.io.microphone,
@@ -203,8 +203,8 @@ void microbit_hal_pin_write_analog_u10(int pin, int value) {
203203
}
204204

205205
int microbit_hal_pin_is_touched(int pin) {
206-
if (pin == MICROBIT_HAL_PIN_FACE) {
207-
// For touch on the face/logo, delegate to the TouchButton instance.
206+
if (pin == MICROBIT_HAL_PIN_LOGO) {
207+
// For touch on the logo pin, delegate to the TouchButton instance.
208208
return uBit.logo.buttonActive();
209209
}
210210
return pin_obj[pin]->isTouched();

src/codal_app/microbithal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extern "C" {
5959
#define MICROBIT_HAL_PIN_P16 (16)
6060
#define MICROBIT_HAL_PIN_P19 (17)
6161
#define MICROBIT_HAL_PIN_P20 (18)
62-
#define MICROBIT_HAL_PIN_FACE (19)
62+
#define MICROBIT_HAL_PIN_LOGO (19)
6363
#define MICROBIT_HAL_PIN_SPEAKER (20)
6464
#define MICROBIT_HAL_PIN_USB_TX (30)
6565
#define MICROBIT_HAL_PIN_USB_RX (31)

src/codal_port/microbit_pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const microbit_pin_obj_t microbit_p16_obj = {{&microbit_dig_pin_type}, 16, MICR
4848
const microbit_pin_obj_t microbit_p19_obj = {{&microbit_dig_pin_type}, 19, MICROBIT_HAL_PIN_P19, MODE_I2C};
4949
const microbit_pin_obj_t microbit_p20_obj = {{&microbit_dig_pin_type}, 20, MICROBIT_HAL_PIN_P20, MODE_I2C};
5050

51-
const microbit_pin_obj_t microbit_pin_logo_obj = {{&microbit_touch_only_pin_type}, 30, MICROBIT_HAL_PIN_FACE, MODE_UNUSED};
51+
const microbit_pin_obj_t microbit_pin_logo_obj = {{&microbit_touch_only_pin_type}, 30, MICROBIT_HAL_PIN_LOGO, MODE_UNUSED};
5252
const microbit_pin_obj_t microbit_pin_speaker_obj = {{&microbit_dig_pin_type}, 31, MICROBIT_HAL_PIN_SPEAKER, MODE_UNUSED};
5353

5454
static mp_obj_t microbit_pin_get_mode_func(mp_obj_t self_in) {

0 commit comments

Comments
 (0)