pynq.lib.rgbled Module

The pynq.lib.rgbled module is a driver for controlling onboard Red-Green-Blue (RGB) Light Emitting Diodes (LEDs).

class pynq.lib.rgbled.RGBLED(index)[source]

Bases: object

This class controls the onboard RGB LEDs.

index

int – The index of the RGB LED, from 4 (LD4) to 5 (LD5).

_mmio

MMIO – Shared memory map for the RGBLED GPIO controller.

_rgbleds_val

int – Global value of the RGBLED GPIO pins.

off()[source]

Turn off a single RGBLED.

Returns:
Return type:None
on(color)[source]

Turn on a single RGB LED with a color value (see color constants).

Parameters:color (int) – Color of RGB specified by a 3-bit RGB integer value.
Returns:
Return type:None
read()[source]

Retrieve the RGBLED state.

Returns:The color value stored in the RGBLED.
Return type:int
write(color)[source]

Set the RGBLED state according to the input value.

Parameters:color (int) – Color of RGB specified by a 3-bit RGB integer value.
Returns:
Return type:None