Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benedikt Wildenhain
tests
Commits
45fadd58
Verified
Commit
45fadd58
authored
8 years ago
by
Benedikt Wildenhain
Browse files
Options
Downloads
Patches
Plain Diff
init
parents
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
arduino/led.c
+20
-0
20 additions, 0 deletions
arduino/led.c
arduino/led.sh
+5
-0
5 additions, 0 deletions
arduino/led.sh
with
25 additions
and
0 deletions
arduino/led.c
0 → 100644
+
20
−
0
View file @
45fadd58
#include
<avr/io.h>
#include
<util/delay.h>
#define BLINK_DELAY_MS 1000
int
main
(
void
)
{
/* set pin 5 of PORTB for output*/
DDRB
|=
_BV
(
DDB5
);
while
(
1
)
{
/* set pin 5 high to turn led on */
PORTB
|=
_BV
(
PORTB5
);
_delay_ms
(
BLINK_DELAY_MS
);
/* set pin 5 low to turn led off */
PORTB
&=
~
_BV
(
PORTB5
);
_delay_ms
(
BLINK_DELAY_MS
);
}
}
This diff is collapsed.
Click to expand it.
arduino/led.sh
0 → 100644
+
5
−
0
View file @
45fadd58
avr-gcc
-Os
-DF_CPU
=
16000000UL
-mmcu
=
atmega328p
-c
-o
led.o led.c
avr-gcc
-mmcu
=
atmega328p led.o
-o
led
avr-objcopy
-O
ihex
-R
.eeprom led led.hex
avrdude
-F
-V
-c
arduino
-p
ATMEGA328P
-P
/dev/ttyACM0
-b
115200
-U
flash:w:led.hex
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