|
IS31FL3733 Async Driver 1.0.0
Asynchronous DMA-driven IS31FL3733 LED driver for Arduino SAMD
|
Asynchronous DMA-driven IS31FL3733 LED driver for SAMD SERCOM I2C. More...
#include <is31fl3733.hpp>


Classes | |
| struct | CmdTxnContext |
| Context passed to SERCOM ISR callback for command-chain transactions. More... | |
Public Member Functions | |
Constructor / Destructor | |
| 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. | |
Initialization | |
| 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. | |
Device Control | |
| void | DeviceOn () |
| Enable the device (hardware and software startup). | |
| void | DeviceOff () |
| Disable the device (hardware and software shutdown). | |
Runtime Configuration (Page 3/Common) | |
| 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. | |
PWM & ABM Control (Raw Hardware Interface) | |
| 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). | |
RGB Pixel Control (Logical Coordinates with Color Order) | |
| 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. | |
Bulk Operations | |
| 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. | |
ABM Page 3 Control | |
| 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. | |
Fault Detection (Read-Only) | |
| 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). | |
Private Member Functions | |
Private Methods (Transaction Management) | |
| void | _sendRowPWM () |
| Dequeue and transmit next pending PWM row. | |
| void | _sendRowMode () |
| Dequeue and transmit next pending ABM row. | |
| void | _ensurePage (uint8_t page) |
| Ensure we're on the target page (skips if already there, enqueues unlock + page-select if needed). | |
| void | _resumeDataTransfers () |
| Restore Page 1, clear _pwmLocked, resume PWM writes. | |
| void | _asyncWrite (uint16_t pagereg, const uint8_t *data, uint8_t len, void(*callback)(void *, int)=nullptr, void *user=nullptr) |
| Generic async write helper (inline for performance). | |
| void | _asyncRead (uint16_t pagereg, uint8_t *dest, uint8_t len, void(*callback)(void *, int)=nullptr, void *user=nullptr) |
| Generic async read helper (inline for performance). | |
| bool | _syncWrite (uint16_t pagereg, const uint8_t *data, uint8_t len) |
| Blocking write helper used by begin() setup flow. | |
| bool | _syncRead (uint16_t pagereg, uint8_t *dest, uint8_t len) |
| Blocking read helper used by begin() setup flow. | |
Static Private Member Functions | |
Static Callbacks | |
| static void | _txnCallback (void *user, int status) |
| PWM row transaction callback, enqueues the next pending row if any. | |
| static void | _txnModeCallback (void *user, int status) |
| ABM row transaction callback, enqueues the next pending mode row if any. | |
| static void | _irqCallback () |
| GPIO IRQ callback (triggered by IRQ pin edge). | |
| static void | _onServiceCallback (void *user, int status) |
| ISR completion callback (processes _lastISR after F1h read). | |
| static void | _cmdCallback (void *user, int status) |
| Command transaction callback (triggered by SERCOM ISR). | |
| static void | _osbCallback (void *user, int status) |
| Open/Short detection callback (updates LED On/Off mask). | |
| static void | _abm1CallbackWrapper () |
| Static wrappers for ABM completion callback dispatch (PendSV-safe entry points). | |
| static void | _abm2CallbackWrapper () |
| Dispatch ABM2 completion callback on a safe context. | |
| static void | _abm3CallbackWrapper () |
| Dispatch ABM3 completion callback on a safe context. | |
Private Attributes | |
| bool | _begun |
| True after successful begin(); used for destructor auto-end safety. | |
PWM Matrix and Transaction State (Page 1) | |
| uint8_t | _pwm_matrix [kHardwareRows][kHardwareCols+1] |
| [row][0] = Page 1 row addr, [1..16] = PWM data | |
| SercomTxn | _pwmTxn |
| Single in-flight PWM transaction descriptor. | |
| uint8_t | _pwmTxPtr [kHardwareCols+1] |
| Shadow buffer for current transaction. | |
| RingBufferN< kHardwareRows+1 > | _pwmPendingRows |
| Effective capacity: kHardwareRows. | |
| uint16_t | _pwmEnqueued |
| Bitfield tracking enqueued rows (0x0001..0x0FFF) | |
| bool | _pwmLocked |
| True when command chain has preempted PWM. | |
| bool | _pwmBatchActive |
| True while staged PWM updates are being batched. | |
Mode Matrix and Transaction State (Page 2) | |
| uint8_t | _abm_matrix [kHardwareRows][kHardwareCols+1] |
| [row][0] = Page 2 row addr, [1..16] = ABM data | |
| SercomTxn | _abmTxn |
| Single in-flight ABM transaction descriptor. | |
| uint8_t | _abmTxPtr [kHardwareCols+1] |
| Shadow buffer for current transaction. | |
| RingBufferN< kHardwareRows+1 > | _abmPendingRows |
| Effective capacity: kHardwareRows. | |
| uint16_t | _abmEnqueued |
| Bitfield tracking enqueued rows (0x0001..0x0FFF) | |
| bool | _abmLocked |
| True when command chain has preempted ABM. | |
| std::function< void()> | _abmCallbacks [3] |
| Completion callbacks for ABM1/2/3. | |
Command Transaction Chain (Non-PWM Operations) | |
| SercomTxn | _cmdTxn [4] |
| [0]=unlock, [1]=page, [2]=write, [3]=read | |
| CmdTxnContext | _cmdCtx [4] |
| Context for each command transaction (for callbacks) | |
| uint8_t | _crwlTx [2] |
| Pre-staged unlock transaction {PSWL, PSWL_ENABLE}. | |
| uint8_t | _pgSelTx [2] |
| Page select transaction buffer {PSR, page}. | |
| uint8_t | _cmdTx [25] |
| TX buffer (max: 1 addr + 24 data for LED On/Off) | |
| uint8_t | _cmdRx [24] |
| RX buffer (max: 24 bytes for LED Open/Short) | |
| volatile uint8_t | _cmdReturn |
| Bitfield of completed command transactions (bits 0..3) | |
| volatile uint8_t | _cmdError |
| Bitfield of command transactions with nonzero status. | |
| volatile bool | _syncComplete |
| Blocking command completion flag. | |
| volatile int | _syncStatus |
| Blocking command final status. | |
| volatile int8_t | _syncTargetCmd |
| Index of command awaited by blocking API. | |
Fault Detection and ISR Cache | |
| uint8_t | _ledOpen [24] |
| Cached LED open status (Page 0, 0x18) | |
| uint8_t | _ledShort [24] |
| Cached LED short status (Page 0, 0x30) | |
| uint8_t | _ledOn [24] |
| Computed LED On/Off mask (Page 0, 0x00) | |
| uint8_t | _lastISR |
| Cached ISR value from last fault detection. | |
Configuration | |
| uint8_t | _crValue |
| Shadow of CR register state for runtime updates. | |
| ColorOrder | _colorOrder |
| RGB pixel color order. | |
| bool | _maskShortFaults |
| Include LEDSHORT bits in computed LEDONOFF mask. | |
Hardware Handles | |
| SERCOM * | _hw |
| SERCOM I2C hardware interface. | |
| uint8_t | _addr |
| 7-bit I2C address | |
| uint8_t | _sdbPin |
| SDB (shutdown) pin (0xFF = not used) | |
| uint8_t | _irqPin |
| IRQ pin (0xFF = not used) | |
| uint8_t | _currentPage |
| Tracks current page (0-3, 0xFF=unknown) to minimize page selects. | |
| static IS31FL3733 * | _instance = nullptr |
| Static instance pointer for ISR access. | |
Asynchronous DMA-driven IS31FL3733 LED driver for SAMD SERCOM I2C.
Provides non-blocking I2C operations, ABM control, and RGB pixel helpers.
Definition at line 271 of file is31fl3733.hpp.
| IS31FL3733::IS31FL3733::IS31FL3733 | ( | TwoWire * | wire, |
| uint8_t | addr = 0x50, |
||
| uint8_t | sdbPin = 0xFF, |
||
| uint8_t | irqPin = 0xFF |
||
| ) |
Construct a new IS31FL3733 driver instance.
| 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. |
Definition at line 33 of file is31fl3733.cpp.
| IS31FL3733::IS31FL3733::~IS31FL3733 | ( | ) |
Destroy the driver; calls end() if begin() succeeded.
Definition at line 114 of file is31fl3733.cpp.
|
staticprivate |
Static wrappers for ABM completion callback dispatch (PendSV-safe entry points).
Dispatch ABM1 completion callback on a safe context.
Definition at line 777 of file is31fl3733.cpp.
|
staticprivate |
Dispatch ABM2 completion callback on a safe context.
Definition at line 782 of file is31fl3733.cpp.
|
staticprivate |
Dispatch ABM3 completion callback on a safe context.
Definition at line 787 of file is31fl3733.cpp.
|
inlineprivate |
Generic async read helper (inline for performance).
Definition at line 800 of file is31fl3733.hpp.
References IS31FL3733::IS31FL3733::CmdTxnContext::initialStatus, IS31FL3733::IS31FL3733::CmdTxnContext::isFinal, IS31FL3733::IS31FL3733::CmdTxnContext::user, and IS31FL3733::IS31FL3733::CmdTxnContext::userCallback.
|
inlineprivate |
Generic async write helper (inline for performance).
Definition at line 772 of file is31fl3733.hpp.
References IS31FL3733::IS31FL3733::CmdTxnContext::initialStatus, IS31FL3733::IS31FL3733::CmdTxnContext::isFinal, IS31FL3733::IS31FL3733::CmdTxnContext::user, and IS31FL3733::IS31FL3733::CmdTxnContext::userCallback.
|
staticprivate |
Command transaction callback (triggered by SERCOM ISR).
| user | Pointer to IS31FL3733 instance. |
| status | Transaction status (0 = success). |
Definition at line 743 of file is31fl3733.cpp.
|
private |
Ensure we're on the target page (skips if already there, enqueues unlock + page-select if needed).
| page | Page number (0..3). |
Definition at line 568 of file is31fl3733.cpp.
|
inlinestaticprivate |
GPIO IRQ callback (triggered by IRQ pin edge).
Definition at line 865 of file is31fl3733.hpp.
|
inlinestaticprivate |
ISR completion callback (processes _lastISR after F1h read).
| user | Pointer to IS31FL3733 instance. |
| status | Transaction status (0 = success). |
Definition at line 873 of file is31fl3733.hpp.
|
staticprivate |
Open/Short detection callback (updates LED On/Off mask).
Definition at line 727 of file is31fl3733.cpp.
|
private |
Restore Page 1, clear _pwmLocked, resume PWM writes.
Definition at line 587 of file is31fl3733.cpp.
|
inlineprivate |
Dequeue and transmit next pending ABM row.
Definition at line 735 of file is31fl3733.hpp.
|
inlineprivate |
Dequeue and transmit next pending PWM row.
Definition at line 699 of file is31fl3733.hpp.
|
private |
Blocking read helper used by begin() setup flow.
Definition at line 620 of file is31fl3733.cpp.
|
private |
Blocking write helper used by begin() setup flow.
Definition at line 594 of file is31fl3733.cpp.
|
inlinestaticprivate |
PWM row transaction callback, enqueues the next pending row if any.
| user | Pointer to IS31FL3733 instance. |
| status | Transaction status (0 = success). |
Definition at line 843 of file is31fl3733.hpp.
|
inlinestaticprivate |
ABM row transaction callback, enqueues the next pending mode row if any.
| user | Pointer to IS31FL3733 instance. |
| status | Transaction status (0 = success). |
Definition at line 854 of file is31fl3733.hpp.
| bool IS31FL3733::IS31FL3733::begin | ( | uint8_t | pfs = 0, |
| uint8_t | pur = 0b111, |
||
| uint8_t | pdr = 0b111 |
||
| ) |
Initialize the device (blocking for initial config).
| pfs | PWM Frequency Setting value (0..3) for initial configuration. See Table 13 for setting values. Default is 0 (slowest PWM frequency, 8.4 kHz). |
| pur | Pull-up resistor setting for de-ghosting (3 bits, 0..7). Default is 0b111 (32 kOhm pull-up). See Table 19 for resistor values. |
| pdr | Pull-down resistor setting for de-ghosting (3 bits, 0..7). Default is 0b111 (32 kOhm pull-down). See Table 20 for resistor values. |
Definition at line 123 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::BeginPwmBatch | ( | ) |
Begin a batched PWM update.
While active, PWM row writes are staged in the internal matrix and queued, but transmission to the device is deferred until EndPwmBatch() is called.
Definition at line 378 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::ConfigureABM | ( | uint8_t | abmNumber, |
| const ABMConfig & | config | ||
| ) |
Configure ABM timing/loop registers for ABM1/2/3 on Page 3.
| abmNumber | ABM selector (1..3). |
| config | ABM timing/loop configuration fields. |
Definition at line 658 of file is31fl3733.cpp.
References IS31FL3733::ABMConfig::T1, IS31FL3733::ABMConfig::T2, IS31FL3733::ABMConfig::T3, IS31FL3733::ABMConfig::T4, IS31FL3733::ABMConfig::Tbegin, IS31FL3733::ABMConfig::Tend, and IS31FL3733::ABMConfig::Times.
| void IS31FL3733::IS31FL3733::ConfigureABM1 | ( | const ABMConfig & | config | ) |
Configure ABM-1 control registers (Page 3 ABM1CR..ABM1CR+4).
Definition at line 691 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::ConfigureABM2 | ( | const ABMConfig & | config | ) |
Configure ABM-2 control registers (Page 3 ABM2CR..ABM2CR+4).
Definition at line 695 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::ConfigureABM3 | ( | const ABMConfig & | config | ) |
Configure ABM-3 control registers (Page 3 ABM3CR..ABM3CR+4).
Definition at line 699 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::DeviceOff | ( | ) |
Disable the device (hardware and software shutdown).
Definition at line 293 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::DeviceOn | ( | ) |
Enable the device (hardware and software startup).
Definition at line 283 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::EnableABM | ( | bool | enable = true | ) |
Enable or disable ABM engine in CR (Page 3).
| enable | True to set CR_BEN, false to clear it. |
Definition at line 703 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::end | ( | ) |
RESET device and disable (hardware shutdown). Reads RESET register to trigger software reset, then disables device. Useful for cleanup and testing.
Definition at line 262 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::EndPwmBatch | ( | bool | flush = true | ) |
End a batched PWM update and optionally flush queued rows.
| flush | If true, starts sending queued rows immediately (if bus is idle). |
Definition at line 382 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::Fill | ( | uint8_t | pwm = 0 | ) |
Fill the entire matrix with a PWM value.
| pwm | PWM value (0..255). |
Definition at line 444 of file is31fl3733.cpp.
|
inline |
Get the current color order.
Definition at line 439 of file is31fl3733.hpp.
|
inline |
Get the cached LED on/off mask (last value written to LEDONOFF).
Definition at line 509 of file is31fl3733.hpp.
|
inline |
Get the cached LED open status (from last fault detection).
Definition at line 497 of file is31fl3733.hpp.
|
inline |
Get the cached LED short status (from last fault detection).
Definition at line 503 of file is31fl3733.hpp.
| ABMMode IS31FL3733::IS31FL3733::GetPixelMode | ( | uint8_t | row, |
| uint8_t | col | ||
| ) | const |
Get mode for a single LED (hardware coordinates, Page 2).
| row | Hardware row (1..12 = SW1..SW12). |
| col | Hardware column (1..16 = CS1..CS16). |
Definition at line 534 of file is31fl3733.cpp.
|
inline |
Returns true when LEDSHORT contributes to LEDONOFF masking.
Definition at line 358 of file is31fl3733.hpp.
|
inline |
Returns true while PWM row writes are in flight or queued.
Definition at line 363 of file is31fl3733.hpp.
| void IS31FL3733::IS31FL3733::SetABMCallback | ( | uint8_t | abmNum, |
| std::function< void()> | callback | ||
| ) |
Register callback for ABM1/2/3 completion.
| abmNum | ABM selector (1..3). |
| callback | Invoked when selected ABM completes. |
Definition at line 651 of file is31fl3733.cpp.
|
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.
| void IS31FL3733::IS31FL3733::SetCSPDR | ( | uint8_t | pdr | ) |
Set CS pull-down resistor control (Page 3 CSPDR).
| pdr | Pull-down value (lower 3 bits are used). |
Definition at line 310 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetGCC | ( | uint8_t | gcc | ) |
Set global current control register (Page 3 GCC).
| gcc | Global current value (0x00..0xFF). |
Definition at line 301 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetIMR | ( | uint8_t | imrMask | ) |
Set interrupt mask register (Common IMR).
| imrMask | IMR bitmask (IMR_IO/IMR_IS/IMR_IAB/IMR_IAC). |
Definition at line 320 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetMatrixMode | ( | ABMMode | mode | ) |
Set mode for the entire matrix (Page 2).
| mode | LED mode value (PWM/ABM1/ABM2/ABM3). |
Definition at line 515 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetPFS | ( | uint8_t | pfs | ) |
Set PWM frequency selection bits in CR (PFS[6:5]). Preserves other tracked CR bits (e.g., ABM enable).
| pfs | PWM frequency selector (0..3). |
Definition at line 315 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::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).
| row | Logical pixel row (1..4). |
| col | Logical pixel column (1..16). |
| r | Red channel (0..255). |
| g | Green channel (0..255). |
| b | Blue channel (0..255). |
Definition at line 393 of file is31fl3733.cpp.
Referenced by IS31FL3733::IS31FL3733RgbMatrix::SetPixelColor32().
| void IS31FL3733::IS31FL3733::SetPixelColorMode | ( | uint8_t | row, |
| uint8_t | col, | ||
| ABMMode | mode | ||
| ) |
Set mode for a logical RGB pixel (with color order mapping).
| row | Logical pixel row (1..4). |
| col | Logical pixel column (1..16). |
| mode | ABM mode. |
Definition at line 546 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetPixelMode | ( | uint8_t | row, |
| uint8_t | col, | ||
| ABMMode | mode | ||
| ) |
Set mode for a single LED (hardware coordinates, Page 2).
| row | Hardware row (1..12 = SW1..SW12). |
| col | Hardware column (1..16 = CS1..CS16). |
| mode | LED mode value (PWM/ABM1/ABM2/ABM3). |
Definition at line 466 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetPixelPWM | ( | uint8_t | row, |
| uint8_t | col, | ||
| uint8_t | pwm | ||
| ) |
Set PWM duty cycle for a single LED (hardware coordinates).
| row | Hardware row (1..12 = SW1..SW12). |
| col | Hardware column (1..16 = CS1..CS16). |
| pwm | PWM value (0..255). |
Definition at line 329 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetRowMode | ( | uint8_t | row, |
| ABMMode | mode | ||
| ) |
Set mode for an entire row (hardware coordinates, Page 2).
| row | Hardware row (1..12 = SW1..SW12). |
| mode | LED mode value (PWM/ABM1/ABM2/ABM3). |
Definition at line 490 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::SetRowPWM | ( | uint8_t | row, |
| const uint8_t * | pwmValues | ||
| ) |
Set PWM values for an entire row (hardware coordinates).
| row | Hardware row (1..12 = SW1..SW12). |
| pwmValues | Array of 16 PWM values. |
Definition at line 353 of file is31fl3733.cpp.
|
inline |
Control whether LEDSHORT bits are applied when computing LEDONOFF mask.
Some boards can report persistent short false-positives on specific channels during OSD. When disabled, only LEDOPEN contributes to LEDONOFF masking.
| enable | True to mask shorts and opens, false to mask opens only. |
Definition at line 353 of file is31fl3733.hpp.
| void IS31FL3733::IS31FL3733::SetSWPUR | ( | uint8_t | pur | ) |
Set SW pull-up resistor control (Page 3 SWPUR).
| pur | Pull-up value (lower 3 bits are used). |
Definition at line 305 of file is31fl3733.cpp.
| void IS31FL3733::IS31FL3733::TriggerABM | ( | ) |
Latch ABM timing updates by writing TUR on Page 3.
Definition at line 712 of file is31fl3733.cpp.
|
private |
[row][0] = Page 2 row addr, [1..16] = ABM data
Definition at line 553 of file is31fl3733.hpp.
|
private |
Completion callbacks for ABM1/2/3.
Definition at line 563 of file is31fl3733.hpp.
|
private |
Bitfield tracking enqueued rows (0x0001..0x0FFF)
Definition at line 559 of file is31fl3733.hpp.
|
private |
True when command chain has preempted ABM.
Definition at line 561 of file is31fl3733.hpp.
|
private |
Effective capacity: kHardwareRows.
Definition at line 558 of file is31fl3733.hpp.
|
private |
Single in-flight ABM transaction descriptor.
Definition at line 555 of file is31fl3733.hpp.
|
private |
Shadow buffer for current transaction.
Definition at line 556 of file is31fl3733.hpp.
|
private |
7-bit I2C address
Definition at line 523 of file is31fl3733.hpp.
|
private |
True after successful begin(); used for destructor auto-end safety.
Definition at line 597 of file is31fl3733.hpp.
|
private |
Context for each command transaction (for callbacks)
Definition at line 583 of file is31fl3733.hpp.
|
private |
Bitfield of command transactions with nonzero status.
Definition at line 590 of file is31fl3733.hpp.
|
private |
Bitfield of completed command transactions (bits 0..3)
Definition at line 589 of file is31fl3733.hpp.
|
private |
RX buffer (max: 24 bytes for LED Open/Short)
Definition at line 587 of file is31fl3733.hpp.
|
private |
TX buffer (max: 1 addr + 24 data for LED On/Off)
Definition at line 586 of file is31fl3733.hpp.
|
private |
[0]=unlock, [1]=page, [2]=write, [3]=read
Definition at line 571 of file is31fl3733.hpp.
|
private |
RGB pixel color order.
Definition at line 616 of file is31fl3733.hpp.
|
private |
Shadow of CR register state for runtime updates.
Definition at line 615 of file is31fl3733.hpp.
|
private |
Pre-staged unlock transaction {PSWL, PSWL_ENABLE}.
Definition at line 584 of file is31fl3733.hpp.
|
private |
Tracks current page (0-3, 0xFF=unknown) to minimize page selects.
Definition at line 526 of file is31fl3733.hpp.
|
private |
SERCOM I2C hardware interface.
Definition at line 522 of file is31fl3733.hpp.
|
staticprivate |
Static instance pointer for ISR access.
Definition at line 528 of file is31fl3733.hpp.
|
private |
IRQ pin (0xFF = not used)
Definition at line 525 of file is31fl3733.hpp.
|
private |
Cached ISR value from last fault detection.
Definition at line 607 of file is31fl3733.hpp.
|
private |
Computed LED On/Off mask (Page 0, 0x00)
Definition at line 606 of file is31fl3733.hpp.
|
private |
Cached LED open status (Page 0, 0x18)
Definition at line 604 of file is31fl3733.hpp.
|
private |
Cached LED short status (Page 0, 0x30)
Definition at line 605 of file is31fl3733.hpp.
|
private |
Include LEDSHORT bits in computed LEDONOFF mask.
Definition at line 617 of file is31fl3733.hpp.
|
private |
Page select transaction buffer {PSR, page}.
Definition at line 585 of file is31fl3733.hpp.
|
private |
[row][0] = Page 1 row addr, [1..16] = PWM data
Definition at line 536 of file is31fl3733.hpp.
|
private |
True while staged PWM updates are being batched.
Definition at line 545 of file is31fl3733.hpp.
|
private |
Bitfield tracking enqueued rows (0x0001..0x0FFF)
Definition at line 542 of file is31fl3733.hpp.
|
private |
True when command chain has preempted PWM.
Definition at line 544 of file is31fl3733.hpp.
|
private |
Effective capacity: kHardwareRows.
Definition at line 541 of file is31fl3733.hpp.
|
private |
Single in-flight PWM transaction descriptor.
Definition at line 538 of file is31fl3733.hpp.
|
private |
Shadow buffer for current transaction.
Definition at line 539 of file is31fl3733.hpp.
|
private |
SDB (shutdown) pin (0xFF = not used)
Definition at line 524 of file is31fl3733.hpp.
|
private |
Blocking command completion flag.
Definition at line 592 of file is31fl3733.hpp.
|
private |
Blocking command final status.
Definition at line 593 of file is31fl3733.hpp.
|
private |
Index of command awaited by blocking API.
Definition at line 594 of file is31fl3733.hpp.