summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/soc/i2s.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2026-01-07 22:58:33 +0100
committerUros Majstorovic <majstor@majstor.org>2026-01-07 22:58:33 +0100
commit46b08fc235f3f068034355970697acc0956e5c99 (patch)
tree96e2bde5d95c295a57afae353684a25544fb09fa /fw/fe310/eos/soc/i2s.h
parent285ddd410a559449b7e2cbab9b2b10e850efbd08 (diff)
introduced EOSMessage struct for SPI and Event queue messages; added APP <-> FE310 bridge SPI messages; LCD/touch panel driver for app module; save relevant state to AON module before sleep;
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);