1
- #include <avr/sfr_defs.h>
2
- #include <avr/timer_avr.h>
3
- #include <avr/wdt.h>
4
1
#include "cu75.h"
5
- #include "debug.h"
6
- #include "../lfkeyboards/issi.h"
7
- #include "../lfkeyboards/TWIlib.h"
8
- #include "../lfkeyboards/lighting.h"
2
+ #include <avr/wdt.h>
9
3
10
4
#ifdef AUDIO_ENABLE
11
5
float test_sound [][2 ] = SONG (STARTUP_SOUND );
12
- #include "audio.h"
13
6
#endif
14
7
15
8
uint16_t click_hz = CLICK_HZ ;
@@ -34,39 +27,12 @@ void matrix_init_kb(void)
34
27
setPinOutput (C6 );
35
28
writePinLow (C6 );
36
29
#endif
37
- #ifdef ISSI_ENABLE
38
- issi_init ();
39
- #endif
40
30
}
41
31
42
32
void matrix_scan_kb (void )
43
33
{
44
34
#ifdef WATCHDOG_ENABLE
45
35
wdt_reset ();
46
- #endif
47
- #ifdef ISSI_ENABLE
48
- // switch/underglow lighting update
49
- static uint32_t issi_device = 0 ;
50
- static uint32_t twi_last_ready = 0 ;
51
- if (twi_last_ready > 1000 ){
52
- // Its been way too long since the last ISSI update, reset the I2C bus and start again
53
- dprintf ("TWI failed to recover, TWI re-init\n" );
54
- twi_last_ready = 0 ;
55
- TWIInit ();
56
- force_issi_refresh ();
57
- }
58
- if (isTWIReady ()){
59
- twi_last_ready = 0 ;
60
- // If the i2c bus is available, kick off the issi update, alternate between devices
61
- update_issi (issi_device , issi_device );
62
- if (issi_device ){
63
- issi_device = 0 ;
64
- }else {
65
- issi_device = 3 ;
66
- }
67
- }else {
68
- twi_last_ready ++ ;
69
- }
70
36
#endif
71
37
matrix_scan_user ();
72
38
}
@@ -92,7 +58,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
92
58
}
93
59
if (keycode == QK_BOOT ) {
94
60
reset_keyboard_kb ();
95
- } else {
96
61
}
97
62
return process_record_user (keycode , record );
98
63
}
@@ -105,11 +70,3 @@ void reset_keyboard_kb(void){
105
70
#endif
106
71
reset_keyboard ();
107
72
}
108
-
109
- // LFK lighting info
110
- const uint8_t switch_matrices [] = {0 , 1 };
111
- const uint8_t rgb_matrices [] = {6 , 7 };
112
- const uint8_t rgb_sequence [] = {
113
- 24 , 23 , 22 , 21 , 20 , 19 , 18 , 17 , 1 , 2 , 3 , 4 , 5 ,
114
- 6 , 7 , 8 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 9
115
- };
0 commit comments