- 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
/* Write the PIMA block to the data OUT pipe */
Pipe_Write_Stream_LE(&PIMA_SendBlock, PIMA_COMMAND_SIZE(0));
/* Write the PIMA block to the data OUT pipe */
Pipe_Write_Stream_LE(&PIMA_SendBlock, PIMA_COMMAND_SIZE(0));
{
/* Determine the size of the parameters in the block via the data length attribute */
uint8_t ParamBytes = (PIMA_SendBlock.DataLength - PIMA_COMMAND_SIZE(0));
{
/* Determine the size of the parameters in the block via the data length attribute */
uint8_t ParamBytes = (PIMA_SendBlock.DataLength - PIMA_COMMAND_SIZE(0));
/* Write the PIMA parameters to the data OUT pipe */
Pipe_Write_Stream_LE(&PIMA_SendBlock.Params, ParamBytes);
}
/* Write the PIMA parameters to the data OUT pipe */
Pipe_Write_Stream_LE(&PIMA_SendBlock.Params, ParamBytes);
}
/* Read in the event data into the global structure */
ErrorCode = Pipe_Read_Stream_LE(&PIMA_EventBlock, sizeof(PIMA_EventBlock));
/* Read in the event data into the global structure */
ErrorCode = Pipe_Read_Stream_LE(&PIMA_EventBlock, sizeof(PIMA_EventBlock));
- /* Clear the flag and decrement the timeout period counter */
- USB_INT_Clear(USB_INT_HSOFI);
+ /* Save the new frame number and decrement the timeout period */
+ PreviousFrameNumber = CurrentFrameNumber;
/* Check to see if the device was disconnected, if so exit function */
if (USB_HostState == HOST_STATE_Unattached)
return PIPE_RWSTREAM_DeviceDisconnected;
}
/* Check to see if the device was disconnected, if so exit function */
if (USB_HostState == HOST_STATE_Unattached)
return PIPE_RWSTREAM_DeviceDisconnected;
}
/* Load in the response from the attached device */
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
/* Load in the response from the attached device */
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
{
/* Determine the size of the parameters in the block via the data length attribute */
uint8_t ParamBytes = (PIMA_ReceivedBlock.DataLength - PIMA_COMMAND_SIZE(0));
{
/* Determine the size of the parameters in the block via the data length attribute */
uint8_t ParamBytes = (PIMA_ReceivedBlock.DataLength - PIMA_COMMAND_SIZE(0));
/* Read the PIMA parameters from the data IN pipe */
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock.Params, ParamBytes);
}
/* Read the PIMA parameters from the data IN pipe */
Pipe_Read_Stream_LE(&PIMA_ReceivedBlock.Params, ParamBytes);
}
/* Write the data contents to the pipe */
ErrorCode = Pipe_Write_Stream_LE(Buffer, Bytes);
/* Write the data contents to the pipe */
ErrorCode = Pipe_Write_Stream_LE(Buffer, Bytes);