Skip to content

Commit 61ea246

Browse files
authored
Added keyboard led status report callback
Avoids the need to continuously poll for changes to caps lock scroll lock num lock
1 parent 26a9808 commit 61ea246

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/HID/src/HID.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ class HID_ : public PluggableUSBModule
9696
int SendReport(uint8_t id, const void* data, int len);
9797
void AppendDescriptor(HIDSubDescriptor* node);
9898
uint8_t getKeyboardLedsStatus(void);
99-
99+
void setKeyboardLedsStatusReportCallback(void (*callback) (void) );
100+
100101
protected:
101102
// Implementation of the PluggableUSBModule
102103
int getInterface(uint8_t* interfaceCount);
@@ -113,6 +114,7 @@ class HID_ : public PluggableUSBModule
113114
uint8_t protocol;
114115
uint8_t idle;
115116
uint8_t _keyboardLedsStatus;
117+
void (*keyboardLedsStatusReportCallback) (void);
116118
};
117119

118120
// Replacement for global singleton.

0 commit comments

Comments
 (0)