MCPcopy Create free account
hub / github.com/BruceDevices/firmware / deinitMicroPhone

Function deinitMicroPhone

src/modules/others/mic.cpp:121–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool deinitMicroPhone() {
122 // Disable codec, if exists
123 _setup_codec_mic(false);
124 esp_err_t err = ESP_OK;
125 if (i2s_chan) {
126 i2s_channel_disable(i2s_chan);
127 err |= i2s_del_channel(i2s_chan);
128 i2s_chan = nullptr;
129 }
130 gpio_reset_pin(GPIO_NUM_0);
131 return err;
132}
133
134bool InitI2SMicroPhone() {
135 // Enable codec, if exists

Callers 2

mic_testFunction · 0.85
mic_record_wav_to_pathFunction · 0.85

Calls 1

_setup_codec_micFunction · 0.70

Tested by

no test coverage detected