stmhal: Fix DAC documentation: need to convert float to int for buf.

This commit is contained in:
Damien George 2014-05-19 19:08:12 +01:00
parent 2de4d59171
commit eee31288dd

View File

@ -62,7 +62,7 @@
/// # create a buffer containing a sine-wave /// # create a buffer containing a sine-wave
/// buf = bytearray(100) /// buf = bytearray(100)
/// for i in range(len(buf)): /// 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 /// # output the sine-wave at 400Hz
/// dac = DAC(1) /// dac = DAC(1)