|
IS31FL3733 Async Driver 1.0.0
Asynchronous DMA-driven IS31FL3733 LED driver for Arduino SAMD
|
Convenience RGB matrix API built on top of the core async driver. More...
#include <is31fl3733_rgb_matrix.hpp>


Public Member Functions | |
| ColorOrder | GetColorOrder () const |
| Get the current color order. | |
| void | SetColorOrder (ColorOrder order) |
| Set the color order for RGB pixel mapping. | |
Constructor | |
| IS31FL3733RgbMatrix (TwoWire *wire, uint8_t addr=0x50, uint8_t sdbPin=0xFF, uint8_t irqPin=0xFF, ColorOrder order=ColorOrder::GRB) | |
| Construct RGB matrix helper with same arguments as base driver. | |
Color Helpers | |
| void | SetPixelColor32 (uint8_t row, uint8_t col, uint32_t packedRgb, bool gamma=false) |
| Set a logical RGB pixel from packed 0xRRGGBB value. | |
| void | SetPixelHSV (uint8_t row, uint8_t col, uint16_t hue, uint8_t sat=255, uint8_t val=255, bool gamma=true) |
| Set a logical RGB pixel from HSV. | |
| void | FillColor32 (uint32_t packedRgb, bool gamma=false) |
| Fill logical matrix with packed RGB color. | |
| void | FillHSV (uint16_t hue, uint8_t sat=255, uint8_t val=255, bool gamma=true) |
| Fill logical matrix with HSV color. | |
Public Member Functions inherited from IS31FL3733::IS31FL3733 | |
| IS31FL3733 (TwoWire *wire, uint8_t addr=0x50, uint8_t sdbPin=0xFF, uint8_t irqPin=0xFF) | |
| Construct a new IS31FL3733 driver instance. | |
| ~IS31FL3733 () | |
| Destroy the driver; calls end() if begin() succeeded. | |
| bool | begin (uint8_t pfs=0, uint8_t pur=0b111, uint8_t pdr=0b111) |
| Initialize the device (blocking for initial config). | |
| void | end () |
| RESET device and disable (hardware shutdown). Reads RESET register to trigger software reset, then disables device. Useful for cleanup and testing. | |
| void | DeviceOn () |
| Enable the device (hardware and software startup). | |
| void | DeviceOff () |
| Disable the device (hardware and software shutdown). | |
| void | SetGCC (uint8_t gcc) |
| Set global current control register (Page 3 GCC). | |
| void | SetSWPUR (uint8_t pur) |
| Set SW pull-up resistor control (Page 3 SWPUR). | |
| void | SetCSPDR (uint8_t pdr) |
| Set CS pull-down resistor control (Page 3 CSPDR). | |
| void | SetPFS (uint8_t pfs) |
| Set PWM frequency selection bits in CR (PFS[6:5]). Preserves other tracked CR bits (e.g., ABM enable). | |
| void | SetIMR (uint8_t imrMask) |
| Set interrupt mask register (Common IMR). | |
| void | SetShortFaultMaskEnabled (bool enable) |
| Control whether LEDSHORT bits are applied when computing LEDONOFF mask. | |
| bool | GetShortFaultMaskEnabled () const |
| Returns true when LEDSHORT contributes to LEDONOFF masking. | |
| bool | IsPwmUpdatePending () const |
| Returns true while PWM row writes are in flight or queued. | |
| void | SetPixelPWM (uint8_t row, uint8_t col, uint8_t pwm) |
| Set PWM duty cycle for a single LED (hardware coordinates). | |
| void | SetRowPWM (uint8_t row, const uint8_t *pwmValues) |
| Set PWM values for an entire row (hardware coordinates). | |
| void | BeginPwmBatch () |
| Begin a batched PWM update. | |
| void | EndPwmBatch (bool flush=true) |
| End a batched PWM update and optionally flush queued rows. | |
| void | SetPixelMode (uint8_t row, uint8_t col, ABMMode mode) |
| Set mode for a single LED (hardware coordinates, Page 2). | |
| void | SetRowMode (uint8_t row, ABMMode mode) |
| Set mode for an entire row (hardware coordinates, Page 2). | |
| ABMMode | GetPixelMode (uint8_t row, uint8_t col) const |
| Get mode for a single LED (hardware coordinates, Page 2). | |
| void | SetPixelColor (uint8_t row, uint8_t col, uint8_t r, uint8_t g, uint8_t b) |
| Set RGB color for a logical pixel (with color order mapping). | |
| void | SetPixelColorMode (uint8_t row, uint8_t col, ABMMode mode) |
| Set mode for a logical RGB pixel (with color order mapping). | |
| void | SetColorOrder (ColorOrder order) |
| Set the color order for RGB pixel mapping. | |
| ColorOrder | GetColorOrder () const |
| Get the current color order. | |
| void | Fill (uint8_t pwm=0) |
| Fill the entire matrix with a PWM value. | |
| void | SetMatrixMode (ABMMode mode) |
| Set mode for the entire matrix (Page 2). | |
| void | SetABMCallback (uint8_t abmNum, std::function< void()> callback) |
| Register callback for ABM1/2/3 completion. | |
| void | ConfigureABM (uint8_t abmNumber, const ABMConfig &config) |
| Configure ABM timing/loop registers for ABM1/2/3 on Page 3. | |
| void | ConfigureABM1 (const ABMConfig &config) |
| Configure ABM-1 control registers (Page 3 ABM1CR..ABM1CR+4). | |
| void | ConfigureABM2 (const ABMConfig &config) |
| Configure ABM-2 control registers (Page 3 ABM2CR..ABM2CR+4). | |
| void | ConfigureABM3 (const ABMConfig &config) |
| Configure ABM-3 control registers (Page 3 ABM3CR..ABM3CR+4). | |
| void | EnableABM (bool enable=true) |
| Enable or disable ABM engine in CR (Page 3). | |
| void | TriggerABM () |
| Latch ABM timing updates by writing TUR on Page 3. | |
| const uint8_t * | GetLEDOpen () const |
| Get the cached LED open status (from last fault detection). | |
| const uint8_t * | GetLEDShort () const |
| Get the cached LED short status (from last fault detection). | |
| const uint8_t * | GetLEDOn () const |
| Get the cached LED on/off mask (last value written to LEDONOFF). | |
Static Public Member Functions | |
Validation Helpers | |
| static bool | IsValidRow (uint8_t row) |
| Validate a logical RGB row index. | |
| static bool | IsValidCol (uint8_t col) |
| Validate a logical RGB column index. | |
Static Public Attributes | |
Constants | |
| static constexpr uint8_t | kRows = 4 |
| Logical RGB matrix row count. | |
| static constexpr uint8_t | kCols = 16 |
| Logical RGB matrix column count. | |
Convenience RGB matrix API built on top of the core async driver.
Inherits all base driver features (begin/end, ABM, raw pixel/mode control) and adds higher-level color helpers for 32-bit packed RGB and HSV.
Definition at line 21 of file is31fl3733_rgb_matrix.hpp.
|
inline |
Construct RGB matrix helper with same arguments as base driver.
| wire | Pointer to TwoWire I2C interface. |
| addr | 7-bit I2C address (typically 0x50). |
| sdbPin | Optional SDB (shutdown) pin (active high). Use 0xFF to disable. |
| irqPin | Optional IRQ pin for open/short detection. Use 0xFF to disable. |
| order | Initial logical RGB channel order. |
Definition at line 39 of file is31fl3733_rgb_matrix.hpp.
References SetColorOrder().
|
inline |
Fill logical matrix with packed RGB color.
| packedRgb | Packed RGB color (0xRRGGBB). |
| gamma | If true, applies Gamma32() before writing. |
Definition at line 103 of file is31fl3733_rgb_matrix.hpp.
References kCols, kRows, and SetPixelColor32().
Referenced by FillHSV().
|
inline |
Fill logical matrix with HSV color.
| hue | Hue (0..65535). |
| sat | Saturation (0..255). |
| val | Value (0..255). |
| gamma | If true, applies Gamma32() after HSV conversion. |
Definition at line 116 of file is31fl3733_rgb_matrix.hpp.
References FillColor32().
|
inline |
Get the current color order.
Definition at line 439 of file is31fl3733.hpp.
|
inlinestatic |
Validate a logical RGB column index.
| col | Logical column (1..kCols). |
Definition at line 61 of file is31fl3733_rgb_matrix.hpp.
References kCols.
Referenced by SetPixelColor32().
|
inlinestatic |
Validate a logical RGB row index.
| row | Logical row (1..kRows). |
Definition at line 54 of file is31fl3733_rgb_matrix.hpp.
References kRows.
Referenced by SetPixelColor32().
|
inline |
Set the color order for RGB pixel mapping.
| order | Color order (RGB, GRB, BRG, RBG, GBR, BGR). |
Definition at line 433 of file is31fl3733.hpp.
Referenced by IS31FL3733RgbMatrix().
|
inline |
Set a logical RGB pixel from packed 0xRRGGBB value.
| row | Logical row (1..4). |
| col | Logical column (1..16). |
| packedRgb | Packed RGB color (0xRRGGBB). |
| gamma | If true, applies Gamma32() before writing. |
Definition at line 73 of file is31fl3733_rgb_matrix.hpp.
References IsValidCol(), IsValidRow(), and IS31FL3733::IS31FL3733::SetPixelColor().
Referenced by FillColor32(), and SetPixelHSV().
|
inline |
Set a logical RGB pixel from HSV.
| row | Logical row (1..4). |
| col | Logical column (1..16). |
| hue | Hue (0..65535). |
| sat | Saturation (0..255). |
| val | Value (0..255). |
| gamma | If true, applies Gamma32() after HSV conversion. |
Definition at line 94 of file is31fl3733_rgb_matrix.hpp.
References SetPixelColor32().
|
staticconstexpr |
Logical RGB matrix column count.
Definition at line 28 of file is31fl3733_rgb_matrix.hpp.
Referenced by FillColor32(), and IsValidCol().
|
staticconstexpr |
Logical RGB matrix row count.
Definition at line 26 of file is31fl3733_rgb_matrix.hpp.
Referenced by FillColor32(), and IsValidRow().