Skip to content

Commit 7ecbc3a

Browse files
committed
shared-bindings: Fix two more try_locks. Copy and paste failed me.
1 parent d598c2a commit 7ecbc3a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

shared-bindings/bitbangio/SPI.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_configure_obj, 1, bitbangio_spi_configu
158158
//| Attempts to grab the SPI lock. Returns True on success.
159159
//|
160160
STATIC mp_obj_t bitbangio_spi_obj_try_lock(mp_obj_t self_in) {
161-
shared_module_bitbangio_spi_try_lock(MP_OBJ_TO_PTR(self_in));
162-
return self_in;
161+
return mp_obj_new_bool(shared_module_bitbangio_spi_try_lock(MP_OBJ_TO_PTR(self_in)));
163162
}
164163
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_spi_try_lock_obj, bitbangio_spi_obj_try_lock);
165164

shared-bindings/nativeio/SPI.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(nativeio_spi_configure_obj, 1, nativeio_spi_configure
172172
//| Attempts to grab the SPI lock. Returns True on success.
173173
//|
174174
STATIC mp_obj_t nativeio_spi_obj_try_lock(mp_obj_t self_in) {
175-
common_hal_nativeio_spi_try_lock(MP_OBJ_TO_PTR(self_in));
176-
return self_in;
175+
return mp_obj_new_bool(common_hal_nativeio_spi_try_lock(MP_OBJ_TO_PTR(self_in)));
177176
}
178177
MP_DEFINE_CONST_FUN_OBJ_1(nativeio_spi_try_lock_obj, nativeio_spi_obj_try_lock);
179178

0 commit comments

Comments
 (0)