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í.

LayerState_LED.h 642B

123456789101112131415161718192021
  1. #ifndef LAYERSTATE_LED_H
  2. #define LAYERSTATE_LED_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <LayerState.h>
  6. #include <LEDInterface.h>
  7. /* Basic LayerState with layer LED indictor lights.
  8. begin() should be called once to turn on LED for initial active layer.
  9. */
  10. class LayerState_LED : public LayerState
  11. {
  12. private:
  13. LEDInterface*const *const ptrsLEDs; //array of LEDs, where layerId is array index
  14. virtual void setActiveLayer(const uint8_t layerId);//set active layerId and turn on it's LED
  15. public:
  16. LayerState_LED(LEDInterface*const ptrsLEDs[]): ptrsLEDs(ptrsLEDs) {}
  17. void begin();
  18. };
  19. #endif