summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-19 19:08:12 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-19 19:08:12 +0100
commiteee31288dd9cc81a648dc033b320c6ccaf803a71 (patch)
tree65224b619f79ed502a0f1d08242229a8d9eb5138
parent2de4d5917172fcef180b6824da1da07fd8955b49 (diff)
downloadmicropython-eee31288dd9cc81a648dc033b320c6ccaf803a71.tar.gz
micropython-eee31288dd9cc81a648dc033b320c6ccaf803a71.zip
stmhal: Fix DAC documentation: need to convert float to int for buf.
-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)