File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,18 @@ void hook_early_init(void);
34
34
void hook_late_init (void );
35
35
36
36
/* Called once, on getting SUSPEND event from USB. */
37
- /* Default behaviour: enables sleep LED breathing . */
38
- void hook_suspend_entry (void );
37
+ /* Default behaviour: do nothing . */
38
+ void hook_usb_suspend_entry (void );
39
39
40
40
/* Called repeatedly during the SUSPENDed state. */
41
41
/* Default behaviour: power down and periodically check
42
42
* the matrix, cause wakeup if needed. */
43
- void hook_suspend_loop (void );
43
+ void hook_usb_suspend_loop (void );
44
44
45
45
/* Called once, on getting WAKE event from USB. */
46
46
/* Default behaviour: disables sleep LED breathing and restores
47
47
* the "normal" indicator LED status by default. */
48
- void hook_wakeup (void );
48
+ void hook_usb_wakeup (void );
49
49
50
50
/* Called once, on checking the bootmagic combos. */
51
51
/* Default behaviour: do nothing. */
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ __attribute__((weak))
67
67
void hook_late_init (void ) {}
68
68
69
69
__attribute__((weak ))
70
- void hook_suspend_loop (void ) {
70
+ void hook_usb_suspend_loop (void ) {
71
71
/* Do this in the suspended state */
72
72
suspend_power_down (); // on AVR this deep sleeps for 15ms
73
73
/* Remote wakeup */
@@ -147,7 +147,7 @@ int main(void) {
147
147
if (USB_DRIVER .state == USB_SUSPENDED ) {
148
148
print ("[s]" );
149
149
while (USB_DRIVER .state == USB_SUSPENDED ) {
150
- hook_suspend_loop ();
150
+ hook_usb_suspend_loop ();
151
151
}
152
152
/* Woken up */
153
153
// variables have been already cleared
Original file line number Diff line number Diff line change 31
31
32
32
/* TMK hooks */
33
33
__attribute__((weak ))
34
- void hook_wakeup (void ) {
34
+ void hook_usb_wakeup (void ) {
35
35
#ifdef SLEEP_LED_ENABLE
36
36
sleep_led_disable ();
37
37
// NOTE: converters may not accept this
@@ -40,7 +40,7 @@ void hook_wakeup(void) {
40
40
}
41
41
42
42
__attribute__((weak ))
43
- void hook_suspend_entry (void ) {
43
+ void hook_usb_suspend_entry (void ) {
44
44
#ifdef SLEEP_LED_ENABLE
45
45
sleep_led_enable ();
46
46
#endif /* SLEEP_LED_ENABLE */
@@ -814,13 +814,13 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
814
814
815
815
case USB_EVENT_SUSPEND :
816
816
//TODO: from ISR! print("[S]");
817
- hook_suspend_entry ();
817
+ hook_usb_suspend_entry ();
818
818
return ;
819
819
820
820
case USB_EVENT_WAKEUP :
821
821
//TODO: from ISR! print("[W]");
822
822
suspend_wakeup_init ();
823
- hook_wakeup ();
823
+ hook_usb_wakeup ();
824
824
return ;
825
825
826
826
case USB_EVENT_STALLED :
Original file line number Diff line number Diff line change @@ -181,13 +181,13 @@ void EVENT_USB_Device_Reset(void)
181
181
void EVENT_USB_Device_Suspend ()
182
182
{
183
183
print ("[S]" );
184
- hook_suspend_entry ();
184
+ hook_usb_suspend_entry ();
185
185
}
186
186
187
187
void EVENT_USB_Device_WakeUp ()
188
188
{
189
189
print ("[W]" );
190
- hook_wakeup ();
190
+ hook_usb_wakeup ();
191
191
}
192
192
193
193
#ifdef CONSOLE_ENABLE
@@ -585,8 +585,8 @@ int main(void) __attribute__ ((weak));
585
585
int main (void )
586
586
{
587
587
setup_mcu ();
588
- keyboard_setup ();
589
588
hook_early_init ();
589
+ keyboard_setup ();
590
590
setup_usb ();
591
591
sei ();
592
592
@@ -612,7 +612,7 @@ int main(void)
612
612
while (1 ) {
613
613
while (USB_DeviceState == DEVICE_STATE_Suspended ) {
614
614
print ("[s]" );
615
- hook_suspend_loop ();
615
+ hook_usb_suspend_loop ();
616
616
}
617
617
618
618
keyboard_task ();
@@ -632,15 +632,15 @@ __attribute__((weak))
632
632
void hook_late_init (void ) {}
633
633
634
634
__attribute__((weak ))
635
- void hook_suspend_entry (void )
635
+ void hook_usb_suspend_entry (void )
636
636
{
637
637
#ifdef SLEEP_LED_ENABLE
638
638
sleep_led_enable ();
639
639
#endif
640
640
}
641
641
642
642
__attribute__((weak ))
643
- void hook_suspend_loop (void )
643
+ void hook_usb_suspend_loop (void )
644
644
{
645
645
suspend_power_down ();
646
646
if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition ()) {
@@ -649,7 +649,7 @@ void hook_suspend_loop(void)
649
649
}
650
650
651
651
__attribute__((weak ))
652
- void hook_wakeup (void )
652
+ void hook_usb_wakeup (void )
653
653
{
654
654
suspend_wakeup_init ();
655
655
#ifdef SLEEP_LED_ENABLE
You can’t perform that action at this time.
0 commit comments