@ -101,8 +101,8 @@ void EVENT_USB_Host_HostError(uint8_t ErrorCode)
{
{
USB_ShutDown ( ) ;
USB_ShutDown ( ) ;
p uts _P( PSTR ( ESC_FG_RED " Host Mode Error \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Host Mode Error \r \n "
printf_P ( PSTR ( " -- Error Code %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
" -- Error Code %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
for ( ; ; ) ;
for ( ; ; ) ;
@ -113,10 +113,10 @@ void EVENT_USB_Host_HostError(uint8_t ErrorCode)
*/
*/
void EVENT_USB_Host_DeviceEnumerationFailed ( uint8_t ErrorCode , uint8_t SubErrorCode )
void EVENT_USB_Host_DeviceEnumerationFailed ( uint8_t ErrorCode , uint8_t SubErrorCode )
{
{
p uts _P( PSTR ( ESC_FG_RED " Dev Enum Error \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Dev Enum Error \r \n "
printf_P ( PSTR ( " -- Error Code %d \r \n " ) , ErrorCode ) ;
" -- Error Code %d \r \n "
printf_P ( PSTR ( " -- Sub Error Code %d \r \n " ) , SubErrorCode ) ;
" -- Sub Error Code %d \r \n "
printf_P ( PSTR ( " -- In State %d \r \n " ESC_FG_WHITE ) , USB_HostState ) ;
" -- In State %d \r \n " ESC_FG_WHITE ) , ErrorCode , SubErrorCode , USB_HostState ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
}
}
@ -157,8 +157,8 @@ void USB_Printer_Host(void)
/* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */
/* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */
if ( ( ErrorCode = USB_Host_SetDeviceConfiguration ( 1 ) ) ! = HOST_SENDCONTROL_Successful )
if ( ( ErrorCode = USB_Host_SetDeviceConfiguration ( 1 ) ) ! = HOST_SENDCONTROL_Successful )
{
{
p uts _P( PSTR ( ESC_FG_RED " Control Error (Set Configuration). \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Control Error (Set Configuration). \r \n "
printf_P ( PSTR ( " -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
" -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
/* Indicate error via status LEDs */
/* Indicate error via status LEDs */
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
@ -183,8 +183,8 @@ void USB_Printer_Host(void)
if ( ( ErrorCode = USB_Host_SendControlRequest ( NULL ) ) ! = HOST_SENDCONTROL_Successful )
if ( ( ErrorCode = USB_Host_SendControlRequest ( NULL ) ) ! = HOST_SENDCONTROL_Successful )
{
{
p uts _P( PSTR ( ESC_FG_RED " Control Error (Set Interface). \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Control Error (Set Interface). \r \n "
printf_P ( PSTR ( " -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
" -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
/* Indicate error via status LEDs */
/* Indicate error via status LEDs */
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
@ -200,8 +200,8 @@ void USB_Printer_Host(void)
char DeviceIDString [ 256 ] ;
char DeviceIDString [ 256 ] ;
if ( ( ErrorCode = Printer_GetDeviceID ( DeviceIDString , sizeof ( DeviceIDString ) ) ) ! = HOST_SENDCONTROL_Successful )
if ( ( ErrorCode = Printer_GetDeviceID ( DeviceIDString , sizeof ( DeviceIDString ) ) ) ! = HOST_SENDCONTROL_Successful )
{
{
p uts _P( PSTR ( ESC_FG_RED " Control Error (Get DeviceID). \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Control Error (Get DeviceID). \r \n "
printf_P ( PSTR ( " -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
" -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
/* Indicate error via status LEDs */
/* Indicate error via status LEDs */
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
@ -231,8 +231,8 @@ void USB_Printer_Host(void)
if ( ( ErrorCode = Printer_SendData ( & TestPageData ) ) ! = PIPE_RWSTREAM_NoError )
if ( ( ErrorCode = Printer_SendData ( & TestPageData ) ) ! = PIPE_RWSTREAM_NoError )
{
{
p uts _P( PSTR ( ESC_FG_RED " Error Sending Test Page. \r \n " ) ) ;
p rintf _P( PSTR ( ESC_FG_RED " Error Sending Test Page. \r \n "
printf_P ( PSTR ( " -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
" -- Error Code: %d \r \n " ESC_FG_WHITE ) , ErrorCode ) ;
/* Indicate error via status LEDs */
/* Indicate error via status LEDs */
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;
LEDs_SetAllLEDs ( LEDMASK_USB_ERROR ) ;