From cc879df4f014e403e57caca50a5791c996c0d79c Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 19 Jul 2009 13:08:48 +0000 Subject: Use sane ANSI terminal escape codes for the Host mode demos, so that they do not cause eye-searing, unreadable text on terminals which parse the escape codes properly. --- Demos/Host/ClassDriver/CDCHost/CDCHost.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Demos/Host/ClassDriver/CDCHost') diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c index eb45afe80..46b4f6f3f 100644 --- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c +++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c @@ -62,8 +62,7 @@ int main(void) { SetupHardware(); - puts_P(PSTR(ESC_RESET ESC_BG_WHITE ESC_INVERSE_ON ESC_ERASE_DISPLAY - "CDC Host Demo running.\r\n" ESC_INVERSE_OFF)); + puts_P(PSTR(ESC_RESET "CDC Host Demo running.\r\n")); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); @@ -136,7 +135,7 @@ void EVENT_USB_HostError(const uint8_t ErrorCode) { USB_ShutDown(); - puts_P(PSTR(ESC_BG_RED "Host Mode Error\r\n")); + puts_P(PSTR(ESC_FG_RED "Host Mode Error\r\n" ESC_FG_WHITE)); printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode); LEDs_SetAllLEDs(LEDMASK_USB_ERROR); @@ -148,10 +147,10 @@ void EVENT_USB_HostError(const uint8_t ErrorCode) */ void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode) { - puts_P(PSTR(ESC_BG_RED "Dev Enum Error\r\n")); + puts_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n")); printf_P(PSTR(" -- Error Code %d\r\n"), ErrorCode); printf_P(PSTR(" -- Sub Error Code %d\r\n"), SubErrorCode); - printf_P(PSTR(" -- In State %d\r\n"), USB_HostState); + printf_P(PSTR(" -- In State %d\r\n" ESC_FG_WHITE), USB_HostState); LEDs_SetAllLEDs(LEDMASK_USB_ERROR); } -- cgit v1.2.3