OSCR
Open Source Cartridge Reader
Loading...
Searching...
No Matches
OSCR::UI::NeoPixel Namespace Reference

NeoPixel-specific methods and variables. More...

Enumerations

enum class  NeoPixelState : uint8_t {
  Off , Dim , Normal , Notification ,
  Error , Custom , Mixed
}

Functions

void config ()
void setup ()
void dim ()
void on ()
void setBackgroundColor (rgb_t rgb)
void resetBackgroundColor ()
void setButtonColor (rgb_t rgb)
void setColors (rgb_t background, rgb_t button)
void resetButtonColor ()
void useNotificationColor ()
void useErrorColor (bool fatal=false)
void useNormalColor ()
void resetColors ()
void updateColors ()
bool isOff ()
bool isDim ()
bool isNormal ()
bool isNotification ()
bool isError ()
bool isCustom ()
NeoPixelState getState ()
Adafruit_NeoPixel pixels (3, 13, NEO_GRB+NEO_KHZ800)
void setColors (rgb_t rgb)

Variables

Adafruit_NeoPixel pixels
class { 
   rgb_t   OSCR::UI::NeoPixel::off 
   rgb_t   OSCR::UI::NeoPixel::normal 
   rgb_t   OSCR::UI::NeoPixel::notification 
   rgb_t   OSCR::UI::NeoPixel::error 
   rgb_t   OSCR::UI::NeoPixel::background 
   rgb_t   OSCR::UI::NeoPixel::button 
   NeoPixelState   buttonState = NeoPixelState::Normal 
   NeoPixelState   backgroundState = NeoPixelState::Normal 
   NeoPixelState   buttonOffState = NeoPixelState::Normal 
   NeoPixelState   backgroundOffState = NeoPixelState::Normal 
pixelColors

Detailed Description

NeoPixel-specific methods and variables.

Methods and variables for the Adafruit NeoPixel which is usually used by the MINI12864

Function Documentation

◆ dim()

void OSCR::UI::NeoPixel::dim ( )
extern

Dim the NeoPixels.

◆ getState()

NeoPixelState OSCR::UI::NeoPixel::getState ( )
extern

Get current color state.

◆ isCustom()

bool OSCR::UI::NeoPixel::isCustom ( )
extern

Check if the colors are custom colors.

◆ isDim()

bool OSCR::UI::NeoPixel::isDim ( )
extern

Check if the colors are dimmed.

◆ isError()

bool OSCR::UI::NeoPixel::isError ( )
extern

Check if the colors are error colors.

◆ isNormal()

bool OSCR::UI::NeoPixel::isNormal ( )
extern

Check if the colors are normal colors.

◆ isNotification()

bool OSCR::UI::NeoPixel::isNotification ( )
extern

Check if the colors are notification colors.

◆ isOff()

bool OSCR::UI::NeoPixel::isOff ( )
extern

Check if the colors are off.

◆ on()

void OSCR::UI::NeoPixel::on ( )
extern

Turn on the NeoPixels.

◆ pixels()

Adafruit_NeoPixel OSCR::UI::NeoPixel::pixels ( 3 ,
13 ,
NEO_GRB+ NEO_KHZ800 )

The NeoPixel instance for controlling the color of the NeoPixel.

◆ resetBackgroundColor()

void OSCR::UI::NeoPixel::resetBackgroundColor ( )
extern

Reset the LCD background color back to default.

Note
Requires NeoPixel

◆ resetButtonColor()

void OSCR::UI::NeoPixel::resetButtonColor ( )
extern

Reset the LCD button color back to default.

Note
Requires MINI12864

◆ resetColors()

void OSCR::UI::NeoPixel::resetColors ( )
extern

Reset colors back to default.

Note
Requires MINI12864

◆ setBackgroundColor()

void OSCR::UI::NeoPixel::setBackgroundColor ( rgb_t rgb)
extern

Set the current NeoPixel background color.

◆ setButtonColor()

void OSCR::UI::NeoPixel::setButtonColor ( rgb_t rgb)
extern

Set the LCD button color.

Note
Requires NeoPixel

◆ setColors()

void OSCR::UI::NeoPixel::setColors ( rgb_t background,
rgb_t button )
extern

Set the LCD button color.

Note
Requires NeoPixel

◆ setup()

void OSCR::UI::NeoPixel::setup ( )
extern

Setup the NeoPixel

Note
Requires a NeoPixel.

◆ updateColors()

void OSCR::UI::NeoPixel::updateColors ( )
extern

Update/refresh the LCD's colors.

Note
Requires MINI12864

◆ useErrorColor()

void OSCR::UI::NeoPixel::useErrorColor ( bool fatal = false)
extern

Use the error colors.

Note
Requires MINI12864

◆ useNormalColor()

void OSCR::UI::NeoPixel::useNormalColor ( )
extern

Use the default colors.

Note
Requires MINI12864

◆ useNotificationColor()

void OSCR::UI::NeoPixel::useNotificationColor ( )
extern

Use the notification colors.

Note
Requires MINI12864

Variable Documentation

◆ background

rgb_t OSCR::UI::NeoPixel::background
Initial value:
= {
100 ,
0 ,
100 ,
}

◆ button

rgb_t OSCR::UI::NeoPixel::button
Initial value:
= {
100 ,
0 ,
100 ,
}

◆ error

rgb_t OSCR::UI::NeoPixel::error ( void )
Initial value:
= {
100 ,
0 ,
0 ,
}

◆ normal

rgb_t OSCR::UI::NeoPixel::normal
Initial value:
= {
100 ,
0 ,
100 ,
}

◆ notification

rgb_t OSCR::UI::NeoPixel::notification ( void )
Initial value:
= {
100 ,
100 ,
0 ,
}

◆ off

void OSCR::UI::NeoPixel::off
Initial value:
= {
0,
0,
0,
}

Turn off the NeoPixels.

◆ [class]

class { ... } OSCR::UI::NeoPixel::pixelColors

The current colors.

◆ pixels

Adafruit_NeoPixel OSCR::UI::NeoPixel::pixels(3, 13, NEO_GRB+NEO_KHZ800)

The NeoPixel instance for controlling the color of the NeoPixel.