Skip to content

Commit eee3128

Browse files
committed
stmhal: Fix DAC documentation: need to convert float to int for buf.
1 parent 2de4d59 commit eee3128

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stmhal/dac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
/// # create a buffer containing a sine-wave
6363
/// buf = bytearray(100)
6464
/// for i in range(len(buf)):
65-
/// buf[i] = 128 + 127 * math.sin(2 * math.pi * i / len(buf))
65+
/// buf[i] = 128 + int(127 * math.sin(2 * math.pi * i / len(buf)))
6666
///
6767
/// # output the sine-wave at 400Hz
6868
/// dac = DAC(1)

0 commit comments

Comments
 (0)