Skip to content
Snippets Groups Projects
Commit 2a0c28e6 authored by Dean Camera's avatar Dean Camera
Browse files

Minor updates to the Benito programmer - remove redundant PORT register manipulations.

parent 06f3a6a8
Branches
Tags
No related merge requests found
...@@ -105,10 +105,7 @@ int main(void) ...@@ -105,10 +105,7 @@ int main(void)
{ {
/* Check if the reset pulse period has elapsed, if so tristate the target reset line */ /* Check if the reset pulse period has elapsed, if so tristate the target reset line */
if (ResetPulseMSRemaining && !(--ResetPulseMSRemaining)) 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 */ /* Turn off TX LED(s) once the TX pulse period has elapsed */
if (TxPulseMSRemaining && !(--TxPulseMSRemaining)) if (TxPulseMSRemaining && !(--TxPulseMSRemaining))
...@@ -228,8 +225,6 @@ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const C ...@@ -228,8 +225,6 @@ void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const C
if (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR) if (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR)
{ {
AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK; AVR_RESET_LINE_DDR |= AVR_RESET_LINE_MASK;
AVR_RESET_LINE_PORT &= ~AVR_RESET_LINE_MASK;
ResetPulseMSRemaining = AVR_RESET_PULSE_MS; ResetPulseMSRemaining = AVR_RESET_PULSE_MS;
} }
} }
...@@ -60,9 +60,13 @@ ...@@ -60,9 +60,13 @@
/** LED mask for the library LED driver, to indicate that the USB interface is ready. */ /** LED mask for the library LED driver, to indicate that the USB interface is ready. */
#define LEDMASK_USB_READY LEDS_NO_LEDS #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) #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED2)
/** LED mask for the library LED driver, to indicate TX activity. */
#define LEDMASK_TX LEDS_LED1 #define LEDMASK_TX LEDS_LED1
/** LED mask for the library LED driver, to indicate RX activity. */
#define LEDMASK_RX LEDS_LED2 #define LEDMASK_RX LEDS_LED2
/* Function Prototypes: */ /* Function Prototypes: */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment