projects
/
pub
/
lufa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
786479f
)
Use sane ANSI terminal escape codes for the Host mode demos, so that they do not...
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 19 Jul 2009 13:08:48 +0000
(13:08 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 19 Jul 2009 13:08:48 +0000
(13:08 +0000)
14 files changed:
Demos/Host/ClassDriver/CDCHost/CDCHost.c
patch
|
blob
|
blame
|
history
Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
patch
|
blob
|
blame
|
history
Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.c
patch
|
blob
|
blame
|
history
Demos/Host/Incomplete/PrinterHost/PrinterHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/CDCHost/CDCHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MouseHost/MouseHost.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
patch
|
blob
|
blame
|
history
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
patch
|
blob
|
blame
|
history
Demos/OTG/TestApp/TestApp.c
patch
|
blob
|
blame
|
history
Demos/OTG/TestApp/TestEvents.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/ClassDriver/CDCHost/CDCHost.c
b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
index
eb45afe
..
46b4f6f
100644
(file)
--- a/
Demos/Host/ClassDriver/CDCHost/CDCHost.c
+++ b/
Demos/Host/ClassDriver/CDCHost/CDCHost.c
@@
-62,8
+62,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "CDC Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET "CDC Host Demo running.\r\n"));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-136,7
+135,7
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
BG_RED "Host Mode Error\r\n"
));
\r
+ puts_P(PSTR(ESC_
FG_RED "Host Mode Error\r\n" ESC_FG_WHITE
));
\r
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-148,10
+147,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
diff --git
a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
index
3222b77
..
1774786
100644
(file)
--- a/
Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
+++ b/
Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
@@
-50,8
+50,7
@@
int main(void)
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Bluetooth Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Bluetooth Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
for (;;)
\r
{
\r
\r
for (;;)
\r
{
\r
@@
-78,14
+77,14
@@
void SetupHardware(void)
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
@@
-99,8
+98,8
@@
void EVENT_USB_HostError(uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-108,10
+107,10
@@
void EVENT_USB_HostError(uint8_t ErrorCode)
\r
void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
\r
{
\r
\r
void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-129,11
+128,11
@@
void Bluetooth_Management_Task(void)
if ((ErrorCode = ProcessDeviceDescriptor()) != SuccessfulDeviceRead)
\r
{
\r
if (ErrorCode == ControlErrorDuringDeviceRead)
\r
if ((ErrorCode = ProcessDeviceDescriptor()) != SuccessfulDeviceRead)
\r
{
\r
if (ErrorCode == ControlErrorDuringDeviceRead)
\r
- puts_P(PSTR("Control Error (Get Device).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Device).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
@@
-148,8
+147,8
@@
void Bluetooth_Management_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
@@
-168,11
+167,11
@@
void Bluetooth_Management_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlErrorDuringConfigRead)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlErrorDuringConfigRead)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDS_LED1);
\r
diff --git
a/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.c
b/Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.c
index
075b2d6
..
668421d
100644
(file)
--- a/
Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.c
+++ b/
Demos/Host/Incomplete/PrinterHost/Lib/PrinterCommands.c
@@
-30,6
+30,13
@@
\r
#include "PrinterCommands.h"
\r
\r
\r
#include "PrinterCommands.h"
\r
\r
+/** Sends the given data directly to the printer via the data endpoints, for the sending of print commands in printer
\r
+ * languages accepted by the attached printer (e.g. PCL).
\r
+ *
\r
+ * \param[in] PrinterCommands Pointer to the input buffer containing the printer data to send
\r
+ *
\r
+ * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum
\r
+ */
\r
uint8_t Printer_SendData(char* PrinterCommands)
\r
{
\r
uint8_t ErrorCode;
\r
uint8_t Printer_SendData(char* PrinterCommands)
\r
{
\r
uint8_t ErrorCode;
\r
diff --git
a/Demos/Host/Incomplete/PrinterHost/PrinterHost.c
b/Demos/Host/Incomplete/PrinterHost/PrinterHost.c
index
ea179b6
..
27151a2
100644
(file)
--- a/
Demos/Host/Incomplete/PrinterHost/PrinterHost.c
+++ b/
Demos/Host/Incomplete/PrinterHost/PrinterHost.c
@@
-43,8
+43,7
@@
int main(void)
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Printer Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
for (;;)
\r
{
\r
\r
for (;;)
\r
{
\r
@@
-70,13
+69,13
@@
void SetupHardware(void)
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-84,8
+83,8
@@
void EVENT_USB_HostError(uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-93,9
+92,9
@@
void EVENT_USB_HostError(uint8_t ErrorCode)
\r
void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
\r
{
\r
\r
void EVENT_USB_DeviceEnumerationFailed(uint8_t ErrorCode, uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_RED "Dev Enum Error\r\n"));
\r
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
- printf_P(PSTR(" -- In State %d\r\n"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-121,9
+120,9
@@
void USB_Printer_Host(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
\r
\r
printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
\r
@@
-138,8
+137,8
@@
void USB_Printer_Host(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-164,8
+163,8
@@
void USB_Printer_Host(void)
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- puts_P(PSTR("Control Error (Set Interface).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Set Interface).\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-184,8
+183,8
@@
void USB_Printer_Host(void)
char DeviceIDString[128];
\r
if ((ErrorCode = Printer_GetDeviceID(DeviceIDString, sizeof(DeviceIDString))) != HOST_SENDCONTROL_Successful)
\r
{
\r
char DeviceIDString[128];
\r
if ((ErrorCode = Printer_GetDeviceID(DeviceIDString, sizeof(DeviceIDString))) != HOST_SENDCONTROL_Successful)
\r
{
\r
- puts_P(PSTR("Control Error (Get DeviceID).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get DeviceID).\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-212,8
+211,8
@@
void USB_Printer_Host(void)
\r
if ((ErrorCode = Printer_SendData(PCL_Test_Page)) != PIPE_RWSTREAM_NoError)
\r
{
\r
\r
if ((ErrorCode = Printer_SendData(PCL_Test_Page)) != PIPE_RWSTREAM_NoError)
\r
{
\r
- puts_P(PSTR("Error Sending Test Page.\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Error Sending Test Page.\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/CDCHost/CDCHost.c
b/Demos/Host/LowLevel/CDCHost/CDCHost.c
index
de7ab88
..
7d5195d
100644
(file)
--- a/
Demos/Host/LowLevel/CDCHost/CDCHost.c
+++ b/
Demos/Host/LowLevel/CDCHost/CDCHost.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "CDC Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-138,11
+137,11
@@
void CDC_Host_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-155,8
+154,8
@@
void CDC_Host_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
index
a1b62ac
..
5c0e5c0
100644
(file)
--- a/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
+++ b/
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Generic HID Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Generic HID Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"Device Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-239,11
+238,11
@@
void HID_Host_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-256,8
+255,8
@@
void HID_Host_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index
2517848
..
5d39bf9
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Keyboard HID Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Keyboard HID Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"Device Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-203,11
+202,11
@@
void Keyboard_HID_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-220,8
+219,8
@@
void Keyboard_HID_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-250,8
+249,8
@@
void Keyboard_HID_Task(void)
/* Send the request, display error and wait for device detach if request fails */
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
/* Send the request, display error and wait for device detach if request fails */
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- puts_P(PSTR("Control Error (Set Protocol).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Set Protocol).\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index
2ef15e7
..
e9af225
100644
(file)
--- a/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Keyboard HID Parser Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Keyboard HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-138,11
+137,11
@@
void Keyboard_HID_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-156,8
+155,8
@@
void Keyboard_HID_Task(void)
if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)
\r
\r
{
\r
if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)
\r
\r
{
\r
- puts_P(PSTR("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-175,8
+174,8
@@
void Keyboard_HID_Task(void)
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
- puts_P(PSTR("Report Parse Error.\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Report Parse Error.\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
index
1bb94f6
..
99f116e
100644
(file)
--- a/
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
+++ b/
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
@@
-48,8
+48,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Mass Storage Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-82,7
+81,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-91,7
+90,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-108,8
+107,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-120,10
+119,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-144,11
+143,11
@@
void MassStorage_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-161,8
+160,8
@@
void MassStorage_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-373,14
+372,14
@@
void ShowDiskReadError(char* CommandString, bool FailedAtSCSILayer, uint8_t Erro
if (FailedAtSCSILayer)
\r
{
\r
/* Display the error code */
\r
if (FailedAtSCSILayer)
\r
{
\r
/* Display the error code */
\r
- printf_P(PSTR(ESC_
B
G_RED "SCSI command error (%S).\r\n"), CommandString);
\r
- printf_P(PSTR(" -- Status Code: %d"), ErrorCode);
\r
+ printf_P(PSTR(ESC_
F
G_RED "SCSI command error (%S).\r\n"), CommandString);
\r
+ printf_P(PSTR(" -- Status Code: %d"
ESC_FG_WHITE
), ErrorCode);
\r
}
\r
else
\r
{
\r
/* Display the error code */
\r
}
\r
else
\r
{
\r
/* Display the error code */
\r
- printf_P(PSTR(ESC_
B
G_RED "Command error (%S).\r\n"), CommandString);
\r
- printf_P(PSTR(" -- Error Code: %d"
), ErrorCode);
\r
+ printf_P(PSTR(ESC_
F
G_RED "Command error (%S).\r\n"), CommandString);
\r
+ printf_P(PSTR(" -- Error Code: %d"
ESC_FG_WHITE), ErrorCode);
\r
}
\r
\r
Pipe_Freeze();
\r
}
\r
\r
Pipe_Freeze();
\r
diff --git
a/Demos/Host/LowLevel/MouseHost/MouseHost.c
b/Demos/Host/LowLevel/MouseHost/MouseHost.c
index
d5c4bf9
..
4448586
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHost/MouseHost.c
+++ b/
Demos/Host/LowLevel/MouseHost/MouseHost.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Mouse HID Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Mouse HID Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"Device Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-199,11
+198,11
@@
void Mouse_HID_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-216,8
+215,8
@@
void Mouse_HID_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-246,8
+245,8
@@
void Mouse_HID_Task(void)
/* Send the request, display error and wait for device detach if request fails */
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
/* Send the request, display error and wait for device detach if request fails */
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
{
\r
- puts_P(PSTR("Control Error (Set Protocol).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Set Protocol).\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error status */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index
1e93123
..
2073019
100644
(file)
--- a/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Mouse HID Parser Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Mouse HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-76,7
+75,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-85,7
+84,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"Device Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-102,8
+101,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-114,10
+113,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-139,11
+138,11
@@
void Mouse_HID_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-156,8
+155,8
@@
void Mouse_HID_Task(void)
/* 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
/* 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("Control Error (Set Configuration).\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-175,8
+174,8
@@
void Mouse_HID_Task(void)
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
/* Get and process the device's first HID report descriptor */
\r
if ((ErrorCode = GetHIDReportData()) != ParseSuccessful)
\r
{
\r
- puts_P(PSTR("Report Parse Error.\r\n"));
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(
ESC_FG_RED
"Report Parse Error.\r\n"));
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
index
0f511ad
..
a62c67a
100644
(file)
--- a/
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
+++ b/
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "Still Image Host Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE));
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
\r
@@
-77,7
+76,7
@@
void SetupHardware(void)
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(
"Device Attached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "Device Attached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
\r
}
\r
\r
@@
-86,7
+85,7
@@
void EVENT_USB_DeviceAttached(void)
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
*/
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(
"\r\nDevice Unattached.\r\n"
));
\r
+ puts_P(PSTR(
ESC_FG_GREEN "\r\nDevice Unattached.\r\n" ESC_FG_WHITE
));
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
\r
}
\r
\r
@@
-103,8
+102,8
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
{
\r
USB_ShutDown();
\r
\r
{
\r
USB_ShutDown();
\r
\r
- puts_P(PSTR(ESC_
B
G_RED "Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(ESC_
F
G_RED "Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
for(;;);
\r
@@
-115,10
+114,10
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
B
G_RED "Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
F
G_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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
}
\r
@@
-139,11
+138,11
@@
void StillImage_Task(void)
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
if ((ErrorCode = ProcessConfigurationDescriptor()) != SuccessfulConfigRead)
\r
{
\r
if (ErrorCode == ControlError)
\r
- puts_P(PSTR("Control Error (Get Configuration).\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Control Error (Get Configuration).\r\n"));
\r
else
\r
else
\r
- puts_P(PSTR("Invalid Device.\r\n"));
\r
+ puts_P(PSTR(
ESC_FG_RED
"Invalid Device.\r\n"));
\r
\r
\r
- printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code: %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-156,7
+155,8
@@
void StillImage_Task(void)
/* 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
/* 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("Control error.\r\n"));
\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
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
@@
-372,8
+372,8
@@
void ShowCommandError(uint8_t ErrorCode, bool ResponseCodeError)
{
\r
char* FailureType = ((ResponseCodeError) ? PSTR("Response Code != OK") : PSTR("Transaction Fail"));
\r
\r
{
\r
char* FailureType = ((ResponseCodeError) ? PSTR("Response Code != OK") : PSTR("Transaction Fail"));
\r
\r
- printf_P(PSTR(ESC_
B
G_RED "Command Error (%S).\r\n"), FailureType);
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(ESC_
F
G_RED "Command Error (%S).\r\n"), FailureType);
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
\r
/* Indicate error via status LEDs */
\r
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
\r
diff --git
a/Demos/OTG/TestApp/TestApp.c
b/Demos/OTG/TestApp/TestApp.c
index
778c14b
..
bf84a7e
100644
(file)
--- a/
Demos/OTG/TestApp/TestApp.c
+++ b/
Demos/OTG/TestApp/TestApp.c
@@
-43,8
+43,7
@@
int main(void)
{
\r
SetupHardware();
\r
\r
{
\r
SetupHardware();
\r
\r
- puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY
\r
- "LUFA Demo running.\r\n" ESC_INVERSE_OFF));
\r
+ puts_P(PSTR(ESC_RESET ESC_FG_CYAN "LUFA Demo running.\r\n" ESC_FG_WHITE));
\r
\r
for (;;)
\r
{
\r
\r
for (;;)
\r
{
\r
@@
-148,11
+147,11
@@
void CheckButton(void)
if (USB_IsInitialized == true)
\r
{
\r
USB_ShutDown();
\r
if (USB_IsInitialized == true)
\r
{
\r
USB_ShutDown();
\r
- puts_P(PSTR(ESC_
BG_WHITE "USB Power Off.\r\n"
));
\r
+ puts_P(PSTR(ESC_
FG_YELLOW "USB Power Off.\r\n" ESC_FG_WHITE
));
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- puts_P(PSTR(ESC_
BG_YELLOW "USB Power On.\r\n"));
\r
+ puts_P(PSTR(ESC_
FG_YELLOW "USB Power On.\r\n" ESC_FG_WHITE));
\r
USB_Init(USB_MODE_UID, USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL);
\r
}
\r
}
\r
USB_Init(USB_MODE_UID, USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL);
\r
}
\r
}
\r
diff --git
a/Demos/OTG/TestApp/TestEvents.c
b/Demos/OTG/TestApp/TestEvents.c
index
9b09147
..
d0bc805
100644
(file)
--- a/
Demos/OTG/TestApp/TestEvents.c
+++ b/
Demos/OTG/TestApp/TestEvents.c
@@
-50,26
+50,26
@@
static void Abort_Program(void)
\r
LEDs_SetAllLEDs(LEDS_LED1 | LEDS_LED3);
\r
\r
\r
LEDs_SetAllLEDs(LEDS_LED1 | LEDS_LED3);
\r
\r
- puts_P(PSTR(ESC_
INVERSE_ON "\r\n**PROGRAM ABORT**"
));
\r
+ puts_P(PSTR(ESC_
FG_RED ESC_INVERSE_ON "\r\n**PROGRAM ABORT**" ESC_FG_WHITE
));
\r
for (;;);
\r
}
\r
\r
/** Event handler for the USB_VBUSChange event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSChange(void)
\r
{
\r
for (;;);
\r
}
\r
\r
/** Event handler for the USB_VBUSChange event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSChange(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "VBUS Change\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "VBUS Change\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_VBUSConnect event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSConnect(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_VBUSConnect event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSConnect(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "VBUS +\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "VBUS +\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_VBUSDisconnect event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSDisconnect(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_VBUSDisconnect event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_VBUSDisconnect(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "VBUS -\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "VBUS -\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-78,7
+78,7
@@
void EVENT_USB_VBUSDisconnect(void)
*/
\r
void EVENT_USB_Connect(void)
\r
{
\r
*/
\r
void EVENT_USB_Connect(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "USB +\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "USB +\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-87,25
+87,25
@@
void EVENT_USB_Connect(void)
*/
\r
void EVENT_USB_Disconnect(void)
\r
{
\r
*/
\r
void EVENT_USB_Disconnect(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "USB -\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "USB -\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_Suspend event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_Suspend(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_Suspend event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_Suspend(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_YELLOW "USB Sleep\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "USB Sleep\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_WakeUp event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_WakeUp(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_WakeUp event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_WakeUp(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_GREEN "USB Wakeup\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "USB Wakeup\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_Reset event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_Reset(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_Reset event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_Reset(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "USB Reset\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "USB Reset\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_UIDChange event. When fired, the event is logged to the USART. */
\r
}
\r
\r
/** Event handler for the USB_UIDChange event. When fired, the event is logged to the USART. */
\r
@@
-113,7
+113,7
@@
void EVENT_USB_UIDChange(void)
{
\r
char* ModeStrPtr;
\r
\r
{
\r
char* ModeStrPtr;
\r
\r
- puts_P(PSTR(EVENT_PREFIX "UID Change\r\n"));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW E
VENT_PREFIX "UID Change\r\n"));
\r
\r
if (USB_CurrentMode == USB_MODE_DEVICE)
\r
ModeStrPtr = PSTR("HOST");
\r
\r
if (USB_CurrentMode == USB_MODE_DEVICE)
\r
ModeStrPtr = PSTR("HOST");
\r
@@
-122,7
+122,7
@@
void EVENT_USB_UIDChange(void)
else
\r
ModeStrPtr = PSTR("N/A");
\r
\r
else
\r
ModeStrPtr = PSTR("N/A");
\r
\r
- printf_P(PSTR(" -- New Mode %S\r\n"), ModeStrPtr);
\r
+ printf_P(PSTR(" -- New Mode %S\r\n"
ESC_FG_WHITE
), ModeStrPtr);
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-133,7
+133,7
@@
void EVENT_USB_InitFailure(const uint8_t ErrorCode)
{
\r
char* ModeStrPtr;
\r
\r
{
\r
char* ModeStrPtr;
\r
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_RED
"Power On Fail\r\n"));
\r
+ puts_P(PSTR(E
SC_FG_RED EVENT_PREFIX
"Power On Fail\r\n"));
\r
\r
if (USB_CurrentMode == USB_MODE_DEVICE)
\r
ModeStrPtr = PSTR("DEVICE");
\r
\r
if (USB_CurrentMode == USB_MODE_DEVICE)
\r
ModeStrPtr = PSTR("DEVICE");
\r
@@
-143,7
+143,7
@@
void EVENT_USB_InitFailure(const uint8_t ErrorCode)
ModeStrPtr = PSTR("N/A");
\r
\r
printf_P(PSTR(" -- Mode %S\r\n"), ModeStrPtr);
\r
ModeStrPtr = PSTR("N/A");
\r
\r
printf_P(PSTR(" -- Mode %S\r\n"), ModeStrPtr);
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
Abort_Program();
\r
}
\r
\r
Abort_Program();
\r
}
\r
@@
-154,8
+154,8
@@
void EVENT_USB_InitFailure(const uint8_t ErrorCode)
*/
\r
void EVENT_USB_HostError(const uint8_t ErrorCode)
\r
{
\r
*/
\r
void EVENT_USB_HostError(const uint8_t ErrorCode)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_RED
"Host Mode Error\r\n"));
\r
- printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode);
\r
+ puts_P(PSTR(E
SC_FG_RED EVENT_PREFIX
"Host Mode Error\r\n"));
\r
+ printf_P(PSTR(" -- Error Code %d\r\n"
ESC_FG_WHITE
), ErrorCode);
\r
\r
Abort_Program();
\r
}
\r
\r
Abort_Program();
\r
}
\r
@@
-163,41
+163,41
@@
void EVENT_USB_HostError(const uint8_t ErrorCode)
/** Event handler for the USB_DeviceEnumerationFailed event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
/** Event handler for the USB_DeviceEnumerationFailed event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
\r
{
\r
- puts_P(PSTR(ESC_
BG_RED
"Dev Enum Error\r\n"));
\r
+ puts_P(PSTR(ESC_
FG_RED EVENT_PREFIX
"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(" -- 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"), USB_HostState);
\r
+ printf_P(PSTR(" -- In State %d\r\n"
ESC_FG_WHITE
), USB_HostState);
\r
}
\r
\r
/** Event handler for the USB_UnhandledControlPacket event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_UnhandledControlPacket(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_UnhandledControlPacket event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_UnhandledControlPacket(void)
\r
{
\r
- puts_P(PSTR(EVENT_PREFIX "Ctrl Request\r\n"));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW E
VENT_PREFIX "Ctrl Request\r\n"));
\r
printf_P(PSTR(" -- Req Data %d\r\n"), USB_ControlRequest.bRequest);
\r
printf_P(PSTR(" -- Req Type %d\r\n"), USB_ControlRequest.bmRequestType);
\r
printf_P(PSTR(" -- Req Data %d\r\n"), USB_ControlRequest.bRequest);
\r
printf_P(PSTR(" -- Req Type %d\r\n"), USB_ControlRequest.bmRequestType);
\r
- printf_P(PSTR(" -- Req Length %d\r\n"), USB_ControlRequest.wLength);
\r
+ printf_P(PSTR(" -- Req Length %d\r\n"
ESC_FG_WHITE
), USB_ControlRequest.wLength);
\r
}
\r
\r
/** Event handler for the USB_ConfigurationChanged event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_ConfigurationChanged(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_ConfigurationChanged event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_ConfigurationChanged(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "Configuration Number Changed\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "Configuration Number Changed\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_DeviceAttached event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_DeviceAttached event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceAttached(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_GREEN "Device +\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_GREEN EVENT_PREFIX "Device +\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_DeviceUnattached event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_DeviceUnattached event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceUnattached(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX ESC_BG_YELLOW "Device -\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_GREEN EVENT_PREFIX "Device -\r\n" ESC_FG_WHITE
));
\r
}
\r
\r
/** Event handler for the USB_DeviceEnumerationComplete event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceEnumerationComplete(void)
\r
{
\r
}
\r
\r
/** Event handler for the USB_DeviceEnumerationComplete event. When fired, the event is logged to the USART. */
\r
void EVENT_USB_DeviceEnumerationComplete(void)
\r
{
\r
- puts_P(PSTR(E
VENT_PREFIX "Device Enumeration Complete\r\n"
));
\r
+ puts_P(PSTR(E
SC_FG_YELLOW EVENT_PREFIX "Device Enumeration Complete\r\n" ESC_FG_WHITE
));
\r
}
\r
}
\r