Skip to content

Commit

Permalink
Fixing missing symbol error with host-side KLL
Browse files Browse the repository at this point in the history
- usb_configured() is not available
- Wrapping it as USB_ready()
  • Loading branch information
haata committed Mar 17, 2019
1 parent 51b1fb2 commit f5e773a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Output/USB/output_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,18 @@ inline void USB_poll()
}


// Check if USB is ready
// Returns 1 if ready, 0 if not
uint8_t USB_ready()
{
#if !defined(_host_)
return usb_configured();
#else
return 1;
#endif
}


// Gather USB HID LED states
// Keeps track of previous state, and sends new state to PartialMap
void USB_indicator_update()
Expand Down Expand Up @@ -917,7 +929,7 @@ inline void USB_periodic()

#if enableMouse_define == 1
// Process mouse actions
while ( USBMouse_primary.changed && usb_configured() )
while ( USBMouse_primary.changed && USB_ready() )
{
usb_mouse_send();
}
Expand Down Expand Up @@ -945,7 +957,7 @@ inline void USB_periodic()
}

// Send keypresses while there are pending changes
while ( USBKeys_primary.changed && usb_configured() )
while ( USBKeys_primary.changed && USB_ready() )
{
usb_keyboard_send( (USBKeys*)&USBKeys_primary, USBKeys_Protocol );
}
Expand Down

0 comments on commit f5e773a

Please sign in to comment.