Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AdvancedADC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/AdvancedDAC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void AdvancedDAC::write(DMABuffer<Sample> &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;
}

Expand Down