Skip to content

Commit

Permalink
shared-bindings: Fix two more try_locks. Copy and paste failed me.
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Feb 28, 2017
1 parent d598c2a commit 7ecbc3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions shared-bindings/bitbangio/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 1 addition & 2 deletions shared-bindings/nativeio/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7ecbc3a

Please sign in to comment.