Skip to content

Commit 8253e56

Browse files
committed
fixes float division by zero error
1 parent dd293a4 commit 8253e56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

micropy_updates/esp32/machine_hw_spi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ mp_obj_t machine_hw_spi_device_make_new(const mp_obj_type_t *type, size_t n_args
516516

517517
self->spi_bus = MP_OBJ_TO_PTR(args[ARG_spi_bus].u_obj);
518518
self->cs = mp_obj_new_int((mp_int_t)cs);
519+
self->bits = (uint8_t)args[ARG_bits].u_int;
520+
519521
self->deinit = &machine_hw_spi_device_deinit_callback;
520522

521523
spi_device_interface_config_t devcfg = {

0 commit comments

Comments
 (0)