Skip to content

Commit fb8cf73

Browse files
committed
working on being able to share the SPI Bus
1 parent ee05d3d commit fb8cf73

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

micropy_updates/stm32/machine_spi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,8 @@ mp_obj_t machine_hard_spi_make_new(const mp_obj_type_t *type, size_t n_args, siz
149149
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
150150
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
151151

152-
machine_hw_spi_obj_t
153-
154-
155152
// get static peripheral object
156-
int spi_id = spi_find_index(mp_obj_get_int(args[ARG_id].u_obj));
153+
int spi_id = spi_find_index(args[ARG_id].u_obj);
157154

158155
machine_hw_spi_bus_obj_t *spi_bus = &machine_hard_spi_bus_obj[spi_id - 1];
159156
machine_hw_spi_obj_t *self = m_new_obj(machine_hw_spi_obj_t);

0 commit comments

Comments
 (0)