buzzer: fix simulator build, refactor sequence_length.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "watch_buzzer.h"
|
||||
#include "watch_private_buzzer.h"
|
||||
#include "../../../watch-library/hardware/include/saml22j18a.h"
|
||||
#include "../../../watch-library/hardware/include/component/tc.h"
|
||||
#include "../../../watch-library/hardware/hri/hri_tc_l22.h"
|
||||
@@ -90,15 +91,6 @@ void watch_buzzer_play_sequence(int8_t *note_sequence, void (*callback_on_end)(v
|
||||
_tc3_start();
|
||||
}
|
||||
|
||||
uint16_t sequence_length(int8_t *sequence) {
|
||||
uint16_t result = 0;
|
||||
int i = 0;
|
||||
while (sequence[i++]) {
|
||||
result += sequence[i++];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void cb_watch_buzzer_seq(void) {
|
||||
// callback for reading the note sequence
|
||||
if (_tone_ticks == 0) {
|
||||
|
||||
Reference in New Issue
Block a user