Go to the source code of this file.
Functions | |
static void | ctrlc_handler (int sig) |
int | quit (int argc, char *argv[], void *data) |
int | readios (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 knet_dev_t * | koreio |
static kb_command_t | cmds [] |
static char | buf [1024] |
static void ctrlc_handler | ( | int | sig | ) | [static] |
Make sure the program terminate properly on a ctrl-c
Definition at line 35 of file koreio_auto.c.
References quitReq.
int help | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Display a list of available commands.
Definition at line 453 of file koala_GoAutomation.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 92 of file koreio_auto.c.
References ctrlc_handler(), kb_init(), kb_set_debug_level(), kio_ChangeIO(), kio_ClearIO(), kio_ClearPW(), kio_ConfigIO(), kio_GetFWVersion(), kio_ReadAnalog(), kio_SetIO(), kio_SetPW(), KNET_BUS_ANY, knet_close(), knet_open(), and quitReq.
int quit | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
int readios | ( | int | argc, | |
char * | argv[], | |||
void * | data | |||
) |
Read all the IO states and display them. The first digit displayed is IO0 and the last is IO15. A x is displayed for IOs in output mode and a p is displayed for IOs in pwm mode
Definition at line 53 of file koreio_auto.c.
char buf[1024] [static] |
Main program to process the command line.
Definition at line 90 of file koreio_auto.c.
kb_command_t cmds[] [static] |
Initial value:
{ { "quit" , 0 , 0 , quit } , { "exit" , 0 , 0 , quit } , { "bye" , 0 , 0 , quit } , { "help" , 0 , 0 , help } , { NULL , 0 , 0 , NULL } }
Definition at line 64 of file koreio_auto.c.
knet_dev_t* koreio [static] |
Definition at line 29 of file koreio_auto.c.
int quitReq = 0 [static] |
Definition at line 28 of file koreio_auto.c.