FastLED 3.9.15
Loading...
Searching...
No Matches

◆ default_bus_priority()

int fl::default_bus_priority ( Bus b)
constexpr

Default priority assigned to a Bus when registered with the manager.

Higher = preferred. The function is constexpr so callers can use it in constant expressions if needed. Buses without a registered priority fall back to 0.

Definition at line 38 of file bus_priorities.h.

38 {
39 // FORCE-style overrides (FASTLED_ESP32_FORCE_*) are intentionally not
40 // applied here -- the legacy initChannelDrivers() retains its own
41 // priority-bumping logic for backward compatibility. This table is the
42 // baseline used by the new enableDrivers<>() opt-in API.
43 return
44 b == Bus::I2S_SPI ? 10 :
45 b == Bus::LCD_SPI ? 10 :
46 b == Bus::PARLIO ? 4 :
47 b == Bus::LCD_RGB ? 3 :
48 b == Bus::RMT ? 2 :
49 b == Bus::LCD_CLOCKLESS ? 2 :
50 b == Bus::I2S ? 1 :
51 b == Bus::FLEX_IO ? 1 :
52 b == Bus::OBJECT_FLED ? 1 :
53 b == Bus::SPI ? 0 :
54 b == Bus::BIT_BANG ? 0 :
55 b == Bus::STUB ? 0 :
56 b == Bus::UART ? -1 :
57 0;
58}
@ FLEX_IO
Teensy 4.x FlexIO2 driver.
Definition bus.h:71
@ I2S_SPI
Original ESP32 native I2S parallel SPI (true SPI chipsets).
Definition bus.h:66
@ SPI
Generic SPI clockless driver.
Definition bus.h:64
@ PARLIO
ESP32-P4/C6/H2/C5 parallel I/O peripheral.
Definition bus.h:63
@ OBJECT_FLED
Teensy 4.x ObjectFLED driver.
Definition bus.h:72
@ LCD_RGB
ESP32-P4 LCD RGB peripheral (parallel clockless).
Definition bus.h:67
@ LCD_CLOCKLESS
ESP32-S3 LCD_CAM clockless driver (replaces misnamed I2S).
Definition bus.h:69
@ I2S
ESP32-S3 LCD_CAM via legacy I80 bus (clockless).
Definition bus.h:65
@ BIT_BANG
Portable bit-bang fallback driver.
Definition bus.h:74
@ LCD_SPI
ESP32-S3 LCD_CAM SPI driver (true SPI chipsets).
Definition bus.h:68
@ RMT
ESP32 RMT peripheral (all ESP32 variants).
Definition bus.h:62
@ UART
ESP32 UART driver via wave8 framing.
Definition bus.h:70
@ STUB
Native/host/test stub driver.
Definition bus.h:75

References BIT_BANG, FL_NOEXCEPT, FLEX_IO, I2S, I2S_SPI, LCD_CLOCKLESS, LCD_RGB, LCD_SPI, OBJECT_FLED, PARLIO, RMT, SPI, STUB, and UART.