[Rotary encoders] Navigation system reworked

This commit is contained in:
bsongis
2013-02-13 06:35:45 +00:00
parent d7bb012f16
commit e616c4674d
24 changed files with 417 additions and 432 deletions
+7 -1
View File
@@ -180,9 +180,15 @@ void pwrOff()
#endif
}
#if ROTARY_ENCODERS <= 2
#define ROTENC_DOWN() ((~PIND & 0x20) || (~PIND & 0x10))
#else
#define ROTENC_DOWN() (0)
#endif
FORCEINLINE uint8_t keyDown()
{
return (~PINL) & 0x3F;
return ((~PINL) & 0x3F) || ROTENC_DOWN();
}
bool switchState(EnumKeys enuk)