Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString() functions to *_SendData(), and added new versions of the *_SendString() routines that expect a null terminated string instead.

Added new Serial_SendData() function to the Serial driver.
This commit is contained in:
Dean Camera 2011-01-30 21:02:31 +00:00
parent afd828c095
commit 43c4735305
14 changed files with 147 additions and 32 deletions

View file

@ -287,8 +287,31 @@ uint8_t PRNT_Host_SendByte(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
}
uint8_t PRNT_Host_SendString(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
void* Buffer,
const uint16_t Length)
void* String)
{
uint8_t ErrorCode;
if ((USB_HostState != HOST_STATE_Configured) || !(PRNTInterfaceInfo->State.IsActive))
return PIPE_RWSTREAM_DeviceDisconnected;
Pipe_SelectPipe(PRNTInterfaceInfo->Config.DataOUTPipeNumber);
Pipe_Unfreeze();
if ((ErrorCode = Pipe_Write_Stream_LE(String, strlen(String), NULL)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearOUT();
ErrorCode = Pipe_WaitUntilReady();
Pipe_Freeze();
return ErrorCode;
}
uint8_t PRNT_Host_SendData(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
void* Buffer,
const uint16_t Length)
{
uint8_t ErrorCode;