diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-07 14:39:12 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-07 14:39:12 -0700 |
| commit | 714521a4c7a6814c365c061bcf967c4c45692e3d (patch) | |
| tree | c490c22fd15137be6b7def7311da9da0aef3457d /shared-bindings/analogio/AnalogOut.c | |
| parent | c5e515b8fe38a346125265fcebb86f857f29e053 (diff) | |
shared-bindings: Update docs to remove with statements from examples but add more detail to the design guide about their use.
Diffstat (limited to 'shared-bindings/analogio/AnalogOut.c')
| -rw-r--r-- | shared-bindings/analogio/AnalogOut.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shared-bindings/analogio/AnalogOut.c b/shared-bindings/analogio/AnalogOut.c index 6b02f8c0a..6b65878b4 100644 --- a/shared-bindings/analogio/AnalogOut.c +++ b/shared-bindings/analogio/AnalogOut.c @@ -45,8 +45,8 @@ //| import analogio //| from microcontroller import pin //| -//| with analogio.AnalogOut(pin.PA02) as dac: # output on pin PA02 -//| dac.value = 32768 # makes PA02 1.65V +//| dac = analogio.AnalogOut(pin.PA02) # output on pin PA02 +//| dac.value = 32768 # makes PA02 1.65V //| //| .. class:: AnalogOut(pin) @@ -91,7 +91,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogout_deinit_obj, analogio_analogo //| .. method:: __exit__() //| -//| Automatically deinitializes the hardware when exiting a context. +//| Automatically deinitializes the hardware when exiting a context. See +//| :ref:`lifetime-and-contextmanagers` for more info. //| STATIC mp_obj_t analogio_analogout___exit__(size_t n_args, const mp_obj_t *args) { (void)n_args; |
