#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
#else
#include <unistd.h>
#define Sleep( msec ) usleep(( msec ) * 1000 )
#endif
int main( void )
{
char s[ 256 ];
int i;
uint8_t sn;
printf( "Waiting the EV3 brick online...\n" );
printf( "*** ( EV3 ) Hello! ***\n" );
printf( "Found ports:\n" );
for ( i = 0; i < DESC_LIMIT; i++ ) {
if ( ev3_port[ i ].type_inx != PORT_TYPE__NONE_ ) {
printf(
" type = %s\n",
ev3_port_type( ev3_port[ i ].type_inx ));
printf( " mode = %s\n", s );
}
}
}
printf(
"Port '%s'\n",
ev3_port_name( INPUT_2, EXT_PORT__NONE_, 0, s ));
printf( "Modes: %s\n", s );
} else {
printf( "ERROR: get_port_modes()\n" );
}
printf( "*** ( EV3 ) Bye! ***\n" );
return ( 0 );
}