ESP32-C3 Support (#454)
* ESP32-C3 has no ULP coprocessor Only the ESP32, ESP32-S2 and ESP32-S3 chips have an ULP coprocessor, ESP32-C3 doesn't have it. So exclude this code from compiling, as it cannot compile in the C3 environment. * uint32_t and size_t is not the same on RISC-V This change is necessary to be able to compile it on ESP32-C3 * uint32_t and size_t is not the same on RISC-V The change is necessary to compile it on ESP32-C3 * ESP32-C3: I2S_MODE_DAC_BUILT_IN / I2S_MODE_PDM not available On some ESP32 chips (e.g. ESP32-C3), builtin DAC is not possible as it lacks the hardware module. In order to be able to compile the library on ESP32-C3 the defines cannot be used.
This commit is contained in:
1 parent
617b06d09a
commit
2c1aeba4ab
4 files changed
+16
-4
No files matched your search
@@ -265,7 +265,7 @@ bool AudioOutputSPDIF::ConsumeSample(int16_t sample[2])
|
||||
|
||||
#if defined(ESP32)
|
||||
// Assume DMA buffers are multiples of 16 bytes. Either we write all bytes or none.
|
||||
uint32_t bytes_written;
|
||||
size_t bytes_written;
|
||||
esp_err_t ret = i2s_write((i2s_port_t)portNo, (const char*)&buf, 8 * channels, &bytes_written, 0);
|
||||
// If we didn't write all bytes, return false early and do not increment frame_num
|
||||
if ((ret != ESP_OK) || (bytes_written != (8 * channels))) return false;
|
||||
|
||||
Reference in new issue
Block a user