summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/soc/i2s.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/soc/i2s.h')
-rw-r--r--fw/fe310/eos/soc/i2s.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/fw/fe310/eos/soc/i2s.h b/fw/fe310/eos/soc/i2s.h
index e2155a4..ef2b966 100644
--- a/fw/fe310/eos/soc/i2s.h
+++ b/fw/fe310/eos/soc/i2s.h
@@ -1,6 +1,7 @@
#include <stdint.h>
#include "i2s_def.h"
+#include "../event.h"
#define EOS_I2S_MODE_STEREO 0
#define EOS_I2S_MODE_MONO_L 1
@@ -13,15 +14,13 @@ typedef struct EOSABuf {
uint16_t *array;
} EOSABuf;
-typedef void (*eos_i2s_handler_t) (unsigned char);
-
int eos_i2s_init(void);
int eos_i2s_start(uint32_t sample_rate, int mode);
void eos_i2s_stop(void);
int eos_i2s_running(void);
int eos_i2s_set_lsgain(int gain);
-void eos_i2s_mic_set_handler(eos_i2s_handler_t handler, uint16_t wm);
+void eos_i2s_mic_set_handler(eos_evt_simple_handler_t handler, uint16_t wm);
void eos_i2s_mic_set_buf(uint16_t *mic_arr, uint16_t mic_arr_size);
uint16_t *eos_i2s_mic_get_buf(void);
uint16_t eos_i2s_mic_len(void);
@@ -30,7 +29,7 @@ int eos_i2s_mic_pop(uint16_t *sample);
int eos_i2s_mic_get_vol(void);
void eos_i2s_mic_set_vol(int vol);
-void eos_i2s_spk_set_handler(eos_i2s_handler_t handler, uint16_t wm);
+void eos_i2s_spk_set_handler(eos_evt_simple_handler_t handler, uint16_t wm);
void eos_i2s_spk_set_buf(uint16_t *spk_arr, uint16_t spk_arr_size);
uint16_t *eos_i2s_spk_get_buf(void);
uint16_t eos_i2s_spk_len(void);