From b30e0d2f2683a809ae393dd402aad89a62a22df3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 10 Apr 2018 22:25:55 +1000 Subject: 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. --- tests/pyb/dac.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3