diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-04-10 22:25:55 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-04-11 14:22:21 +1000 |
| commit | b30e0d2f2683a809ae393dd402aad89a62a22df3 (patch) | |
| tree | 8deb7934f0b647cf33e5e70226a7ddc9b073dc9c /tests | |
| parent | aebd9701a78d267cb264d400804b02c5b7a00e9a (diff) | |
stm32/dac: Add buffering argument to constructor and init() method.
This can be used to select the output buffer behaviour of the DAC. The
default values are chosen to retain backwards compatibility with existing
behaviour.
Thanks to @peterhinch for the initial idea to add this feature.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pyb/dac.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/pyb/dac.py b/tests/pyb/dac.py index 6f03bbc64..ca68ec709 100644 --- a/tests/pyb/dac.py +++ b/tests/pyb/dac.py @@ -12,3 +12,7 @@ dac.write(0) dac.write_timed(bytearray(10), 100, mode=pyb.DAC.NORMAL) pyb.delay(20) dac.write(0) + +# test buffering arg +dac = pyb.DAC(1, buffering=True) +dac.write(0) |
