Skip to content

Commit

Permalink
cpu/sam0_common: fix adc_continuous_sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Dec 1, 2023
1 parent 20c3898 commit 1e9b199
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cpu/sam0_common/periph/adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,10 @@ void adc_continuous_begin(adc_res_t res)

int32_t adc_continuous_sample(adc_t line)
{
int val;
assert(line < ADC_NUMOF);
assert(mutex_trylock(&_lock) == 0);

mutex_lock(&_lock);
val = _sample(line) << _shift;
mutex_unlock(&_lock);

return val;
return _sample(line) << _shift;
}

void adc_continuous_stop(void)
Expand Down

0 comments on commit 1e9b199

Please sign in to comment.