M5Unit-RGB 0.0.2 git rev:51dfbe6
Loading...
Searching...
No Matches
unit_LED.hpp File Reference

LED base unit for M5UnitUnified. More...

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

Go to the source code of this file.

Classes

union  m5::unit::rgb::Color
 WRGB 32bits. More...
 
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.
 
namespace  rgb
 For M5Unit-RGB.
 

Typedefs

using m5::unit::rgb::wrgb32_color_t = uint32_t
 WRGB 32bits.
 

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.
 

Functions

constexpr bool m5::unit::rgb::operator== (const Color &lhs, const Color &rhs)
 Compare two Colors.
 
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.

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)

◆ operator==()

bool m5::unit::rgb::operator== ( const Color & lhs,
const Color & rhs )
constexpr

Compare two Colors.

Parameters
lhsLeft-hand side
rhsRight-hand side
Returns
True if equal