extmod/machine_spi: Make SPI protocol structure public.
So it can be referenced directly without the need for the uPy object.
This commit is contained in:
parent
4e48700f9a
commit
21d5527edf
|
@ -321,7 +321,7 @@ STATIC void mp_machine_soft_spi_init(mp_obj_base_t *self_in, size_t n_args, cons
|
||||||
mp_hal_pin_input(self->miso);
|
mp_hal_pin_input(self->miso);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC const mp_machine_spi_p_t mp_machine_soft_spi_p = {
|
const mp_machine_spi_p_t mp_machine_soft_spi_p = {
|
||||||
.init = mp_machine_soft_spi_init,
|
.init = mp_machine_soft_spi_init,
|
||||||
.deinit = NULL,
|
.deinit = NULL,
|
||||||
.transfer = mp_machine_soft_spi_transfer,
|
.transfer = mp_machine_soft_spi_transfer,
|
||||||
|
|
|
@ -46,6 +46,7 @@ typedef struct _mp_machine_soft_spi_obj_t {
|
||||||
mp_hal_pin_obj_t miso;
|
mp_hal_pin_obj_t miso;
|
||||||
} mp_machine_soft_spi_obj_t;
|
} mp_machine_soft_spi_obj_t;
|
||||||
|
|
||||||
|
extern const mp_machine_spi_p_t mp_machine_soft_spi_p;
|
||||||
extern const mp_obj_type_t mp_machine_soft_spi_type;
|
extern const mp_obj_type_t mp_machine_soft_spi_type;
|
||||||
extern const mp_obj_dict_t mp_machine_spi_locals_dict;
|
extern const mp_obj_dict_t mp_machine_spi_locals_dict;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue