]> granicus.if.org Git - esp-idf/commit
Merge branch 'bugfix/ledc_divider' into 'master'
authorAngus Gratton <angus@espressif.com>
Fri, 25 Nov 2016 02:11:33 +0000 (10:11 +0800)
committerAngus Gratton <angus@espressif.com>
Fri, 25 Nov 2016 02:11:33 +0000 (10:11 +0800)
commit7a93422089441e16cddfde368ea4857a8903e6d7
treeef485f033a2380ac6077c2904e12fea851172a6a
parent7dc322273c13d93294a92aaa6941bba544bac8c4
parentf60e54497ceac2eab4da942672fa27e981cb3b62
Merge branch 'bugfix/ledc_divider' into 'master'

ledc: fix reported error when div_param == 256

Whenever bit_num and freq_hz are such that div_param == 256, the code would flag that as an error.
In fact, value 256 of div_param was a valid one (HW requires that div_param >= 1.0, when interpreted as a Q10.8 fixed point value).

Changed the if statements a bit to make the logic clearer, and added more descriptive error messages.

Also added missing error for the unimplemented case of low speed mode.

Reported in https://github.com/igrr/esp32-cam-demo/issues/2

See merge request !247
components/driver/ledc.c