M5Unit-RGB 0.1.0 git rev:b7fdb9a
Loading...
Searching...
No Matches
unit_LED.hpp File Reference

LED base unit for M5UnitUnified. More...

#include "unit_LED_data.hpp"
#include <M5UnitComponent.hpp>
#include <vector>

Go to the source code of this file.

Classes

class  m5::unit::UnitLED
 LED base unit. More...
 
struct  m5::unit::UnitLED::config_t
 Settings for begin. More...
 

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 

Enumerations

enum class  m5::unit::rgb::Order : int8_t {
  unknown = -1 , rgb24 , rbg24 , grb24 ,
  gbr24 , brg24 , bgr24 , hasWhite ,
  wrgb32 = hasWhite , wrbg32 , wgrb32 , wgbr32 ,
  wbrg32 , wbgr32 , rwgb32 , rwbg32 ,
  rgwb32 , rgbw32 , rbwg32 , rbgw32 ,
  gwrb32 , gwbr32 , grwb32 , grbw32 ,
  gbwr32 , gbrw32 , bwrg32 , bwgr32 ,
  brwg32 , brgw32 , bgwr32 , bgrw32
}
 Color order. More...
 

Functions

int8_t m5::unit::rgb::offsetR (const Order f)
 Offset of Red.
 
int8_t m5::unit::rgb::offsetG (const Order f)
 Offset of Green.
 
int8_t m5::unit::rgb::offsetB (const Order f)
 Offset of Blue.
 
int8_t m5::unit::rgb::offsetW (const Order f)
 Offset of White.
 

Detailed Description

LED base unit for M5UnitUnified.

Enumeration Type Documentation

◆ Order

enum class m5::unit::rgb::Order : int8_t
strong

Color order.

Each name lists the bytes in the order they are sent, e.g. grb24 sends G, R, B

Enumerator
unknown 

Not set (begin() fails)

hasWhite 

First 32-bit order; orders >= hasWhite carry a white channel.

wrgb32 

Same value as hasWhite.

Function Documentation

◆ offsetB()

int8_t m5::unit::rgb::offsetB ( const Order f)

Offset of Blue.

Parameters
fColor order
Returns
Byte offset of Blue in the packed pixel (-1 if not present)

◆ offsetG()

int8_t m5::unit::rgb::offsetG ( const Order f)

Offset of Green.

Parameters
fColor order
Returns
Byte offset of Green in the packed pixel (-1 if not present)

◆ offsetR()

int8_t m5::unit::rgb::offsetR ( const Order f)

Offset of Red.

Parameters
fColor order
Returns
Byte offset of Red in the packed pixel (-1 if not present)

◆ offsetW()

int8_t m5::unit::rgb::offsetW ( const Order f)

Offset of White.

Parameters
fColor order
Returns
Byte offset of White in the packed pixel (-1 if not present)