aboutsummaryrefslogtreecommitdiff
path: root/board/simple_board.h
diff options
context:
space:
mode:
Diffstat (limited to 'board/simple_board.h')
-rw-r--r--board/simple_board.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/board/simple_board.h b/board/simple_board.h
index 9d9836b..f0997c7 100644
--- a/board/simple_board.h
+++ b/board/simple_board.h
@@ -2,17 +2,20 @@
static struct board_data board_data;
+#define WAV_LEN(W) PREPROC_CONCAT(W,_len)
+#define PREPROC_CONCAT(A, B) A ## B
+
void board_on_down(void)
{
#ifdef BOARD_DOWN_WAV
- board_data.sound_play(BOARD_DOWN_WAV);
+ board_data.sound_play(BOARD_DOWN_WAV, WAV_LEN(BOARD_DOWN_WAV));
#endif
}
void board_on_up(void)
{
#ifdef BOARD_UP_WAV
- board_data.sound_play(BOARD_UP_WAV);
+ board_data.sound_play(BOARD_UP_WAV, WAV_LEN(BOARD_UP_WAV));
#endif
}
@@ -30,4 +33,4 @@ struct board *board_init(struct board_data data)
{
board_data = data;
return &board;
-} \ No newline at end of file
+}