mirror of https://github.com/arendst/Tasmota.git
add setgain
This commit is contained in:
parent
a97c5d8dae
commit
7831c72be5
|
@ -95,4 +95,11 @@ esp_err_t es7243e_adc_init(TwoWire *tw, audio_hal_codec_config_t *codec_cfg)
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void es7243e_setgain(uint8_t gain) {
|
||||||
|
uint8_t gaintab[8] = {0x10, 0x12, 0x20, 0x22, 0x04, 0x40, 0x06, 0x42};
|
||||||
|
es7243e_write_reg(0x08, gaintab[gain & 7] | 0x09);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -72,6 +72,7 @@ esp_err_t es7243e_adc_init(TwoWire *tw, audio_hal_codec_config_t *codec_cfg);
|
||||||
*/
|
*/
|
||||||
// esp_err_t es7243_adc_set_gain(es7243_input_mics_t mic_mask, es7243_gain_value_t gain);
|
// esp_err_t es7243_adc_set_gain(es7243_input_mics_t mic_mask, es7243_gain_value_t gain);
|
||||||
|
|
||||||
|
void es7243e_setgain(uint8_t gain);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue