aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-07-23 14:11:20 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-07-23 14:11:20 +0000
commit2a0c28e6e47c8a173f32fc99cd8666a2633c5c12 (patch)
tree9c8b03802e2d4662e63bb8dd23b5dc9ad2f77aa0
parent06f3a6a876abb4911fbf205daeacbb33c4c0f92a (diff)
downloadlufa-2a0c28e6e47c8a173f32fc99cd8666a2633c5c12.tar.gz
lufa-2a0c28e6e47c8a173f32fc99cd8666a2633c5c12.tar.bz2
lufa-2a0c28e6e47c8a173f32fc99cd8666a2633c5c12.zip
Minor updates to the Benito programmer - remove redundant PORT register manipulations.
-rw-r--r--Projects/Benito/Benito.c11
-rw-r--r--Projects/Benito/Benito.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index 712016bc0..720a2245d 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -105,10 +105,7 @@ int main(void)
{
/* Check if the reset pulse period has elapsed, if so tristate the target reset line */
if (ResetPulseMSRemaining && !(--ResetPulseMSRemaining))
- {
- AVR_RESET_LINE_PORT &= ~AVR_RESET_LINE_MASK;
- AVR_RESET_LINE_DDR &= ~AVR_RESET_LINE_MASK;
- }
+ AVR_RESET_LINE_DDR &= ~AVR_RESET_LINE_MASK;
/* Turn off TX LED(s) once the TX pulse period has elapsed */
if (TxPulseMSRemaining && !(--TxPulseMSRemaining))
@@ -212,7 +209,7 @@ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCI
break;
}
- UCSR1A = (1 << U2X1);
+ UCSR1A = (1 << U2X1);
UCSR1B = ((1 << TXEN1) | (1 << RXEN1));
UCSR1C = ConfigMask;
UBRR1 = SERIAL_2X_UBBRVAL((uint16_t)CDCInterfaceInfo->State.LineEncoding.BaudRateBPS);
@@ -227,9 +224,7 @@ 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)
{
- AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK;
- AVR_RESET_LINE_PORT &= ~AVR_RESET_LINE_MASK;
-
+ 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 2651c2d53..5eefd7aeb 100644
--- a/Projects/Benito/Benito.h
+++ b/Projects/Benito/Benito.h
@@ -60,9 +60,13 @@
/** LED mask for the library LED driver, to indicate that the USB interface is ready. */
#define LEDMASK_USB_READY LEDS_NO_LEDS
+ /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED2)
+ /** LED mask for the library LED driver, to indicate TX activity. */
#define LEDMASK_TX LEDS_LED1
+
+ /** LED mask for the library LED driver, to indicate RX activity. */
#define LEDMASK_RX LEDS_LED2
/* Function Prototypes: */