shared-bindings: Fix two more try_locks. Copy and paste failed me.

This commit is contained in:
Scott Shawcroft 2017-02-28 12:31:27 +01:00
parent d598c2a919
commit 7ecbc3a148
2 changed files with 2 additions and 4 deletions

View File

@ -158,8 +158,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_configure_obj, 1, bitbangio_spi_configu
//| Attempts to grab the SPI lock. Returns True on success.
//|
STATIC mp_obj_t bitbangio_spi_obj_try_lock(mp_obj_t self_in) {
shared_module_bitbangio_spi_try_lock(MP_OBJ_TO_PTR(self_in));
return self_in;
return mp_obj_new_bool(shared_module_bitbangio_spi_try_lock(MP_OBJ_TO_PTR(self_in)));
}
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_spi_try_lock_obj, bitbangio_spi_obj_try_lock);

View File

@ -172,8 +172,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(nativeio_spi_configure_obj, 1, nativeio_spi_configure
//| Attempts to grab the SPI lock. Returns True on success.
//|
STATIC mp_obj_t nativeio_spi_obj_try_lock(mp_obj_t self_in) {
common_hal_nativeio_spi_try_lock(MP_OBJ_TO_PTR(self_in));
return self_in;
return mp_obj_new_bool(common_hal_nativeio_spi_try_lock(MP_OBJ_TO_PTR(self_in)));
}
MP_DEFINE_CONST_FUN_OBJ_1(nativeio_spi_try_lock_obj, nativeio_spi_obj_try_lock);