summaryrefslogtreecommitdiff
path: root/shared-bindings/pulseio/__init__.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-08-25 16:39:23 -0700
committerScott Shawcroft <scott@tannewt.org>2020-08-25 16:39:23 -0700
commit8b71e26abdd5ae2dfcd82d9f2dcb8f7179882d3f (patch)
treea9167d237c97818596b554a67a2d3b60a305b566 /shared-bindings/pulseio/__init__.c
parent380cbfba55e45f9f0d8ccae6c28c23b1ea93147f (diff)
parent78c512e86b5c61d337e10cb5ec598cecd728c5f6 (diff)
Merge remote-tracking branch 'adafruit/main' into native_wifi
Diffstat (limited to 'shared-bindings/pulseio/__init__.c')
-rw-r--r--shared-bindings/pulseio/__init__.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/shared-bindings/pulseio/__init__.c b/shared-bindings/pulseio/__init__.c
index 87946e5f0..bfe9635f0 100644
--- a/shared-bindings/pulseio/__init__.c
+++ b/shared-bindings/pulseio/__init__.c
@@ -33,40 +33,29 @@
#include "shared-bindings/pulseio/__init__.h"
#include "shared-bindings/pulseio/PulseIn.h"
#include "shared-bindings/pulseio/PulseOut.h"
-#include "shared-bindings/pulseio/PWMOut.h"
+#include "shared-bindings/pwmio/PWMOut.h"
-//| """Support for pulse based protocols
+//| """Support for individual pulse based protocols
//|
//| The `pulseio` module contains classes to provide access to basic pulse IO.
+//| Individual pulses are commonly used in infrared remotes and in DHT
+//| temperature sensors.
+//|
+//|
+//| .. warning:: PWMOut is moving to `pwmio` and will be removed from `pulseio`
+//| in CircuitPython 7.
//|
-
//| All classes change hardware state and should be deinitialized when they
//| are no longer needed if the program continues after use. To do so, either
//| call :py:meth:`!deinit` or use a context manager. See
-//| :ref:`lifetime-and-contextmanagers` for more info.
-//|
-//| For example::
-//|
-//| import pulseio
-//| import time
-//| from board import *
-//|
-//| pwm = pulseio.PWMOut(D13)
-//| pwm.duty_cycle = 2 ** 15
-//| time.sleep(0.1)
-//|
-//| This example will initialize the the device, set
-//| :py:data:`~pulseio.PWMOut.duty_cycle`, and then sleep 0.1 seconds.
-//| CircuitPython will automatically turn off the PWM when it resets all
-//| hardware after program completion. Use ``deinit()`` or a ``with`` statement
-//| to do it yourself."""
+//| :ref:`lifetime-and-contextmanagers` for more info."""
//|
STATIC const mp_rom_map_elem_t pulseio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_pulseio) },
{ MP_ROM_QSTR(MP_QSTR_PulseIn), MP_ROM_PTR(&pulseio_pulsein_type) },
{ MP_ROM_QSTR(MP_QSTR_PulseOut), MP_ROM_PTR(&pulseio_pulseout_type) },
- { MP_ROM_QSTR(MP_QSTR_PWMOut), MP_ROM_PTR(&pulseio_pwmout_type) },
+ { MP_ROM_QSTR(MP_QSTR_PWMOut), MP_ROM_PTR(&pwmio_pwmout_type) },
};
STATIC MP_DEFINE_CONST_DICT(pulseio_module_globals, pulseio_module_globals_table);