Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
2a0c28e6
Commit
2a0c28e6
authored
15 years ago
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Minor updates to the Benito programmer - remove redundant PORT register manipulations.
parent
06f3a6a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Projects/Benito/Benito.c
+3
-8
3 additions, 8 deletions
Projects/Benito/Benito.c
Projects/Benito/Benito.h
+4
-0
4 additions, 0 deletions
Projects/Benito/Benito.h
with
7 additions
and
8 deletions
Projects/Benito/Benito.c
+
3
−
8
View file @
2a0c28e6
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Projects/Benito/Benito.h
+
4
−
0
View file @
2a0c28e6
...
...
@@ -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: */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment