Adafruit IS31FL3741 Library
Public Member Functions | Protected Attributes | List of all members
Adafruit_EyeLights_Ring_Base Class Reference

Base class for EyeLights LED ring. Holds a few items that are common to direct or buffered instances, left or right ring. More...

#include <Adafruit_IS31FL3741.h>

Inheritance diagram for Adafruit_EyeLights_Ring_Base:
Adafruit_EyeLights_Ring Adafruit_EyeLights_Ring_buffered

Public Member Functions

 Adafruit_EyeLights_Ring_Base (void *parent, bool isRight)
 Constructor for EyeLights LED ring. This is a base class used by both the direct and buffered variants. Not invoked by user code. More...
 
uint8_t numPixels (void) const
 Return number of LEDs in ring (a la NeoPixel) More...
 
void setBrightness (uint8_t b)
 Set brightness of LED ring. This is a mathematical brightness scale applied to setPixel() colors when setting ring pixels, distinct from any value passed to setLEDscaling() functions, because matrix and rings share pixels. More...
 

Protected Attributes

uint16_t _brightness = 256
 Internally 1-256 for math.
 
void * parent
 Pointer back to EyeLights object.
 
const uint16_t * ring_map
 Pointer to LED index lookup table.
 

Detailed Description

Base class for EyeLights LED ring. Holds a few items that are common to direct or buffered instances, left or right ring.

Constructor & Destructor Documentation

◆ Adafruit_EyeLights_Ring_Base()

Adafruit_EyeLights_Ring_Base::Adafruit_EyeLights_Ring_Base ( void *  parent,
bool  isRight 
)

Constructor for EyeLights LED ring. This is a base class used by both the direct and buffered variants. Not invoked by user code.

Parameters
parentvoid* pointer to parent EyeLights object this is attached to (may be direct or buffered, hence void* rather than specific type).
isRighttrue if right ring, false if left.
Note
Constructor is here in the .cpp instead of the .h because it references the static tables above.

Member Function Documentation

◆ numPixels()

uint8_t Adafruit_EyeLights_Ring_Base::numPixels ( void  ) const
inline

Return number of LEDs in ring (a la NeoPixel)

Returns
int Always 24.

◆ setBrightness()

void Adafruit_EyeLights_Ring_Base::setBrightness ( uint8_t  b)
inline

Set brightness of LED ring. This is a mathematical brightness scale applied to setPixel() colors when setting ring pixels, distinct from any value passed to setLEDscaling() functions, because matrix and rings share pixels.

Parameters
bBrightness from 0 (off) to 255 (max).

The documentation for this class was generated from the following files: