Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Kasprzak
tinyboard
Commits
56ad7e84
Commit
56ad7e84
authored
May 10, 2013
by
Jan Kasprzak
Browse files
Watchdog handling moved to its own source file
parent
aea7cb9a
Changes
4
Hide whitespace changes
Inline
Side-by-side
projects/step-up/Makefile
View file @
56ad7e84
PROGRAM
=
lights
SRC
=
main.c logging.c pwm.c adc.c pwmled.c pattern.c buttons.c control.c
\
battery.c
battery.c
wdt.c
OBJ
=
$(SRC:.c=.o)
...
...
projects/step-up/lights.h
View file @
56ad7e84
...
...
@@ -75,6 +75,10 @@ pattern_t *status_led_pattern_select();
#define ERR_PWMLED 2
void
set_error
(
unsigned
char
err
);
/* wdt.c */
void
init_wdt
();
void
susp_wdt
();
/* main.c */
void
power_down
();
...
...
projects/step-up/main.c
View file @
56ad7e84
...
...
@@ -11,11 +11,10 @@ static void hw_setup()
{
power_all_disable
();
wdt_enable
(
WDTO_1S
);
init_battery
();
init_pwm
();
init_adc
();
init_wdt
();
init_buttons
();
...
...
@@ -30,9 +29,10 @@ static void hw_suspend()
{
susp_pwm
();
susp_adc
();
susp_wdt
();
susp_buttons
();
wdt_disable
();
power_all_disable
();
}
...
...
projects/step-up/wdt.c
0 → 100644
View file @
56ad7e84
#include
<avr/io.h>
#include
<avr/interrupt.h>
#include
<avr/wdt.h>
#include
"lights.h"
void
init_wdt
()
{
wdt_enable
(
WDTO_1S
);
}
void
susp_wdt
()
{
wdt_disable
();
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment