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
2016-09-19 19:46:03 -06:00

22 lines
625 B
C++

#ifndef LAYERSTATE_LED_H
#define LAYERSTATE_LED_H
#include <Arduino.h>
#include <inttypes.h>
#include <LayerState.h>
#include <LED.h>
/* 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:
LED*const *const ptrsLEDs; //array of LEDs, where layerId is array index
virtual void setActiveLayer(const uint8_t layerId);//set active layerId and turn on it's LED
public:
LayerState_LED(LED*const ptrsLEDs[]): ptrsLEDs(ptrsLEDs) {}
void begin();
};
#endif