/* * adc command * * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. * * $Id$ */ #include #include #include #include #include #include "multiio.h" #define __need_getopt_newlib #include static void adc_read( float *adc, int max ) { int input; for ( input=0 ; input= maximum ) break; (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(milliseconds) ); } return 0; } rtems_shell_cmd_t Shell_MULTIIO_ADC_Command = { "multiio_adc", /* name */ "Read Analog Inputs", /* usage */ "multiio", /* topic */ main_multiio_adc, /* command */ NULL, /* alias */ NULL /* next */ }; rtems_shell_alias_t Shell_MULTIIO_ADC_Alias = { "multiio_adc", /* command */ "adc" /* alias */ };