Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/src/LayerState_LED.h

22 lines
642 B
C
Raw Normal View History

2016-07-18 02:03:03 +00:00
#ifndef LAYERSTATE_LED_H
#define LAYERSTATE_LED_H
#include <Arduino.h>
#include <inttypes.h>
#include <LayerState.h>
2016-09-25 03:58:54 +00:00
#include <LEDInterface.h>
2016-07-18 02:03:03 +00:00
/* Basic LayerState with layer LED indictor lights.
begin() should be called once to turn on LED for initial active layer.
*/
class LayerState_LED : public LayerState
{
private:
2016-09-25 03:58:54 +00:00
LEDInterface*const *const ptrsLEDs; //array of LEDs, where layerId is array index
2016-09-20 01:46:03 +00:00
virtual void setActiveLayer(const uint8_t layerId);//set active layerId and turn on it's LED
2016-07-18 02:03:03 +00:00
public:
2016-09-25 03:58:54 +00:00
LayerState_LED(LEDInterface*const ptrsLEDs[]): ptrsLEDs(ptrsLEDs) {}
2016-07-18 02:03:03 +00:00
void begin();
};
#endif