Skip to content

pico pio usb host: verify types of pio resources used #9958

Closed
@jepler

Description

@jepler

Current Pico-PIO-USB says:

  • 1 PIO, 3 state machines, 32 instructions

but we check for 2 PIOs with 31+22 instructions:

    if (!_has_program_room(pio_cfg.pio_tx_num, 22) || tx_sm_free < 1 ||
        !(tx_sm_free == 4 || is_gpio_compatible(pio_tx, used_gpio_ranges)) ||
        !_has_program_room(pio_cfg.pio_rx_num, 31) || rx_sm_free < 2 ||
        !(rx_sm_free == 4 || is_gpio_compatible(pio_rx, used_gpio_ranges))) {
        mp_raise_RuntimeError(MP_ERROR_TEXT("All state machines in use"));
    }

It looks like this change occurred with 0.6.0: sekigon-gonnoc/Pico-PIO-USB@d1f050a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions