|
22 | 22 | from typing import Union, Optional, Type
|
23 | 23 | from types import TracebackType
|
24 | 24 | from microcontroller import Pin
|
| 25 | + from adafruit_pca9685 import PWMChannel |
25 | 26 | from circuitpython_typing.led import ColorBasedColorUnion
|
26 | 27 | except ImportError:
|
27 | 28 | pass
|
@@ -84,21 +85,21 @@ class RGBLED:
|
84 | 85 | with adafruit_rgbled.RGBLED(board.D5, board.D6, board.D7, invert_pwm=True) as rgb_led:
|
85 | 86 | rgb_led.color = (0, 255, 0)
|
86 | 87 |
|
87 |
| - :param Union[Pin, PWMOut, "PWMChannel"] red_pin: |
| 88 | + :param Union[Pin, PWMOut, PWMChannel] red_pin: |
88 | 89 | The connection to the red LED.
|
89 |
| - :param Union[Pin, PWMOut, "PWMChannel"] green_pin: |
| 90 | + :param Union[Pin, PWMOut, PWMChannel] green_pin: |
90 | 91 | The connection to the green LED.
|
91 |
| - :param Union[Pin, PWMOut, "PWMChannel"] blue_pin: |
| 92 | + :param Union[Pin, PWMOut, PWMChannel] blue_pin: |
92 | 93 | The connection to the blue LED.
|
93 | 94 | :param bool invert_pwm: False if the RGB LED is common cathode,
|
94 | 95 | True if the RGB LED is common anode. Defaults to False.
|
95 | 96 | """
|
96 | 97 |
|
97 | 98 | def __init__(
|
98 | 99 | self,
|
99 |
| - red_pin: Union[Pin, PWMOut, "PWMChannel"], |
100 |
| - green_pin: Union[Pin, PWMOut, "PWMChannel"], |
101 |
| - blue_pin: Union[Pin, PWMOut, "PWMChannel"], |
| 100 | + red_pin: Union[Pin, PWMOut, PWMChannel], |
| 101 | + green_pin: Union[Pin, PWMOut, PWMChannel], |
| 102 | + blue_pin: Union[Pin, PWMOut, PWMChannel], |
102 | 103 | invert_pwm: bool = False,
|
103 | 104 | ) -> None:
|
104 | 105 | self._rgb_led_pins = [red_pin, green_pin, blue_pin]
|
|
0 commit comments