keybrd library is an open source library for creating custom-keyboard firmware.
Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Tento repozitář je archivovaný. Můžete prohlížet soubory, klonovat, ale nemůžete nahrávat a vytvářet nové úkoly a požadavky na natažení.
123456789101112131415161718192021 |
- #ifndef LAYERSTATE_LED_H
- #define LAYERSTATE_LED_H
-
- #include <Arduino.h>
- #include <inttypes.h>
- #include <LayerState.h>
- #include <LEDInterface.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:
- LEDInterface*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(LEDInterface*const ptrsLEDs[]): ptrsLEDs(ptrsLEDs) {}
- void begin();
- };
- #endif
|