Skip to content

Commit 21d5527

Browse files
committed
extmod/machine_spi: Make SPI protocol structure public.
So it can be referenced directly without the need for the uPy object.
1 parent 4e48700 commit 21d5527

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

extmod/machine_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ STATIC void mp_machine_soft_spi_init(mp_obj_base_t *self_in, size_t n_args, cons
321321
mp_hal_pin_input(self->miso);
322322
}
323323

324-
STATIC const mp_machine_spi_p_t mp_machine_soft_spi_p = {
324+
const mp_machine_spi_p_t mp_machine_soft_spi_p = {
325325
.init = mp_machine_soft_spi_init,
326326
.deinit = NULL,
327327
.transfer = mp_machine_soft_spi_transfer,

extmod/machine_spi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ typedef struct _mp_machine_soft_spi_obj_t {
4646
mp_hal_pin_obj_t miso;
4747
} mp_machine_soft_spi_obj_t;
4848

49+
extern const mp_machine_spi_p_t mp_machine_soft_spi_p;
4950
extern const mp_obj_type_t mp_machine_soft_spi_type;
5051
extern const mp_obj_dict_t mp_machine_spi_locals_dict;
5152

0 commit comments

Comments
 (0)