gpio_test.c File Reference

Include dependency graph for gpio_test.c:

Go to the source code of this file.

Functions

static void ctrlc_handler (int sig)
int quit (int argc, char *argv[], void *data)
int configio (int argc, char *argv[], void *data)
int resetio (int argc, char *argv[], void *data)
int setio (int argc, char *argv[], void *data)
int readio (int argc, char *argv[], void *data)
int pwm_on (int argc, char *argv[], void *data)
int pwm_off (int argc, char *argv[], void *data)
int pwm_ratio (int argc, char *argv[], void *data)
int pwm_freq (int argc, char *argv[], void *data)
int pwm_config (int argc, char *argv[], void *data)
int help (int argc, char *argv[], void *data)
int main (int argc, char *argv[])

Variables

static int quitReq = 0
static kb_command_t cmds []
static char buf [1024]


Function Documentation

int configio ( int  argc,
char *  argv[],
void *  data 
)

Configure the given digital IO The first argument is the IO number The second argument is: 0 to set as input 1 to set as output

Definition at line 44 of file gpio_test.c.

References kb_gpio_dir(), and kb_gpio_function().

Here is the call graph for this function:

static void ctrlc_handler ( int  sig  )  [static]

Make sure the program terminate properly on a ctrl-c

Definition at line 19 of file gpio_test.c.

References quitReq.

Referenced by main().

int help ( int  argc,
char *  argv[],
void *  data 
)

Display a list of available commands.

Definition at line 208 of file gpio_test.c.

References kb_command_s::name.

int main ( int  argc,
char *  argv[] 
)

Definition at line 225 of file gpio_test.c.

References buf, ctrlc_handler(), kb_init(), kb_parse_command(), kb_pwm_init(), kb_set_debug_level(), and quitReq.

Here is the call graph for this function:

int pwm_config ( int  argc,
char *  argv[],
void *  data 
)

Activate the given pwm

Definition at line 167 of file gpio_test.c.

References kb_pwm_config().

Here is the call graph for this function:

int pwm_freq ( int  argc,
char *  argv[],
void *  data 
)

Activate the given pwm

Definition at line 151 of file gpio_test.c.

References kb_pwm_period().

Here is the call graph for this function:

int pwm_off ( int  argc,
char *  argv[],
void *  data 
)

Desactivate the given pwm

Definition at line 117 of file gpio_test.c.

References kb_pwm_desactivate().

Here is the call graph for this function:

int pwm_on ( int  argc,
char *  argv[],
void *  data 
)

Activate the given pwm

Definition at line 100 of file gpio_test.c.

References kb_pwm_activate().

Here is the call graph for this function:

int pwm_ratio ( int  argc,
char *  argv[],
void *  data 
)

Activate the given pwm

Definition at line 134 of file gpio_test.c.

References kb_pwm_duty().

Here is the call graph for this function:

int quit ( int  argc,
char *  argv[],
void *  data 
)

Quit the program.

Definition at line 27 of file gpio_test.c.

References quitReq.

int readio ( int  argc,
char *  argv[],
void *  data 
)

Read the given digital input value

Definition at line 83 of file gpio_test.c.

References kb_gpio_get().

Here is the call graph for this function:

int resetio ( int  argc,
char *  argv[],
void *  data 
)

Reset the given digital output value

Definition at line 61 of file gpio_test.c.

References kb_gpio_clear().

Here is the call graph for this function:

int setio ( int  argc,
char *  argv[],
void *  data 
)

Set the given digital output value

Definition at line 73 of file gpio_test.c.

References kb_gpio_set().

Here is the call graph for this function:


Variable Documentation

char buf[1024] [static]

kb_command_t cmds[] [static]

Initial value:

 {
  { "quit"            , 0 , 0 , quit } ,
  { "exit"            , 0 , 0 , quit } ,
  { "bye"             , 0 , 0 , quit } ,
  { "readio"          , 1 , 1 , readio },
  { "setio"           , 1 , 1 , setio },
  { "cleario"         , 1 , 1 , resetio },
  { "configio"        , 2 , 2 , configio },
  { "pwm_on"        , 1 , 1 , pwm_on },
  { "pwm_off"        , 1 , 1 , pwm_off },
  { "pwm_ratio"        , 2 , 2 , pwm_ratio},
  { "pwm_freq"        , 2 , 2 , pwm_freq },
  { "pwm_config"        , 3 , 3 , pwm_config },
  { "help"            , 0 , 0 , help } ,
  { NULL              , 0 , 0 , NULL }
}
The command table contains: command name : min number of args : max number of args : the function to call

Definition at line 188 of file gpio_test.c.

int quitReq = 0 [static]

Definition at line 13 of file gpio_test.c.

Referenced by ctrlc_handler(), main(), and quit().


Generated on Wed Dec 15 11:49:27 2010 for KoreBot Library by  doxygen 1.5.5