2020# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121# THE SOFTWARE.
2222"""
23- `Adafruit_TLC59711 `
23+ `adafruit_tlc59711 `
2424====================================================
2525
2626CircuitPython module for the TLC59711 16-bit 12 channel LED PWM driver. See
@@ -69,17 +69,12 @@ class TLC59711:
6969 independent channel by name (r0, g0, b0, r1, b1, etc.) as properties for
7070 fine-grained control.
7171
72- Specify the following parameters to initialize:
73- - spi: An instance of the SPI bus connected to the chip. The clock and
74- MOSI/outout must be set, the MISO/input is unused.
75-
76- You can also specify the following optional parameters:
77- - auto_show: This is a boolean that defaults to True and indicates any
78- change to a channel value will instantly be written to the
79- chip. You might wish to set this to false if you desire to
80- perform your own atomic operations of channel values. In that
81- case call the show function after making updates to channel
82- state.
72+ :param ~busio.SPI spi: An instance of the SPI bus connected to the chip. The clock and
73+ MOSI/outout must be set, the MISO/input is unused.
74+ :param bool auto_show: This is a boolean that defaults to True and indicates any
75+ change to a channel value will instantly be written to the chip. You might wish to
76+ set this to false if you desire to perform your own atomic operations of channel
77+ values. In that case call the show function after making updates to channel state.
8378 """
8479
8580 class _GS_Value :
@@ -202,16 +197,16 @@ def _write(self):
202197 self ._spi .unlock ()
203198
204199 def show (self ):
205- """Write out the current LED PWM state to the chip. This is only
206- necessary if auto_show was set to false in the initializer.
200+ """Write out the current LED PWM state to the chip. This is only necessary if
201+ auto_show was set to false in the initializer.
207202 """
208203 self ._write ()
209204
210205 # Define properties for global brightness control channels.
211206 @property
212207 def red_brightness (self ):
213- """Get and set the red brightness for all channels (i.e. R0, R1, R2,
214- and R3). This is a 7-bit value from 0-127.
208+ """The red brightness for all channels (i.e. R0, R1, R2, and R3). This is a 7-bit
209+ value from 0-127.
215210 """
216211 return self ._bcr
217212
@@ -224,8 +219,8 @@ def red_brightness(self, val):
224219
225220 @property
226221 def green_brightness (self ):
227- """Get and set the green brightness for all channels (i.e. G0, G1,
228- G2, and G3). This is a 7-bit value from 0-127.
222+ """The green brightness for all channels (i.e. G0, G1, G2, and G3). This is a
223+ 7-bit value from 0-127.
229224 """
230225 return self ._bcg
231226
@@ -238,8 +233,8 @@ def green_brightness(self, val):
238233
239234 @property
240235 def blue_brightness (self ):
241- """Get and set the blue brightness for all channels (i.e. B0, B1,
242- B2, and B3). This is a 7-bit value from 0-127.
236+ """The blue brightness for all channels (i.e. B0, B1, B2, and B3). This is a 7-bit
237+ value from 0-127.
243238 """
244239 return self ._bcb
245240
@@ -258,7 +253,7 @@ def __len__(self):
258253
259254 def __getitem__ (self , key ):
260255 """Retrieve the R, G, B values for the provided channel as a
261- 3-tuple. Each value is a 16-bit number from 0-65535.
256+ 3-tuple. Each value is a 16-bit number from 0-65535.
262257 """
263258 if key == 0 :
264259 return (self .r0 , self .g0 , self .b0 )
@@ -273,7 +268,7 @@ def __getitem__(self, key):
273268
274269 def __setitem__ (self , key , val ):
275270 """Set the R, G, B values for the provided channel. Specify a
276- 3-tuple of R, G, B values that are each 16-bit numbers (0-65535).
271+ 3-tuple of R, G, B values that are each 16-bit numbers (0-65535).
277272 """
278273 assert 0 <= key <= 3 # Do this check here instead of later to
279274 # prevent accidentally keeping auto_show
0 commit comments