X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/8bc3a91c1f100dee179efbafdcc616ce87633fbb..23f3c3deee8bd153d59f2ac4e659c71ee75915f7:/Projects/Magstripe/Magstripe.c?ds=sidebyside diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index 1963973b4..95c81f342 100644 --- a/Projects/Magstripe/Magstripe.c +++ b/Projects/Magstripe/Magstripe.c @@ -160,20 +160,20 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) /** HID Class driver callback function for the creation of a HID report for the host. * - * \param HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced - * \param ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID - * \param ReportData Pointer to the preallocated report buffer where the created report should be stored + * \param[in] HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced + * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID + * \param[out] ReportData Pointer to the preallocated report buffer where the created report should be stored * * \return Number of bytes in the created report */ -uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t* ReportID, void* ReportData) +uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, void* ReportData) { static bool IsKeyReleaseReport; static bool IsNewlineReport; BitBuffer_t* Buffer = NULL; USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData; - + /* Key reports must be interleaved with 0 Key Code reports to release the keys, or repeated keys will be ignored */ IsKeyReleaseReport = !IsKeyReleaseReport; @@ -209,13 +209,13 @@ uint16_t CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* HIDInte /** HID Class driver callback function for the processing of a received HID report from the host. * - * \param HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced - * \param ReportID Report ID of the received report from the host - * \param ReportData Pointer to the report buffer where the received report is stored - * \param ReportSize Size in bytes of the report received from the host + * \param[in] HIDInterfaceInfo Pointer to the HID interface structure for the HID interface being referenced + * \param[in] ReportID Report ID of the received report from the host + * \param[in] ReportData Pointer to the report buffer where the received report is stored + * \param[in] ReportSize Size in bytes of the report received from the host */ -void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo, uint8_t ReportID, - void* ReportData, uint16_t ReportSize) +void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, const uint8_t ReportID, + 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 }