#ifndef __PIN_MAP_HPP__ #define __PIN_MAP_HPP__ #if defined(ARDUINO_AVR_ATTINYX5) /* LedStrip output pin */ uint8_t const LedPin{PIN_PB0}; /* Button analog input pin */ /* Note: we use PB5 as button input which is also the reset pin, to avoid reseting we read an analogic value with * lower voltage than the triger value of reset */ int const AnalogButtonVRef{970}; uint8_t const ButtonPin{PINA0}; /* Rotary encoder input pins */ /* TODO: change to PB2 for using int0 */ uint8_t const EncoderPinA{PIN_PB3}; uint8_t const EncoderPinB{PIN_PB4}; /* Uart for serial debug pins */ #if defined(__BUILD_DEBUG__) uint8_t const TxPin{PIN_PB1}; uint8_t const RxPin{PIN_PB2}; #endif /* defined(__BUILD_DEBUG__) */ #elif defined(ARDUINO_AVR_ATTINYX41) /* LedStrip output pin */ uint8_t const LedPin{PIN_PA1}; /* Button input pin (internally pulled up) */ uint8_t const ButtonPin{PIN_PA0}; /* Rotary encoder input pins */ /* PB1 is interrupt pin (int0)*/ uint8_t const EncoderPinA{PIN_PB1}; uint8_t const EncoderPinB{PIN_PB0}; /* Uart for serial debug pins */ #if defined(__BUILD_DEBUG__) uint8_t const TxPin{PIN_PA5}; uint8_t const RxPin{PIN_PA4}; #endif /* defined(__BUILD_DEBUG__) */ #elif defined(ARDUINO_AVR_UNO) /* LedStrip output pin */ uint8_t const LedPin{11}; /* Button analog input pin */ uint8_t const ButtonPin{A0}; /* Rotary encoder input pins */ /* INT0 and INT1 */ uint8_t const EncoderPinA{2}; uint8_t const EncoderPinB{3}; #endif /* Hardware selection */ #endif /* __PIN_MAP_HPP__ */