1
0
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:
James Snyder 2009-02-16 23:06:07 +00:00
parent b3f6110150
commit 95b9bd97c2

View File

@ -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;
}