-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6111f94
commit fd74f30
Showing
172 changed files
with
3,370 additions
and
2,006 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. currentmodule:: display | ||
.. _display.DACBacklight: | ||
|
||
class DACBacklight -- DAC Backlight | ||
=================================== | ||
|
||
The `DACBacklight` class is used to control a screen backlight. | ||
|
||
Constructors | ||
------------ | ||
|
||
.. class:: display.DACBacklight(channel, [bits=8]) | ||
|
||
Creates a backlight object to initialize the display backlight. This class should be passed as | ||
the ``backlight`` argument to any display object constructor which can use a backlight controller. | ||
|
||
``channel`` specifies the DAC channel to use. This can be the GPIO pin also. For STM32 based | ||
OpenMV Cams this is ``P5``. | ||
|
||
``bits`` specifies the resolution of the DAC. The default value of 8-bits should be good enough. | ||
|
||
Methods | ||
------- | ||
|
||
.. method:: DACBacklight.deinit() | ||
|
||
Deinitializes the backlight controller. | ||
|
||
.. method:: 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. currentmodule:: display | ||
.. _display.PWMBacklight: | ||
|
||
class PWMBacklight -- PWM Backlight | ||
=================================== | ||
|
||
The `PWMBacklight` class is used to control a screen backlight. | ||
|
||
Constructors | ||
------------ | ||
|
||
.. class:: display.PWMBacklight(pin, [timer=3, [channel=3, [frequency=200]]]) | ||
|
||
Creates a backlight object to initialize the display backlight. This class should be passed as | ||
the ``backlight`` argument to any display object constructor which can use a backlight controller. | ||
|
||
``pin`` specifies the Pin to use. | ||
|
||
``timer`` specifies the Timer number to use. | ||
|
||
``channel`` specifies the Timer channel to use. | ||
|
||
``frequency`` specifies the PWM frequency. | ||
|
||
Methods | ||
------- | ||
|
||
.. method:: PWMBacklight.deinit() | ||
|
||
Deinitializes the backlight controller. | ||
|
||
.. method:: PWMBacklight.backlight([value]) | ||
|
||
Sets the backlight strength from 0-100. Note that a linear pwm duty cycle 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.