keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Code_Sc_LED.h 530B

123456789101112131415161718192021
  1. #ifndef CODE_SC_LED_H
  2. #define CODE_SC_LED_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <Code.h>
  6. #include <LED.h>
  7. /* Class Code_Sc_LED sends a scancode when press() or release() is called.
  8. "S" stands for Scancode.
  9. */
  10. class Code_Sc_LED : public Code
  11. {
  12. private:
  13. const uint16_t scancode;
  14. LED& refLED;
  15. public:
  16. Code_Sc_LED(const uint16_t scancode, LED& refLED): scancode(scancode), refLED(refLED) { }
  17. virtual void press();
  18. virtual void release();
  19. };
  20. #endif