USB Missile Launcher Demo
Copyright (C) Dave Fletcher, 2010.
fletch at fletchtronics dot net
USB Missile Launcher Demo
Copyright (C) Dave Fletcher, 2010.
fletch at fletchtronics dot net
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
software without specific, written prior permission.
The author disclaim all warranties with regard to this
* the application and is responsible for the initial application hardware configuration as well
* as the sending of commands to the attached launcher toy.
*/
* the application and is responsible for the initial application hardware configuration as well
* as the sending of commands to the attached launcher toy.
*/
{
memcpy(CmdBuffer, Report, 8);
WriteNextReport(CmdBuffer, ReportSize);
{
memcpy(CmdBuffer, Report, 8);
WriteNextReport(CmdBuffer, ReportSize);
Send_Command_Report(CMD_INITB, 8);
Send_Command_Report(Command, LAUNCHER_CMD_BUFFER_SIZE);
}
Send_Command_Report(CMD_INITB, 8);
Send_Command_Report(Command, LAUNCHER_CMD_BUFFER_SIZE);
}
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
/** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */
void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
{
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
/** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
* enumerating an attached USB device.
*/
* \param[in] ReportOUTData Buffer containing the report to send to the device
* \param[in] ReportLength Length of the report to send
*/
* \param[in] ReportOUTData Buffer containing the report to send to the device
* \param[in] ReportLength Length of the report to send
*/
/* Not all HID devices have an OUT endpoint (some require OUT reports to be sent over the
* control endpoint instead) - check to see if the OUT endpoint has been initialized */
if (Pipe_IsConfigured())
/* Not all HID devices have an OUT endpoint (some require OUT reports to be sent over the
* control endpoint instead) - check to see if the OUT endpoint has been initialized */
if (Pipe_IsConfigured())
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),