aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/SerialToLCD
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-05-19 22:28:02 +0200
committerDean Camera <dean@fourwalledcubicle.com>2013-05-19 22:28:02 +0200
commit65a8d68c5708c8bc87628d9a25cf0a9d951379ea (patch)
tree6f1474a96020667da31c09264fa12a99a023f998 /Projects/SerialToLCD
parent139fabb6cdc36bf5259ec2c587f337b106a1c47f (diff)
downloadlufa-65a8d68c5708c8bc87628d9a25cf0a9d951379ea.tar.gz
lufa-65a8d68c5708c8bc87628d9a25cf0a9d951379ea.tar.bz2
lufa-65a8d68c5708c8bc87628d9a25cf0a9d951379ea.zip
Pseudo-port the projects and dual role demos for possible later multi-arch support.
Diffstat (limited to 'Projects/SerialToLCD')
-rw-r--r--Projects/SerialToLCD/SerialToLCD.c8
-rw-r--r--Projects/SerialToLCD/SerialToLCD.h3
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