Skip to content

Figure out if CircuitPython on RP2040 can set pullup on ADC #1

@JohnAZoidberg

Description

@JohnAZoidberg

Currently I'm hardcoding it in the firmware.

In the submodule ports/raspberrypi/sdk:

--- a/src/rp2_common/hardware_adc/include/hardware/adc.h
+++ b/src/rp2_common/hardware_adc/include/hardware/adc.h
@@ -71,7 +71,8 @@ static inline void adc_gpio_init(uint gpio) {
     // Select NULL function to make output driver hi-Z
     gpio_set_function(gpio, GPIO_FUNC_NULL);
     // Also disable digital pulls and digital receiver
-    gpio_disable_pulls(gpio);
+    // gpio_disable_pulls(gpio);
+    gpio_pull_up(gpio);
     gpio_set_input_enabled(gpio, false);
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions