diff options
| author | Damien George <damien@micropython.org> | 2023-10-25 19:13:11 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-11-07 16:44:35 +1100 |
| commit | 03eae48847c61985afece342df971f149c8ffa42 (patch) | |
| tree | 41f4ea5a4c634d7891d9f730ef641760c5cf7d46 /docs/library | |
| parent | 4212799fd8bded69e5cf47faf2ebd675906ac151 (diff) | |
extmod/machine_adc_block: Factor esp32 ADCBlock bindings to common code.
This is a code factoring to have the Python bindings in one location, and
all the ports use those same bindings. At this stage only esp32 implements
this class, so the code for the bindings comes from that port.
The documentation is also updated to reflect the esp32's behaviour of
ADCBlock.connect().
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/machine.ADCBlock.rst | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/library/machine.ADCBlock.rst b/docs/library/machine.ADCBlock.rst index 56a468dd6..eb94362d5 100644 --- a/docs/library/machine.ADCBlock.rst +++ b/docs/library/machine.ADCBlock.rst @@ -39,9 +39,9 @@ Methods Configure the ADC peripheral. *bits* will set the resolution of the conversion process. -.. method:: ADCBlock.connect(channel) - ADCBlock.connect(source) - ADCBlock.connect(channel, source) +.. method:: ADCBlock.connect(channel, *, ...) + ADCBlock.connect(source, *, ...) + ADCBlock.connect(channel, source, *, ...) Connect up a channel on the ADC peripheral so it is ready for sampling, and return an :ref:`ADC <machine.ADC>` object that represents that connection. @@ -56,3 +56,6 @@ Methods If both *channel* and *source* are given then they are connected together and made ready for sampling. + + Any additional keyword arguments are used to configure the returned ADC object, + via its :meth:`init <machine.ADC.init>` method. |
