forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from kwagyeman/kwabena/docs_update_11_19_2023
kwabena/docs_update_11_29_2023
- Loading branch information
Showing
16 changed files
with
863 additions
and
421 deletions.
There are no files selected for viewing
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
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.