Skip to content

Commit

Permalink
document Espressif AnalogIn limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed Apr 2, 2024
1 parent 1e3a735 commit 5a7ac6f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion shared-bindings/analogio/AnalogIn.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ MP_WEAK const mcu_pin_obj_t *common_hal_analogio_analogin_validate_pin(mp_obj_t
//| """Use the AnalogIn on the given pin. The reference voltage varies by
//| platform so use ``reference_voltage`` to read the configured setting.
//|
//| :param ~microcontroller.Pin pin: the pin to read from"""
//| :param ~microcontroller.Pin pin: the pin to read from
//|
//| **Limitations:** On Espressif ESP32, `AnalogIn` is not available when WiFi is in use:
//| the hardware makes use of the ADC. Attempts to use `AnalogIn` will raise `espidf.IDFError`.
//| On other Espressif chips, the ADC is available, but is shared with WiFi.
//| WiFi use takes precedence and may temporarily cause `espidf.IDFError` to be raise.
//| when you read a value. You can retry the read.
//| """
//| ...
STATIC mp_obj_t analogio_analogin_make_new(const mp_obj_type_t *type,
mp_uint_t n_args, size_t n_kw, const mp_obj_t *args) {
Expand Down

0 comments on commit 5a7ac6f

Please sign in to comment.