diff options
Diffstat (limited to 'Demos/Device/ClassDriver/Mouse')
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Descriptors.c | 4 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Descriptors.h | 5 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Mouse.c | 14 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Mouse.h | 14 |
4 files changed, 26 insertions, 11 deletions
diff --git a/Demos/Device/ClassDriver/Mouse/Descriptors.c b/Demos/Device/ClassDriver/Mouse/Descriptors.c index 703051e84..66db661c0 100644 --- a/Demos/Device/ClassDriver/Mouse/Descriptors.c +++ b/Demos/Device/ClassDriver/Mouse/Descriptors.c @@ -199,7 +199,9 @@ USB_Descriptor_String_t PROGMEM ProductString = * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the * USB host. */ -uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); const uint8_t DescriptorNumber = (wValue & 0xFF); diff --git a/Demos/Device/ClassDriver/Mouse/Descriptors.h b/Demos/Device/ClassDriver/Mouse/Descriptors.h index 2c77d7841..59910dec4 100644 --- a/Demos/Device/ClassDriver/Mouse/Descriptors.h +++ b/Demos/Device/ClassDriver/Mouse/Descriptors.h @@ -63,7 +63,8 @@ #define MOUSE_EPSIZE 8 /* Function Prototypes: */ - uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress) - ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint8_t wIndex, + void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); #endif diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c index f24273628..19ca0132a 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.c +++ b/Demos/Device/ClassDriver/Mouse/Mouse.c @@ -137,8 +137,11 @@ void EVENT_USB_Device_StartOfFrame(void) * * \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent */ -bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, - const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize) +bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + const uint8_t ReportType, + void* ReportData, + uint16_t* const ReportSize) { USB_MouseReport_Data_t* MouseReport = (USB_MouseReport_Data_t*)ReportData; @@ -173,8 +176,11 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn * \param[in] ReportData Pointer to a buffer where the created report has been stored * \param[in] ReportSize Size in bytes of the received HID report */ -void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, - const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize) +void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + const uint8_t ReportID, + const uint8_t ReportType, + const void* ReportData, + const uint16_t ReportSize) { // Unused (but mandatory for the HID class driver) in this demo, since there are no Host->Device reports } diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.h b/Demos/Device/ClassDriver/Mouse/Mouse.h index c3d9ce694..9a3c6e554 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.h +++ b/Demos/Device/ClassDriver/Mouse/Mouse.h @@ -76,9 +76,15 @@ void EVENT_USB_Device_UnhandledControlRequest(void); void EVENT_USB_Device_StartOfFrame(void); - bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, - const uint8_t ReportType, void* ReportData, uint16_t* const ReportSize); - void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, - const uint8_t ReportType, const void* ReportData, const uint16_t ReportSize); + bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + uint8_t* const ReportID, + const uint8_t ReportType, + void* ReportData, + uint16_t* const ReportSize); + void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, + const uint8_t ReportID, + const uint8_t ReportType, + const void* ReportData, + const uint16_t ReportSize); #endif |