summaryrefslogtreecommitdiffstatshomepage
path: root/py/stackctrl.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-13 14:33:04 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-13 14:33:04 +0100
commitb5c43be135dc4b9e75fda771935445589e761b12 (patch)
treede482d74a4ea7f40a7143b11423722431b5fbd7b /py/stackctrl.c
parentb8f9ac54111ad0962401c764112c9a5669699deb (diff)
downloadmicropython-b5c43be135dc4b9e75fda771935445589e761b12.tar.gz
micropython-b5c43be135dc4b9e75fda771935445589e761b12.zip
stmhal: Allow to set bits resolution for DAC; 8 is default, can have 12.
This patch allows to configure the DAC resolution in the constructor and in the init function, eg: dac = DAC(1, bits=12). The default resolution is 8 bits for backwards compatibility. The bits sets the maximum value accepted by write and write_timed methods, being 2**bits - 1. When using write_timed with 12-bit resolution, the input buffer is treated as an unsigned half-word array, typecode 'H'. See PR #1130 for discussion.
Diffstat (limited to 'py/stackctrl.c')
0 files changed, 0 insertions, 0 deletions