Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
attiny44a_blink
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
attiny44a_blink
Commits
6970b603
Commit
6970b603
authored
6 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Fix comments
parent
0a8a3529
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
button_contact.c
+1
-2
1 addition, 2 deletions
button_contact.c
button_toggle.c
+0
-1
0 additions, 1 deletion
button_toggle.c
with
1 addition
and
3 deletions
button_contact.c
+
1
−
2
View file @
6970b603
...
...
@@ -7,13 +7,12 @@ int main(void) {
// Configure led_pin as an output.
DDRB
|=
led_pin
;
// Configure button_pin as an
out
put.
// Configure button_pin as an
in
put.
DDRA
&=
~
button_pin
;
// Activate button_pin's pullup resistor.
PORTA
|=
button_pin
;
// Nothing left to do, so just spin.
while
(
1
)
{
// Turn on the LED when the button is pressed.
if
(
PINA
&
button_pin
)
{
...
...
This diff is collapsed.
Click to expand it.
button_toggle.c
+
0
−
1
View file @
6970b603
...
...
@@ -23,7 +23,6 @@ int main(void) {
int
bouncy_switch_state
=
0
;
int
debounced_switch_state
=
0
;
// Nothing left to do, so just spin.
while
(
1
)
{
// Use the timer to count how long it's been since button_pin changed state.
if
((
PINA
&
button_pin
)
!=
bouncy_switch_state
)
{
...
...
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