Skip to content

DMA support for Pi Pico rp2 port #7641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ports/rp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ set(MICROPY_SOURCE_PORT
pendsv.c
rp2_flash.c
rp2_pio.c
rp2_dma.c
uart.c
usbd.c
msc_disk.c
Expand All @@ -162,6 +163,7 @@ set(MICROPY_SOURCE_QSTR
${MICROPY_PORT_DIR}/modos.c
${MICROPY_PORT_DIR}/rp2_flash.c
${MICROPY_PORT_DIR}/rp2_pio.c
${MICROPY_PORT_DIR}/rp2_dma.c
${CMAKE_BINARY_DIR}/pins_${MICROPY_BOARD}.c
)

Expand Down
2 changes: 2 additions & 0 deletions ports/rp2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ int main(int argc, char **argv) {
readline_init0();
machine_pin_init();
rp2_pio_init();
rp2_dma_init();
machine_i2s_init0();

#if MICROPY_PY_BLUETOOTH
Expand Down Expand Up @@ -202,6 +203,7 @@ int main(int argc, char **argv) {
#if MICROPY_PY_NETWORK
mod_network_deinit();
#endif
rp2_dma_deinit();
rp2_pio_deinit();
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_deinit();
Expand Down
1 change: 1 addition & 0 deletions ports/rp2/modrp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ STATIC const mp_rom_map_elem_t rp2_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_Flash), MP_ROM_PTR(&rp2_flash_type) },
{ MP_ROM_QSTR(MP_QSTR_PIO), MP_ROM_PTR(&rp2_pio_type) },
{ MP_ROM_QSTR(MP_QSTR_StateMachine), MP_ROM_PTR(&rp2_state_machine_type) },
{ MP_ROM_QSTR(MP_QSTR_DMA), MP_ROM_PTR(&rp2_dma_type) },
{ MP_ROM_QSTR(MP_QSTR_bootsel_button), MP_ROM_PTR(&rp2_bootsel_button_obj) },

#if MICROPY_PY_NETWORK_CYW43
Expand Down
4 changes: 4 additions & 0 deletions ports/rp2/modrp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@
extern const mp_obj_type_t rp2_flash_type;
extern const mp_obj_type_t rp2_pio_type;
extern const mp_obj_type_t rp2_state_machine_type;
extern const mp_obj_type_t rp2_dma_type;

void rp2_pio_init(void);
void rp2_pio_deinit(void);

void rp2_dma_init(void);
void rp2_dma_deinit(void);

#endif // MICROPY_INCLUDED_RP2_MODRP2_H
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy