Added new PRNT_Host_BytesReceived() and PRNT_Host_ReceiveByte() functions to the Print Host Class driver.
This commit is contained in:
parent
6e011f88d9
commit
7aaf9b2036
6 changed files with 99 additions and 19 deletions
|
|
@ -134,7 +134,7 @@ int main(void)
|
|||
|
||||
printf_P(PSTR("Sending Test Page (%d bytes)...\r\n"), TestPageLength);
|
||||
|
||||
if (PRNT_Host_SendData(&Printer_PRNT_Interface, &TestPageData, TestPageLength) != PIPE_RWSTREAM_NoError)
|
||||
if (PRNT_Host_SendString(&Printer_PRNT_Interface, &TestPageData, TestPageLength) != PIPE_RWSTREAM_NoError)
|
||||
{
|
||||
puts_P(PSTR("Error Sending Page Data.\r\n"));
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
|
|
|
|||
|
|
@ -56,11 +56,8 @@ uint8_t Printer_SendData(const void* const PrinterCommands,
|
|||
return ErrorCode;
|
||||
|
||||
Pipe_ClearOUT();
|
||||
while (!(Pipe_IsOUTReady()))
|
||||
{
|
||||
if (USB_HostState == HOST_STATE_Unattached)
|
||||
return PIPE_RWSTREAM_DeviceDisconnected;
|
||||
}
|
||||
|
||||
Pipe_WaitUntilReady();
|
||||
|
||||
Pipe_Freeze();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue