#include "StillImageHost.h"\r
\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
- * starts the scheduler to run the application tasks.\r
+ * enters a loop to run the application tasks in sequence.\r
*/\r
int main(void)\r
{\r
{\r
USB_ShutDown();\r
\r
- puts_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"));\r
- printf_P(PSTR(" -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+ printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n"\r
+ " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
for(;;);\r
*/\r
void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)\r
{\r
- puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"));\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);\r
- printf_P(PSTR(" -- Sub Error Code %d\r\n"), SubErrorCode);\r
- printf_P(PSTR(" -- In State %d\r\n" ESC_FG_WHITE), USB_HostState);\r
+ printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"\r
+ " -- Error Code %d\r\n"\r
+ " -- Sub Error Code %d\r\n"\r
+ " -- In State %d\r\n" ESC_FG_WHITE), ErrorCode, SubErrorCode, USB_HostState);\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
}\r
/* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */\r
if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)\r
{\r
- puts_P(PSTR(ESC_FG_RED "Control Error (Set Configuration).\r\n"));\r
- printf_P(PSTR(" -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+ printf_P(PSTR(ESC_FG_RED "Control Error (Set Configuration).\r\n"\r
+ " -- Error Code: %d\r\n" ESC_FG_WHITE), ErrorCode);\r
\r
/* Indicate error via status LEDs */\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
SImage_SendBlockHeader();\r
\r
/* Receive the response data block */\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = SImage_ReceiveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
{\r
ShowCommandError(ErrorCode, false);\r
\r
printf_P(PSTR(" Device Version: %s\r\n"), DeviceVersion);\r
\r
/* Receive the final response block from the device */\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = SImage_ReceiveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
{\r
ShowCommandError(ErrorCode, false);\r
\r
SImage_SendBlockHeader();\r
\r
/* Receive the response block from the device */\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = SImage_ReceiveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
{\r
ShowCommandError(ErrorCode, false);\r
\r
SImage_SendBlockHeader();\r
\r
/* Receive the response block from the device */\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
+ if ((ErrorCode = SImage_ReceiveBlockHeader()) != PIPE_RWSTREAM_NoError)\r
{\r
ShowCommandError(ErrorCode, false);\r
\r
{\r
char* FailureType = ((ResponseCodeError) ? PSTR("Response Code != OK") : PSTR("Transaction Fail"));\r
\r
- printf_P(PSTR(ESC_FG_RED "Command Error (%S).\r\n"), FailureType);\r
- printf_P(PSTR(" -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);\r
+ printf_P(PSTR(ESC_FG_RED "Command Error (%S).\r\n"\r
+ " -- Error Code %d\r\n" ESC_FG_WHITE), FailureType, ErrorCode);\r
\r
/* Indicate error via status LEDs */\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r