forked from mirrors/qmk_userspace
[Core] Move has_mouse_report_changed
function to report.c
(#16543)
* Move 'has_mouse_report_changed' checkto report.c * change mousekeys to use memcpy * fix linting issues
This commit is contained in:
parent
cc9a2aef0f
commit
921b9dad6c
5 changed files with 32 additions and 23 deletions
|
@ -278,3 +278,16 @@ void clear_keys_from_report(report_keyboard_t* keyboard_report) {
|
|||
#endif
|
||||
memset(keyboard_report->keys, 0, sizeof(keyboard_report->keys));
|
||||
}
|
||||
|
||||
#ifdef MOUSE_ENABLE
|
||||
/**
|
||||
* @brief Compares 2 mouse reports for difference and returns result
|
||||
*
|
||||
* @param[in] new_report report_mouse_t
|
||||
* @param[in] old_report report_mouse_t
|
||||
* @return bool result
|
||||
*/
|
||||
__attribute__((weak)) bool has_mouse_report_changed(report_mouse_t* new_report, report_mouse_t* old_report) {
|
||||
return memcmp(new_report, old_report, sizeof(report_mouse_t));
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue