encoder, dip update, adds bootloader

This commit is contained in:
Jack Humbert 2018-09-21 01:09:05 -04:00
parent d24132ce71
commit 0236f6a8ac
28 changed files with 8099 additions and 8 deletions

View file

@ -42,6 +42,9 @@ static bool dip_switch[4] = {0, 0, 0, 0};
__attribute__ ((weak))
void dip_update(uint8_t index, bool active) { }
__attribute__ ((weak))
void dip_update_kb(uint8_t index, bool active) { }
__attribute__ ((weak))
void encoder_update(uint8_t index, bool clockwise) { }
@ -117,6 +120,7 @@ uint8_t matrix_scan(void) {
for (uint8_t i = 0; i < 4; i++) {
if (last_dip_switch[i] ^ dip_switch[i])
dip_update(i, dip_switch[i]);
dip_update_kb(i, dip_switch[i]);
}
memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch));