esp32/esp32_rmt: Add RMT.PULSE_MAX constant.
If you have a variable frequency and pulse width, and you want to optimize pulse resolution, then you must do a calculation beforehand to ensure you normalize the array to keep all list values within bound. That calculation requires RMT.source_freq(), RMT.clock_div(), and this 32767 constant. Signed-off-by: Mark Blakeney <mark.blakeney@bullet-systems.net>
This commit is contained in:
committed by
Damien George
parent
fbb7c32040
commit
2888c5b230
@@ -368,6 +368,9 @@ STATIC const mp_rom_map_elem_t esp32_rmt_locals_dict_table[] = {
|
||||
|
||||
// Class methods
|
||||
{ MP_ROM_QSTR(MP_QSTR_source_freq), MP_ROM_PTR(&esp32_rmt_source_obj) },
|
||||
|
||||
// Constants
|
||||
{ MP_ROM_QSTR(MP_QSTR_PULSE_MAX), MP_ROM_INT(32767) },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(esp32_rmt_locals_dict, esp32_rmt_locals_dict_table);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user