Fix flag typo
This commit is contained in:
parent
06b62721b3
commit
61b0994631
@ -42,5 +42,4 @@ ifeq ($(MCU_SERIES),F7)
|
|||||||
CIRCUITPY_RTC = 0
|
CIRCUITPY_RTC = 0
|
||||||
CIRCUITPY_FREQUENCYIO = 0
|
CIRCUITPY_FREQUENCYIO = 0
|
||||||
CIRCUITPY_I2CSLAVE = 0
|
CIRCUITPY_I2CSLAVE = 0
|
||||||
# shared-module modules that still need prerequisites filled
|
|
||||||
endif
|
endif
|
||||||
|
@ -112,7 +112,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
|
|||||||
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)) {
|
||||||
// Avoid PWM types and functions when the module isn't enabled
|
// Avoid PWM types and functions when the module isn't enabled
|
||||||
#if (CIRCUITPY_PULSIO)
|
#if (CIRCUITPY_PULSEIO)
|
||||||
pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 50000, 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;
|
||||||
@ -174,14 +174,14 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t* self,
|
|||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
|
||||||
// Avoid PWM types and functions when the module isn't enabled
|
// Avoid PWM types and functions when the module isn't enabled
|
||||||
#if (CIRCUITPY_PULSIO)
|
#if (CIRCUITPY_PULSEIO)
|
||||||
bool ispwm = (self->backlight_pwm.base.type == &pulseio_pwmout_type) ? true : false;
|
bool ispwm = (self->backlight_pwm.base.type == &pulseio_pwmout_type) ? true : false;
|
||||||
#else
|
#else
|
||||||
bool ispwm = false;
|
bool ispwm = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ispwm) {
|
if (ispwm) {
|
||||||
#if (CIRCUITPY_PULSIO)
|
#if (CIRCUITPY_PULSEIO)
|
||||||
common_hal_pulseio_pwmout_set_duty_cycle(&self->backlight_pwm, (uint16_t) (0xffff * brightness));
|
common_hal_pulseio_pwmout_set_duty_cycle(&self->backlight_pwm, (uint16_t) (0xffff * brightness));
|
||||||
ok = true;
|
ok = true;
|
||||||
#else
|
#else
|
||||||
@ -412,7 +412,7 @@ void displayio_display_background(displayio_display_obj_t* self) {
|
|||||||
|
|
||||||
void release_display(displayio_display_obj_t* self) {
|
void release_display(displayio_display_obj_t* self) {
|
||||||
release_display_core(&self->core);
|
release_display_core(&self->core);
|
||||||
#if (CIRCUITPY_PULSIO)
|
#if (CIRCUITPY_PULSEIO)
|
||||||
if (self->backlight_pwm.base.type == &pulseio_pwmout_type) {
|
if (self->backlight_pwm.base.type == &pulseio_pwmout_type) {
|
||||||
common_hal_pulseio_pwmout_reset_ok(&self->backlight_pwm);
|
common_hal_pulseio_pwmout_reset_ok(&self->backlight_pwm);
|
||||||
common_hal_pulseio_pwmout_deinit(&self->backlight_pwm);
|
common_hal_pulseio_pwmout_deinit(&self->backlight_pwm);
|
||||||
|
Loading…
Reference in New Issue
Block a user