diff options
Diffstat (limited to 'Projects/SerialToLCD')
-rw-r--r-- | Projects/SerialToLCD/SerialToLCD.c | 8 | ||||
-rw-r--r-- | Projects/SerialToLCD/SerialToLCD.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Projects/SerialToLCD/SerialToLCD.c b/Projects/SerialToLCD/SerialToLCD.c index 385bcdee3..aac4fadfb 100644 --- a/Projects/SerialToLCD/SerialToLCD.c +++ b/Projects/SerialToLCD/SerialToLCD.c @@ -29,7 +29,7 @@ this software. */ -/** \file +/** \file * * Main source file for the SerialToLCD program. This file contains the main tasks of * the project and is responsible for the initial application hardware configuration. @@ -101,7 +101,7 @@ int main(void) { static uint8_t EscapePending = 0; int16_t HD44780Byte = RingBuffer_Remove(&FromHost_Buffer); - + if (HD44780Byte == COMMAND_ESCAPE) { if (EscapePending) @@ -137,12 +137,14 @@ int main(void) /** Configures the board hardware and chip peripherals for the application's functionality. */ void SetupHardware(void) { +#if (ARCH == ARCH_AVR8) /* Disable watchdog if enabled by bootloader/fuses */ MCUSR &= ~(1 << WDRF); wdt_disable(); /* Disable clock division */ clock_prescale_set(clock_div_1); +#endif /* Hardware Initialization */ USB_Init(); @@ -150,7 +152,7 @@ void SetupHardware(void) /* Power up the HD44780 Interface */ HD44780_Initialize(); HD44780_WriteCommand(CMD_DISPLAY_ON); - + /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */ TCCR0B = (1 << CS02); } diff --git a/Projects/SerialToLCD/SerialToLCD.h b/Projects/SerialToLCD/SerialToLCD.h index b67b84cf7..22537d609 100644 --- a/Projects/SerialToLCD/SerialToLCD.h +++ b/Projects/SerialToLCD/SerialToLCD.h @@ -49,7 +49,8 @@ #include <LUFA/Version.h> #include <LUFA/Drivers/Misc/RingBuffer.h> #include <LUFA/Drivers/USB/USB.h> - + #include <LUFA/Platform/Platform.h> + /* Macros: */ #define COMMAND_ESCAPE 0x1B |