@@ -111,7 +111,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
111111 self -> backlight_inout .base .type = & mp_type_NoneType ;
112112 if (backlight_pin != NULL && common_hal_mcu_pin_is_free (backlight_pin )) {
113113 // Avoid PWM types and functions when the module isn't enabled
114- #if (CIRCUITPY_PULSEIO )
114+ #if (CIRCUITPY_PWMIO )
115115 pwmout_result_t result = common_hal_pwmio_pwmout_construct (& self -> backlight_pwm , backlight_pin , 0 , 50000 , false);
116116 if (result != PWMOUT_OK ) {
117117 self -> backlight_inout .base .type = & digitalio_digitalinout_type ;
@@ -173,14 +173,14 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t *self,
173173 bool ok = false;
174174
175175 // Avoid PWM types and functions when the module isn't enabled
176- #if (CIRCUITPY_PULSEIO )
176+ #if (CIRCUITPY_PWMIO )
177177 bool ispwm = (self -> backlight_pwm .base .type == & pwmio_pwmout_type ) ? true : false;
178178 #else
179179 bool ispwm = false;
180180 #endif
181181
182182 if (ispwm ) {
183- #if (CIRCUITPY_PULSEIO )
183+ #if (CIRCUITPY_PWMIO )
184184 common_hal_pwmio_pwmout_set_duty_cycle (& self -> backlight_pwm , (uint16_t )(0xffff * brightness ));
185185 ok = true;
186186 #else
@@ -410,7 +410,7 @@ STATIC void _update_backlight(displayio_display_obj_t *self) {
410410 if (supervisor_ticks_ms64 () - self -> last_backlight_refresh < 100 ) {
411411 return ;
412412 }
413- // TODO(tannewt): Fade the backlight based on it's existing value and a target value. The target
413+ // TODO(tannewt): Fade the backlight based on its existing value and a target value. The target
414414 // should account for ambient light when possible.
415415 common_hal_displayio_display_set_brightness (self , 1.0 );
416416
@@ -428,7 +428,7 @@ void displayio_display_background(displayio_display_obj_t *self) {
428428void release_display (displayio_display_obj_t * self ) {
429429 common_hal_displayio_display_set_auto_refresh (self , false);
430430 release_display_core (& self -> core );
431- #if (CIRCUITPY_PULSEIO )
431+ #if (CIRCUITPY_PWMIO )
432432 if (self -> backlight_pwm .base .type == & pwmio_pwmout_type ) {
433433 common_hal_pwmio_pwmout_reset_ok (& self -> backlight_pwm );
434434 common_hal_pwmio_pwmout_deinit (& self -> backlight_pwm );
0 commit comments