mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Minor consistency change for ADC on LM3S.
This commit is contained in:
parent
b3f6110150
commit
95b9bd97c2
@ -606,10 +606,11 @@ int platform_adc_sample( unsigned id )
|
||||
// If switching from burst, resize & flush buffer
|
||||
if ( s->burst == 1 )
|
||||
{
|
||||
buf_flush( BUF_ID_ADC, id );
|
||||
res = buf_set( BUF_ID_ADC, id, ADC_BUF_SIZE , BUF_DSIZE_U16 );
|
||||
if ( res != PLATFORM_OK )
|
||||
return res;
|
||||
// Need more general buf resizing... for now flush each time
|
||||
buf_flush( BUF_ID_ADC, id );
|
||||
s->burst = 0;
|
||||
s->reqsamples = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user