Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mode SixtyFive M65HA and M65HI #14685

Merged
merged 6 commits into from
Dec 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove EEPROM debug functions
  • Loading branch information
Gondolindrim committed Nov 29, 2021
commit 394067cd74c52772374781b603ae42789e5760a8
42 changes: 0 additions & 42 deletions keyboards/mode/m65ha_alpha/m65ha_alpha.c
Original file line number Diff line number Diff line change
@@ -65,45 +65,3 @@ bool led_update_kb(led_t led_state) {
}
return res;
}

uint8_t prng(void) {
static uint8_t s = 0xAA, a = 0;
s ^= s << 3;
s ^= s >> 5;
s ^= a++ >> 2;
return s;
}

void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
// debug_enable = true;
// debug_matrix = true;
// debug_keyboard=true;
// debug_mouse=true;
}

void matrix_scan_user(void) {
static uint32_t last_eeprom_access = 0;
uint32_t now = timer_read32();
if (now - last_eeprom_access > 5000) {
dprint("reading eeprom\n");
last_eeprom_access = now;

union {
uint8_t bytes[4];
uint32_t raw;
} tmp;
tmp.bytes[0] = prng();
tmp.bytes[1] = prng();
tmp.bytes[2] = prng();
tmp.bytes[3] = prng();

eeconfig_update_user(tmp.raw);
uint32_t value = eeconfig_read_user();
if (value != tmp.raw) {
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
dprint("!! EEPROM readback mismatch!\n");
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
}
}
42 changes: 0 additions & 42 deletions keyboards/mode/m65hi_alpha/m65hi_alpha.c
Original file line number Diff line number Diff line change
@@ -65,45 +65,3 @@ bool led_update_kb(led_t led_state) {
}
return res;
}

uint8_t prng(void) {
static uint8_t s = 0xAA, a = 0;
s ^= s << 3;
s ^= s >> 5;
s ^= a++ >> 2;
return s;
}

void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable = true;
// debug_matrix = true;
// debug_keyboard=true;
// debug_mouse=true;
}

void matrix_scan_user(void) {
static uint32_t last_eeprom_access = 0;
uint32_t now = timer_read32();
if (now - last_eeprom_access > 5000) {
dprint("reading eeprom\n");
last_eeprom_access = now;

union {
uint8_t bytes[4];
uint32_t raw;
} tmp;
tmp.bytes[0] = prng();
tmp.bytes[1] = prng();
tmp.bytes[2] = prng();
tmp.bytes[3] = prng();

eeconfig_update_user(tmp.raw);
uint32_t value = eeconfig_read_user();
if (value != tmp.raw) {
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
dprint("!! EEPROM readback mismatch!\n");
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
}
}