13 #include "avr_helper.h" 19 #define ENC_ANY (ENC_X | ENC_Y) 20 #define ENC_PORT BTN_PORT 26 static uint8_t get_enc_state(
void){
27 return PIN(ENC_PORT) & ENC_ANY;
32 #define X2 (ENC_X << 8) 34 #define Y2 (ENC_Y << 8) 58 static uint8_t EncState;
59 static uint8_t r1, r2;
61 uint8_t newValue = get_enc_state();
62 uint16_t fullState = newValue | (EncState << 8);
Аппаратно-зависимые определения
int8_t get_encoder(void)
Состояние энкодера