Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

after use latest version dependency libs, init adc is not work #81

@fiefdx

Description

@fiefdx

I use latest wizio-pico, and, patch the tinyusb_gamepad commit(Updated to support latest TinyUSB version #79), then, the init adc is not work.

I init adc in Gamepad::setup method, like:

adc_init();
adc_gpio_init(26);
adc_gpio_init(27);
adc_gpio_init(28);

and, in Gamepad::read method: update joystick like:

adc_select_input(0);
state.lx = (adc_read() >> 4) << 8;
adc_select_input(1);
state.ly = (adc_read() >> 4) << 8;

it worked before, but, now it not work, I am sure it not my hardware problem, and, not the code problem, it must be some latest lib update break something

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions