forked from mirror/qmk_firmware
Use -pedantic compile time option to find and correct several minor code errors.
This commit is contained in:
@@ -42,11 +42,11 @@ static uint8_t Bluetooth_SendHCICommand(void* Parameters, uint8_t ParamLength)
|
||||
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_DEVICE),
|
||||
bRequest: 0,
|
||||
wValue: 0,
|
||||
wIndex: 0,
|
||||
wLength: sizeof(CommandBuffer)
|
||||
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_DEVICE),
|
||||
.bRequest = 0,
|
||||
.wValue = 0,
|
||||
.wIndex = 0,
|
||||
.wLength = sizeof(CommandBuffer)
|
||||
};
|
||||
|
||||
memset(CommandBuffer, 0x00, sizeof(CommandBuffer));
|
||||
|
||||
@@ -81,11 +81,11 @@ uint8_t Printer_GetDeviceID(char* DeviceIDString, uint16_t BufferSize)
|
||||
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
|
||||
bRequest: REQ_GetDeviceID,
|
||||
wValue: 0,
|
||||
wIndex: 0,
|
||||
wLength: sizeof(DeviceIDStringLength),
|
||||
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
|
||||
.bRequest = REQ_GetDeviceID,
|
||||
.wValue = 0,
|
||||
.wIndex = 0,
|
||||
.wLength = sizeof(DeviceIDStringLength),
|
||||
};
|
||||
|
||||
Pipe_SelectPipe(PIPE_CONTROLPIPE);
|
||||
@@ -149,11 +149,11 @@ uint8_t Printer_SoftReset(void)
|
||||
{
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
|
||||
bRequest: REQ_SoftReset,
|
||||
wValue: 0,
|
||||
wIndex: 0,
|
||||
wLength: 0,
|
||||
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
|
||||
.bRequest = REQ_SoftReset,
|
||||
.wValue = 0,
|
||||
.wIndex = 0,
|
||||
.wLength = 0,
|
||||
};
|
||||
|
||||
Pipe_SelectPipe(PIPE_CONTROLPIPE);
|
||||
|
||||
@@ -174,11 +174,11 @@ void USB_Printer_Host(void)
|
||||
{
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE),
|
||||
bRequest: REQ_SetInterface,
|
||||
wValue: PrinterAltSetting,
|
||||
wIndex: PrinterInterfaceNumber,
|
||||
wLength: 0,
|
||||
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE),
|
||||
.bRequest = REQ_SetInterface,
|
||||
.wValue = PrinterAltSetting,
|
||||
.wIndex = PrinterInterfaceNumber,
|
||||
.wLength = 0,
|
||||
};
|
||||
|
||||
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
|
||||
|
||||
Reference in New Issue
Block a user