Commit Graph

10 Commits

Author SHA1 Message Date
Dan Halbert a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
Jeff Epler cdab078d9d
shared-bindings: Get rid of CYW43 special cases in shared-bindings
.. by moving it into a new weak function that can be replaced
just by the picow build.
2022-11-14 08:44:08 -06:00
Jeff Epler 7f36a365cf
delay 100us for analog voltage to stabilize
.. otherwise, depending on the prior state of the pin as a digital
input, the value read could be 20% low.
2022-11-08 10:43:14 -06:00
Jeff Epler 09f6919c93
Add ability to read VOLTAGE_MONITOR on Pico W
Because this must be treated like an in-use pin for all other purposes,
unfortunately a special case must be added in shared-bindings.

Multiple AnalogIn objects for VOLTAGE_MONITOR can be created (because
in use tracking isn't working) but this causes no harm.

Testing performed: Read the monitor, then imported wifi. When the
pin state was insufficiently restored, the second step would fail
with debug messages about do_ioctl timeout.

```
import analogio, board
a = analogio.AnalogIn(board.VOLTAGE_MONITOR)
print(a.value)
import wifi
```

Closes: #7020
2022-11-08 09:37:15 -06:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Paint Your Dragon c3f58193ca
Correctly scale analog reading per issue #4794 2022-05-24 08:46:39 -07:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Jeff Epler 621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Scott Shawcroft 733094aead
Add initial RP2040 support
The RP2040 is new microcontroller from Raspberry Pi that features
two Cortex M0s and eight PIO state machines that are good for
crunching lots of data. It has 264k RAM and a built in UF2
bootloader too.

Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
2021-01-20 19:16:56 -08:00