Skip to content

Commit 7ecf45f

Browse files
Improve start up sequence of Kugel-1
1 parent 58fb7fb commit 7ecf45f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

keyboards/kugel/kugel.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ static void create_status_file() {
9999
}
100100

101101
void matrix_init_kb() {
102-
spim_init();
103-
104102
// reset io expanders
105103
setPinOutput(IO_RESET);
106104
setPinOd(IO_ROW);
@@ -190,13 +188,16 @@ void matrix_scan_kb() {
190188
writePinLow(TB_POW);
191189
break;
192190
} else if (init_cnt == 10) {
193-
check_tb_connection();
191+
spim_init();
192+
194193
ioexp_init();
195194

196195
create_status_file();
197196

197+
reset_adns7530();
198+
check_tb_connection();
198199
if (trackball_init_flag) {
199-
reset_adns7530();
200+
// reset_adns7530();
200201
setPinInputHigh(TB_INT);
201202
}
202203
break;
@@ -369,4 +370,11 @@ MSCMD_USER_RESULT usrcmd_trackball_pixel(MSOPT *msopt, MSCMD_USER_OBJECT usrobj)
369370
return 0;
370371
}
371372

373+
void bmp_before_sleep() {
374+
setPinInputHigh(16);
375+
setPinInputHigh(14);
376+
setPinInputHigh(CS_PIN_TB);
377+
writePinHigh(TB_POW);
378+
}
379+
372380
bool checkSafemodeFlag(bmp_api_config_t const *const config) { return false; }

0 commit comments

Comments
 (0)