mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/upate_ble_a2dsink_example' into 'master'
example(ble): Update ble a2d_sink example See merge request idf/esp-idf!2105
This commit is contained in:
commit
66406e1f64
@ -54,14 +54,14 @@ void app_main()
|
|||||||
|
|
||||||
i2s_config_t i2s_config = {
|
i2s_config_t i2s_config = {
|
||||||
#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC
|
#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC
|
||||||
.mode = I2S_MODE_DAC_BUILT_IN,
|
.mode = I2S_MODE_MASTER | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN,
|
||||||
#else
|
#else
|
||||||
.mode = I2S_MODE_MASTER | I2S_MODE_TX, // Only TX
|
.mode = I2S_MODE_MASTER | I2S_MODE_TX, // Only TX
|
||||||
#endif
|
#endif
|
||||||
.sample_rate = 44100,
|
.sample_rate = 44100,
|
||||||
.bits_per_sample = 16,
|
.bits_per_sample = 16,
|
||||||
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels
|
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels
|
||||||
.communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB,
|
.communication_format = I2S_COMM_FORMAT_I2S_MSB,
|
||||||
.dma_buf_count = 6,
|
.dma_buf_count = 6,
|
||||||
.dma_buf_len = 60, //
|
.dma_buf_len = 60, //
|
||||||
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1
|
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1
|
||||||
@ -70,6 +70,7 @@ void app_main()
|
|||||||
|
|
||||||
i2s_driver_install(0, &i2s_config, 0, NULL);
|
i2s_driver_install(0, &i2s_config, 0, NULL);
|
||||||
#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC
|
#ifdef CONFIG_A2DP_SINK_OUTPUT_INTERNAL_DAC
|
||||||
|
i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
|
||||||
i2s_set_pin(0, NULL);
|
i2s_set_pin(0, NULL);
|
||||||
#else
|
#else
|
||||||
i2s_pin_config_t pin_config = {
|
i2s_pin_config_t pin_config = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user