Skip to content

Commit 7c7a9bd

Browse files
pi-anldpgeorge
authored andcommitted
drivers/ninaw10/machine_pin_nina: Add exception text wrappers.
Required in MICROPY_PREVIEW_VERSION_2. Signed-off-by: Andrew Leech <[email protected]>
1 parent ba4179b commit 7c7a9bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ninaw10/machine_pin_nina.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ void machine_pin_ext_config(machine_pin_obj_t *self, int mode, int value) {
114114
mode = NINA_GPIO_OUTPUT;
115115
self->is_output = true;
116116
} else {
117-
mp_raise_ValueError("only Pin.OUT and Pin.IN are supported for this pin");
117+
mp_raise_ValueError(MP_ERROR_TEXT("only Pin.OUT and Pin.IN are supported for this pin"));
118118
}
119119
if (self->id >= 0 && self->id < MICROPY_HW_PIN_EXT_COUNT) {
120120
uint8_t buf[] = {pin_map[self->id], mode};
121121
if (mode == NINA_GPIO_OUTPUT) {
122122
if (NINA_GPIO_IS_INPUT_ONLY(self->id)) {
123-
mp_raise_ValueError("only Pin.IN is supported for this pin");
123+
mp_raise_ValueError(MP_ERROR_TEXT("only Pin.IN is supported for this pin"));
124124
}
125125
machine_pin_ext_set(self, value);
126126
}

0 commit comments

Comments
 (0)