Skip to content

Commit 7437f4c

Browse files
committed
feat: voice proto
1 parent 7d00831 commit 7437f4c

File tree

5 files changed

+5842
-0
lines changed

5 files changed

+5842
-0
lines changed

helpers/flipchess_voice.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "flipchess_voice.h"
2+
#include <furi.h>
3+
#include <furi_hal.h>
4+
#include "../sam/stm32_sam.h"
5+
STM32SAM voice;
6+
7+
int32_t flipchess_voice_game(void* p) {
8+
UNUSED(p);
9+
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(1000)) {
10+
voice.begin();
11+
voice.say("SHAAL WE PLAY AY GAME?");
12+
furi_hal_speaker_release();
13+
}
14+
return 0;
15+
}
16+
17+
int32_t flipchess_voice_no(void* p) {
18+
UNUSED(p);
19+
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(1000)) {
20+
voice.begin();
21+
voice.say("No");
22+
furi_hal_speaker_release();
23+
}
24+
return 0;
25+
}

helpers/flipchess_voice.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <stdint.h>
2+
3+
#ifdef __cplusplus
4+
#define EXTERNC extern "C"
5+
#else
6+
#define EXTERNC
7+
#endif
8+
9+
EXTERNC int32_t flipchess_voice_game(void* p);
10+
EXTERNC int32_t flipchess_voice_no(void* p);
11+
12+
#undef EXTERNC

0 commit comments

Comments
 (0)