keybrd library is an open source library for creating custom-keyboard firmware.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.

LED_AVR.h 599B

1234567891011121314151617181920212223
  1. #ifndef LED_AVR_H
  2. #define LED_AVR_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <LED.h>
  6. /* A LED_AVR object is an AVR pin that is used to power an LED on and off.
  7. DDRx Data Direction Register is configured as output in RowPort_AVR constructor.
  8. */
  9. class LED_AVR: public LED
  10. {
  11. private:
  12. volatile unsigned char& PORT;
  13. const uint8_t pin; //bitwise pin to LED
  14. public:
  15. LED_AVR(volatile unsigned char& PORTx, const uint8_t pin): PORT(PORTx), pin(pin) {}
  16. virtual void on();
  17. virtual void off();
  18. };
  19. #endif