greenhouse
source
tasks
jukebox_task.cpp
Go to the documentation of this file.
1
#include "
jukebox_task.h
"
2
#include "
jukebox.h
"
3
4
InterruptIn
button
(D2);
5
6
void
_button_handler
() {
7
if
(
Jukebox::is_playing
()) {
8
Jukebox::stop
();
9
return
;
10
}
11
12
Jukebox::play
();
13
}
14
15
void
Tasks::Jukebox::start
() {
16
button
.rise(
_button_handler
);
17
}
Tasks::Jukebox::start
void start()
Definition:
jukebox_task.cpp:15
jukebox.h
button
InterruptIn button(D2)
_button_handler
void _button_handler()
Definition:
jukebox_task.cpp:6
jukebox_task.h
Jukebox::is_playing
bool is_playing()
Definition:
jukebox.cpp:137
Jukebox::stop
void stop()
Definition:
jukebox.cpp:132
Jukebox::play
void play()
Definition:
jukebox.cpp:97
Generated on Mon Aug 16 2021 20:30:21 for greenhouse by
1.9.1