aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Benito
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-08-05 13:16:36 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-08-05 13:16:36 +0000
commit99c447c754e0b238aca99ac772b5dabb78fc8b48 (patch)
treece5a2f7855fed8676f4633f7d765075cec305e76 /Projects/Benito
parent4421782b7fb49e160b1c18f2295e6cd1f0b00c04 (diff)
downloadlufa-99c447c754e0b238aca99ac772b5dabb78fc8b48.tar.gz
lufa-99c447c754e0b238aca99ac772b5dabb78fc8b48.tar.bz2
lufa-99c447c754e0b238aca99ac772b5dabb78fc8b48.zip
Fixed issue in USBtoSerial demos where the USART Rx line was not having its pullup enabled at startup, leading to noise being received from the Rx pin when left floating.
Removed unused relative Common.h header include from the DriverStubs board stub drivers. Fixed Benito programmer, use the correct LED functions where needed to ensure correct status display at all times.
Diffstat (limited to 'Projects/Benito')
-rw-r--r--Projects/Benito/Benito.c13
-rw-r--r--Projects/Benito/Benito.h2
-rw-r--r--Projects/Benito/makefile2
3 files changed, 10 insertions, 7 deletions
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index d7e0413a6..100c897fa 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -141,6 +141,7 @@ void SetupHardware(void)
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
+ Serial_Init(9600, false);
LEDs_Init();
USB_Init();
@@ -165,17 +166,17 @@ void EVENT_USB_Device_Connect(void)
void EVENT_USB_Device_Disconnect(void)
{
PingPongMSRemaining = 0;
- LEDs_TurnOffLEDs(LEDMASK_BUSY);
+ LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
PingPongMSRemaining = 0;
- LEDs_TurnOffLEDs(LEDMASK_BUSY);
+ LEDs_SetAllLEDs(LEDS_NO_LEDS);
if (!(CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface)))
- LEDs_TurnOnLEDs(LEDMASK_ERROR);
+ LEDs_SetAllLEDs(LEDMASK_ERROR);
}
/** Event handler for the library USB Unhandled Control Request event. */
@@ -233,9 +234,9 @@ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const C
/* Check if the DTR line has been asserted - if so, start the target AVR's reset pulse */
if (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR)
{
- LEDs_TurnOnLEDs(LEDMASK_BUSY);
+ LEDs_SetAllLEDs(LEDMASK_BUSY);
- AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK;
- ResetPulseMSRemaining = AVR_RESET_PULSE_MS;
+ AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK;
+ ResetPulseMSRemaining = AVR_RESET_PULSE_MS;
}
}
diff --git a/Projects/Benito/Benito.h b/Projects/Benito/Benito.h
index 3b0dfcd2c..daf8315b2 100644
--- a/Projects/Benito/Benito.h
+++ b/Projects/Benito/Benito.h
@@ -57,8 +57,10 @@
/** LED mask for the library LED driver, to indicate RX activity. */
#define LEDMASK_RX LEDS_LED2
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2)
+ /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
#define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2)
/* Function Prototypes: */
diff --git a/Projects/Benito/makefile b/Projects/Benito/makefile
index 88c62e9e8..227012b16 100644
--- a/Projects/Benito/makefile
+++ b/Projects/Benito/makefile
@@ -66,7 +66,7 @@ MCU = at90usb162
# Target board (see library "Board Types" documentation, USER or blank for projects not requiring
# LUFA board drivers). If USER is selected, put custom board drivers in a directory called
# "Board" inside the application directory.
-BOARD = USBKEY
+BOARD = USER
# Processor frequency.