koreio_robot.c File Reference

Include dependency graph for koreio_robot.c:

Go to the source code of this file.

Defines

#define id   0x00000400
#define null   0x1E7F4000
#define one   0x1E7F7900
#define two   0x1E7F2400
#define three   0x1E7F3000
#define four   0x1E7F1900
#define five   0x1E7F1200
#define six   0x1E7F0200
#define seven   0x1E7F7800
#define eight   0x1E7F0000
#define nine   0x1E7F1000
#define can_status   0x02
#define id_led   0x00000300
#define can_data1   0x1E

Functions

static void ctrlc_handler (int sig)
int quit (int argc, char *argv[], void *data)
int readios (int argc, char *argv[], void *data)
int configio (int argc, char *argv[], void *data)
int resetio (int argc, char *argv[], void *data)
int changeled (int argc, char *argv[], void *data)
int changeio (int argc, char *argv[], void *data)
int setio (int argc, char *argv[], void *data)
int readad (int argc, char *argv[], void *data)
int readcan (int argc, char *argv[], void *data)
int can7seg (int argc, char *argv[], void *data)
int canled (int argc, char *argv[], void *data)
int setad (int argc, char *argv[], void *data)
int setratio (int argc, char *argv[], void *data)
int motor (int argc, char *argv[], void *data)
int gripper (int argc, char *argv[], void *data)
int setfreq (int argc, char *argv[], void *data)
int readio (int argc, char *argv[], void *data)
int changepw (int argc, char *argv[], void *data)
int setpw (int argc, char *argv[], void *data)
int readi2c (int argc, char *argv[], void *data)
int writei2c (int argc, char *argv[], void *data)
int startscan (int argc, char *argv[], void *data)
int listscan (int argc, char *argv[], void *data)
int resetpw (int argc, char *argv[], void *data)
int timer (int argc, char *argv[], void *data)
int sequence (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_tkoreio
static kb_command_t cmds []
static char buf [1024]


Define Documentation

#define can_data1   0x1E

#define can_status   0x02

#define eight   0x1E7F0000

#define five   0x1E7F1200

#define four   0x1E7F1900

#define id   0x00000400

#define id_led   0x00000300

#define nine   0x1E7F1000

#define null   0x1E7F4000

#define one   0x1E7F7900

#define seven   0x1E7F7800

#define six   0x1E7F0200

#define three   0x1E7F3000

#define two   0x1E7F2400


Function Documentation

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

Write on the CAN bus and change the 7 seg value (work only with the CAN developement kit)

Definition at line 186 of file koreio_robot.c.

References can_status, eight, five, four, kio_SendCAN(), nine, null, one, seven, six, three, and two.

Here is the call graph for this function:

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

Change the state of the three led on the CAN developpement kit

Definition at line 250 of file koreio_robot.c.

References can_data1, can_status, id_led, kio_SendCAN(), and status().

Here is the call graph for this function:

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

Change the given digital output value

Definition at line 115 of file koreio_robot.c.

References kio_ChangeIO().

Here is the call graph for this function:

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

Change the LED state

Definition at line 100 of file koreio_robot.c.

References kio_ChangeLed().

Here is the call graph for this function:

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

Change the given power output value

Definition at line 386 of file koreio_robot.c.

References kio_ChangePW().

Here is the call graph for this function:

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 ouput 2 to set as pwm

Definition at line 66 of file koreio_robot.c.

References kio_ConfigIO().

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 35 of file koreio_robot.c.

References quitReq.

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

Set the PWM ratio for the motor

Definition at line 335 of file koreio_robot.c.

References kio_ChangePWM_ratio().

Here is the call graph for this function:

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

Display a list of available commands.

Definition at line 453 of file koala_GoAutomation.c.

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

Definition at line 468 of file koreio_robot.c.

References kio_i2c_ListScan().

Here is the call graph for this function:

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

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

Set the PWM ratio for the motor

Definition at line 311 of file koreio_robot.c.

References kio_ChangePWM_ratio().

Here is the call graph for this function:

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

Quit the program.

Definition at line 43 of file koreio_robot.c.

References quitReq.

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

Read the given analog input value

Definition at line 145 of file koreio_robot.c.

References kio_ReadAnalog().

Here is the call graph for this function:

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

Read the can message in the buffer and erase it

Definition at line 163 of file koreio_robot.c.

References can_data1, can_status, id, and kio_ReadCAN().

Here is the call graph for this function:

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

read on the secondary I2C bus n_times (max 4)

Definition at line 416 of file koreio_robot.c.

References kio_i2c_ReturnRead(), and kio_i2c_StartRead().

Here is the call graph for this function:

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

Read the given IO state

Definition at line 371 of file koreio_robot.c.

References kio_ReadIO().

Here is the call graph for this function:

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_robot.c.

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

Reset the given digital output value

Definition at line 85 of file koreio_robot.c.

References kio_ClearIO().

Here is the call graph for this function:

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

Reset the given power output value

Definition at line 488 of file koreio_robot.c.

References kio_ClearPW().

Here is the call graph for this function:

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

Definition at line 520 of file koreio_robot.c.

References kio_ChangePWM_ratio().

Here is the call graph for this function:

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

Change the given analog output value

Definition at line 278 of file koreio_robot.c.

References kio_SetANValue().

Here is the call graph for this function:

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

Set the PWM channel frequence

Definition at line 356 of file koreio_robot.c.

References kio_ChangePWM_freq().

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 130 of file koreio_robot.c.

References kio_SetIO().

Here is the call graph for this function:

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

Set the given power output value

Definition at line 401 of file koreio_robot.c.

References kio_SetPW().

Here is the call graph for this function:

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

Set the PWM channel ratio

Definition at line 296 of file koreio_robot.c.

References kio_ChangePWM_ratio().

Here is the call graph for this function:

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

Start an address Scan on the secondary I2C bus. The list of answering devices must be consulted using readlist.

Definition at line 459 of file koreio_robot.c.

References kio_i2c_StartScan().

Here is the call graph for this function:

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

Handle the Analog measurement timestamp timer Argument 1 is: 0 to reset the timer 1 to stop the timer 2 to launch the timer

Definition at line 507 of file koreio_robot.c.

References kio_Timer().

Here is the call graph for this function:

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

Write on the secondary I2C bus

Definition at line 446 of file koreio_robot.c.

References kio_i2c_Write().

Here is the call graph for this function:


Variable Documentation

char buf[1024] [static]

Main program to process the command line.

Definition at line 715 of file koreio_robot.c.

kb_command_t cmds[] [static]

The command table contains: command name : min number of args : max number of args : the function to call

Definition at line 664 of file koreio_robot.c.

knet_dev_t* koreio [static]

Definition at line 29 of file koreio_robot.c.

int quitReq = 0 [static]

Definition at line 28 of file koreio_robot.c.


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