|
IS31FL3733 Async Driver 1.0.0
Asynchronous DMA-driven IS31FL3733 LED driver for Arduino SAMD
|
CI Workflows:
This asynchronous DMA-driven IS31FL3733 LED driver for Arduino SAMD platforms features:
Lineage: Based on Neil Enns' C++ library (originally forked from kkostyan's C library). This is a nearly complete rewrite for asynchronous DMA-driven operation.
This is an EXPERIMENTAL asynchronous driver with specific platform requirements:
This driver requires the async DMA branch of SimIOFramework:
Important: The standard Arduino Wire library does NOT support the async/DMA features required by this driver. You must use the modified SimIOFramework branch above.
Traditional blocking I2C operations freeze the CPU during LED matrix updates (~20ms per frame). This async implementation:
This is experimental software:
If you need a stable, synchronous driver for broader platform support, consider using the original upstream library or an earlier version of this fork.
This library is registered with PlatformIO. Include it in your project via the PlatformIO library manager.
Required dependency: Add the async DMA branch of SimIOFramework to your platformio.ini:
Include is31fl3733.hpp and is31fl3733.cpp in your project, along with the SimIOFramework async DMA branch.
Note: This driver is NOT compatible with the standard Arduino Wire library. It requires the modified TwoWire implementation from SimIOFramework that supports async/DMA operations.
See ASYNC_DMA_ARCHITECTURE.md for detailed design documentation.
Key features:
Two complete examples are provided in /examples:
abm_arduino.ino**: Auto Breath Mode with interrupt callbacks and non-blocking state machinergb_matrix_arduino.ino**: RGB matrix control with HSV rainbow animations, 32-bit color, and gamma correctionBoth examples demonstrate non-blocking loop design compatible with the async driver architecture.
Initialization:
begin() - Initialize device, returns true on successend() - Shutdown device and detach interruptsDeviceOn() / DeviceOff() - Software enable/disablePWM Control:
SetPixelPWM(row, col, pwm) - Set single LED (1-12 rows, 1-16 cols)SetRowPWM(row, pwmValues[]) - Set entire rowFill(pwm) - Fill entire matrixRGB Color:
SetPixelColor(row, col, r, g, b) - Logical RGB pixel (1-4 rows, 1-16 cols)SetColorOrder(ColorOrder) - RGB/GRB/BRG/RBG/GBR/BGR mappingAuto Breath Mode:
ConfigureABM1/2/3(ABMConfig) - Configure ABM parametersSetMatrixMode(ABMMode) - Set PWM/ABM1/ABM2/ABM3 modeEnableABM(bool) - Enable/disable ABMTriggerABM() - Start ABM sequenceSetABMCallback(abmNum, callback) - Register completion callbackConfiguration:
SetGCC(value) - Global current control (0-255)SetIMR(mask) - Interrupt mask registerInherits all IS31FL3733 methods plus:
Initialization:
begin(gcc, clear) - Initialize with GCC value, optionally clear to black32-bit Color:
SetPixelColor32(row, col, rgb, gamma) - Set pixel with packed RGBFillColor32(rgb, gamma) - Fill with packed RGBHSV Color:
SetPixelHSV(row, col, hue, sat, val, gamma) - Set pixel with HSVFillHSV(hue, sat, val, gamma) - Fill with HSVConstants:
kRows - Matrix row count (4)kCols - Matrix column count (16)Gamma8(value) - 8-bit gamma correctionGamma32(rgb) - 32-bit RGB gamma correctionColorHSV(hue, sat, val) - HSV to RGB conversionPackRGB(r, g, b) - Pack RGB into 32-bit valueThis project uses Unity Fixture with 53 passing native tests and 18 passing embedded tests.
Native tests (mocked I2C):
Embedded tests (SimIO_Device_M0 hardware):
Coverage: 88% logic coverage - see LOGIC_COVERAGE_ANALYSIS.md
When using Unity Fixture, PlatformIO may show 0 test cases in summary. Treat Unity output as source of truth (e.g., 53 Tests 0 Failures 0 Ignored).
Per-driver instance: ~764 bytes
Zero heap allocation - all buffers pre-allocated at construction, safe for interrupt context.
MIT License - See [LICENSE](LICENSE) file for details.
Color utilities derived from Adafruit NeoPixel library (LGPL-3.0).