diff options
Diffstat (limited to 'fw/fe310/eos/soc/i2s.h')
-rw-r--r-- | fw/fe310/eos/soc/i2s.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fw/fe310/eos/soc/i2s.h b/fw/fe310/eos/soc/i2s.h index a5a67df..c5e92b7 100644 --- a/fw/fe310/eos/soc/i2s.h +++ b/fw/fe310/eos/soc/i2s.h @@ -18,20 +18,22 @@ void eos_i2s_stop(void); int eos_i2s_running(void); void eos_i2s_set_fmt(unsigned char fmt); void eos_i2s_set_mode(unsigned char mode); -void eos_i2s_mic_init(uint8_t *mic_arr, uint16_t mic_arr_size); -void eos_i2s_mic_set_handler(eos_i2s_handler_t wm_handler); -void eos_i2s_mic_set_wm(uint16_t wm); + +void eos_i2s_mic_set_handler(eos_i2s_handler_t handler, uint16_t wm); +void eos_i2s_mic_set_buf(uint8_t *mic_arr, uint16_t mic_arr_size); +uint8_t *eos_i2s_mic_get_buf(void); uint16_t eos_i2s_mic_len(void); uint16_t eos_i2s_mic_read(uint8_t *sample, uint16_t ssize); int eos_i2s_mic_pop8(uint8_t *sample); int eos_i2s_mic_pop16(uint16_t *sample); int eos_i2s_mic_get_vol(void); void eos_i2s_mic_set_vol(int vol); -void eos_i2s_spk_init(uint8_t *mic_arr, uint16_t mic_arr_size); -void eos_i2s_spk_set_handler(eos_i2s_handler_t wm_handler); -void eos_i2s_spk_set_wm(uint16_t wm); + +void eos_i2s_spk_set_handler(eos_i2s_handler_t handler, uint16_t wm); +void eos_i2s_spk_set_buf(uint8_t *spk_arr, uint16_t spk_arr_size); +uint8_t *eos_i2s_spk_get_buf(void); uint16_t eos_i2s_spk_len(void); -uint16_t eos_i2s_spk_write(uint8_t *sample, uint16_t ssize); +uint16_t eos_i2s_spk_write(uint8_t *sample, uint16_t ssize, uint8_t transform); int eos_i2s_spk_push8(uint8_t sample); int eos_i2s_spk_push16(uint16_t sample); int eos_i2s_spk_get_vol(void); |