summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--stmhal/dac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/dac.c b/stmhal/dac.c
index 9b73b2dae3..81ce993a8c 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -62,7 +62,7 @@
/// # create a buffer containing a sine-wave
/// buf = bytearray(100)
/// for i in range(len(buf)):
-/// buf[i] = 128 + 127 * math.sin(2 * math.pi * i / len(buf))
+/// buf[i] = 128 + int(127 * math.sin(2 * math.pi * i / len(buf)))
///
/// # output the sine-wave at 400Hz
/// dac = DAC(1)