diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-03-01 09:56:55 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-03-01 09:56:55 +0100 |
commit | 4ac9d96b5ca74c03020282d1c486e0eecad58d73 (patch) | |
tree | 0a0959edf87c13316ac26a18b6567080beef0525 /libk8055 | |
parent | ce2df0909161eee14f8a9146b5c0b20fe09058f3 (diff) | |
download | k8055-4ac9d96b5ca74c03020282d1c486e0eecad58d73.zip k8055-4ac9d96b5ca74c03020282d1c486e0eecad58d73.tar.gz |
update main.c
Diffstat (limited to 'libk8055')
-rw-r--r-- | libk8055/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libk8055/main.c b/libk8055/main.c index 055d045..0fc7f68 100644 --- a/libk8055/main.c +++ b/libk8055/main.c @@ -142,9 +142,9 @@ inline unsigned long int time_msec ( void ) { int main ( int argc,char* params[] ) { int i,result; - long d=0; - long a1=0,a2=0; - long c1=0, c2=0; + int d=0; + int a1=0,a2=0; + int c1=0, c2=0; unsigned long int start,mstart=0,lastcall=0; start = time_msec(); if ( read_param( argc,params ) ) { @@ -181,15 +181,15 @@ int main ( int argc,char* params[] ) { if ( debug ) printf( "SetAllValues=%d - analog1:%d, analog2:%d\n",result,ia1,ia2 ); } else { if ( ia1!=-1 ) { - result=k8055_output_analog_channel( &dev,1,ia1 ); + result=k8055_write_analog_channel( &dev,1,ia1 ); if ( debug ) printf( "Set analog1:%d=>%d\n",ia1,result ); } if ( ia2!=-1 ) { - result=k8055_output_analog_channel( &dev,2,ia2 ); + result=k8055_write_analog_channel( &dev,2,ia2 ); if ( debug ) printf( "Set analog2:%d=>%d\n",ia2,result ); } if ( id8!=-1 ) { - result=k8055_write_all_digital( &dev,( long )id8 ); + result=k8055_write_all_digital( &dev,id8 ); if ( debug ) printf( "Set digital:%d=>%d\n",id8,result ); } } @@ -200,7 +200,7 @@ int main ( int argc,char* params[] ) { } k8055_read_all_values( &dev,&d,&a1,&a2,&c1,&c2 ); lastcall = time_msec(); - printf( "%d;%d;%d;%d;%d;%d\n", ( int )( lastcall-start ),( int )d, ( int )a1, ( int )a2,( int )c1,( int )c2 ); + printf( "%d;%d;%d;%d;%d;%d\n", ( int )( lastcall-start ), d, a1, a2, c1, c2 ); } k8055_close_device( &dev ); } |