class DACBacklight – DAC Backlight¶
The DACBacklight class is used to control a screen backlight.
构造函数¶
- class display.DACBacklight(channel[, bits=8])¶
Creates a backlight object to initialize the display backlight. This class should be passed as the
backlightargument to any display object constructor which can use a backlight controller.channelspecifies the DAC channel to use. This can be the GPIO pin also. For STM32 based znzpi Cams this isP5.bitsspecifies the resolution of the DAC. The default value of 8-bits should be good enough.
方法¶
- DACBacklight.deinit()¶
Deinitializes the backlight controller.
- DACBacklight.backlight([value])¶
Sets the backlight strength from 0-100. Note that a linear voltage on the backlight output will not necessary result in a linear brightness change on the screen. Typically there’s a small region where the screen brightness will change drastically.