mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Update comments..
This commit is contained in:
parent
f1feb1e113
commit
c05a00f643
@ -162,7 +162,7 @@ static int adc_getsample( lua_State* L )
|
||||
id = luaL_checkinteger( L, 1 );
|
||||
MOD_CHECK_ID( adc, id );
|
||||
|
||||
// Wait for pending sampling events to finish (if blocking)
|
||||
// Wait for samples (if blocking)
|
||||
adc_wait_samples( id, 1 );
|
||||
|
||||
// If we have at least one sample, return it
|
||||
@ -187,7 +187,7 @@ static int adc_getsamples( lua_State* L )
|
||||
if ( lua_isnumber(L, 2) == 1 )
|
||||
count = ( u16 )lua_tointeger(L, 2);
|
||||
|
||||
// Wait for any pending operations to finish (if blocking)
|
||||
// Wait for samples (if blocking)
|
||||
adc_wait_samples( id, count );
|
||||
|
||||
bcnt = adc_samples_available( id );
|
||||
|
@ -637,7 +637,7 @@ int platform_adc_prepchannel( unsigned id, u8 logcount )
|
||||
int platform_adc_startchannel( unsigned id )
|
||||
{
|
||||
elua_adc_state *s = adc_get_ch_state( id );
|
||||
|
||||
|
||||
if( s->clocked == 1 )
|
||||
{
|
||||
TimerControlTrigger(timer_base[s->timer_id], TIMER_A, true);
|
||||
@ -647,7 +647,7 @@ int platform_adc_startchannel( unsigned id )
|
||||
{
|
||||
ADCProcessorTrigger( ADC_BASE, id );
|
||||
}
|
||||
|
||||
|
||||
return PLATFORM_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user