Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button.
This commit is contained in:
1 parent
f11f69fd29
commit
63a8f66d92
25 files changed
+163
-131
No files matched your search
@@ -240,8 +240,8 @@ TASK(USB_Keyboard)
|
||||
{
|
||||
uint8_t JoyStatus_LCL = Joystick_GetStatus();
|
||||
|
||||
/* Check if HWB is not pressed, if so mouse mode enabled */
|
||||
if (!(HWB_GetStatus()))
|
||||
/* Check if board button is not pressed, if so mouse mode enabled */
|
||||
if (!(Buttons_GetStatus() & BUTTONS_BUTTON1))
|
||||
{
|
||||
if (JoyStatus_LCL & JOY_UP)
|
||||
KeyboardReportData.KeyCode[0] = 0x04; // A
|
||||
@@ -311,8 +311,8 @@ TASK(USB_Mouse)
|
||||
{
|
||||
uint8_t JoyStatus_LCL = Joystick_GetStatus();
|
||||
|
||||
/* Check if HWB is pressed, if so mouse mode enabled */
|
||||
if (HWB_GetStatus())
|
||||
/* Check if board button is pressed, if so mouse mode enabled */
|
||||
if (Buttons_GetStatus() & BUTTONS_BUTTON1)
|
||||
{
|
||||
if (JoyStatus_LCL & JOY_UP)
|
||||
MouseReportData.Y = 1;
|
||||
|
||||
Reference in new issue
Block a user