File tree Expand file tree Collapse file tree 5 files changed +359
-0
lines changed Expand file tree Collapse file tree 5 files changed +359
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ set(MICROPY_SOURCE_PORT
172172 mutex_extra.c
173173 pendsv.c
174174 rp2_flash.c
175+ rp2_hstx.c
175176 rp2_pio.c
176177 rp2_psram.c
177178 rp2_dma.c
@@ -199,6 +200,7 @@ set(MICROPY_SOURCE_QSTR
199200 ${MICROPY_PORT_DIR} /modrp2.c
200201 ${MICROPY_PORT_DIR} /modos.c
201202 ${MICROPY_PORT_DIR} /rp2_flash.c
203+ ${MICROPY_PORT_DIR} /rp2_hstx.c
202204 ${MICROPY_PORT_DIR} /rp2_pio.c
203205 ${MICROPY_PORT_DIR} /rp2_dma.c
204206 ${CMAKE_BINARY_DIR} /pins_${MICROPY_BOARD} .c
Original file line number Diff line number Diff line change @@ -190,6 +190,9 @@ int main(int argc, char **argv) {
190190 // Initialise sub-systems.
191191 readline_init0 ();
192192 machine_pin_init ();
193+ #ifdef PICO_RP2350
194+ rp2_hstx_init ();
195+ #endif
193196 rp2_pio_init ();
194197 rp2_dma_init ();
195198 machine_i2s_init0 ();
@@ -252,6 +255,9 @@ int main(int argc, char **argv) {
252255 machine_i2s_deinit_all ();
253256 rp2_dma_deinit ();
254257 rp2_pio_deinit ();
258+ #ifdef PICO_RP2350
259+ rp2_hstx_deinit ();
260+ #endif
255261 #if MICROPY_PY_BLUETOOTH
256262 mp_bluetooth_deinit ();
257263 #endif
Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ static const mp_rom_map_elem_t rp2_module_globals_table[] = {
9797 { MP_ROM_QSTR (MP_QSTR_DMA ), MP_ROM_PTR (& rp2_dma_type ) },
9898 { MP_ROM_QSTR (MP_QSTR_bootsel_button ), MP_ROM_PTR (& rp2_bootsel_button_obj ) },
9999
100+ #ifdef PICO_RP2350
101+ { MP_ROM_QSTR (MP_QSTR_HSTX ), MP_ROM_PTR (& rp2_hstx_type ) },
102+ #endif
103+
100104 #if MICROPY_PY_NETWORK_CYW43
101105 // Deprecated (use network.country instead).
102106 { MP_ROM_QSTR (MP_QSTR_country ), MP_ROM_PTR (& mod_network_country_obj ) },
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ extern const mp_obj_type_t rp2_pio_type;
3333extern const mp_obj_type_t rp2_state_machine_type ;
3434extern const mp_obj_type_t rp2_dma_type ;
3535
36+ #ifdef PICO_RP2350
37+ extern const mp_obj_type_t rp2_hstx_type ;
38+ void rp2_hstx_init (void );
39+ void rp2_hstx_deinit (void );
40+ #endif
41+
3642void rp2_pio_init (void );
3743void rp2_pio_deinit (void );
3844
You can’t perform that action at this time.
0 commit comments