diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-07 03:38:11 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-09-07 03:38:11 +0000 |
| commit | 1c104153ba5b1265d6a4210f928b13b2dcb5aeba (patch) | |
| tree | 351a74c41f7fdf32bc4904b942b48e7975fdbc1a /Demos/Host | |
| parent | 6f1c3c8074122a1ca6a47427cddd9367504bd61b (diff) | |
Added new PRNT_Host_BytesReceived() and PRNT_Host_ReceiveByte() functions to the Print Host Class driver.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1466 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host')
| -rw-r--r-- | Demos/Host/ClassDriver/PrinterHost/PrinterHost.c | 2 | ||||
| -rw-r--r-- | Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c index e0d9726b..677b9611 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c @@ -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); diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c index ac0ca9a2..0b75d750 100644 --- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c +++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c @@ -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(); |
