diff --git a/src/AdvancedADC.cpp b/src/AdvancedADC.cpp index 9078be4..e01c894 100644 --- a/src/AdvancedADC.cpp +++ b/src/AdvancedADC.cpp @@ -117,7 +117,7 @@ int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_sampl ADCName instance = ADC_NP; // Sanity checks. - if (resolution >= AN_ARRAY_SIZE(ADC_RES_LUT)) { + if (resolution >= AN_ARRAY_SIZE(ADC_RES_LUT) || (descr && descr->pool)) { return 0; } diff --git a/src/AdvancedDAC.cpp b/src/AdvancedDAC.cpp index fc04461..443336f 100644 --- a/src/AdvancedDAC.cpp +++ b/src/AdvancedDAC.cpp @@ -135,7 +135,7 @@ void AdvancedDAC::write(DMABuffer &dmabuf) { int AdvancedDAC::begin(uint32_t resolution, uint32_t frequency, size_t n_samples, size_t n_buffers) { // Sanity checks. - if (resolution >= AN_ARRAY_SIZE(DAC_RES_LUT)) { + if (resolution >= AN_ARRAY_SIZE(DAC_RES_LUT) || (descr && descr->pool)) { return 0; }