Tweak the backlight PWM rate to be higher that audio range. Fixes #1571
This commit is contained in:
parent
f3e50b9df2
commit
08158a7c34
@ -121,7 +121,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
|
|||||||
// Always set the backlight type in case we're reusing memory.
|
// Always set the backlight type in case we're reusing memory.
|
||||||
self->backlight_inout.base.type = &mp_type_NoneType;
|
self->backlight_inout.base.type = &mp_type_NoneType;
|
||||||
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {
|
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {
|
||||||
pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 5000, false);
|
pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 50000, false);
|
||||||
if (result != PWMOUT_OK) {
|
if (result != PWMOUT_OK) {
|
||||||
self->backlight_inout.base.type = &digitalio_digitalinout_type;
|
self->backlight_inout.base.type = &digitalio_digitalinout_type;
|
||||||
common_hal_digitalio_digitalinout_construct(&self->backlight_inout, backlight_pin);
|
common_hal_digitalio_digitalinout_construct(&self->backlight_inout, backlight_pin);
|
||||||
|
Loading…
Reference in New Issue
Block a user