From 4ed60d9076b23307cc86da136562cdc741370d50 Mon Sep 17 00:00:00 2001 From: Vijay Kumar Banerjee Date: Tue, 25 Jun 2019 12:43:43 +0530 Subject: i2c tool : port to RTEMS --- rtemsbsd/include/machine/rtems-bsd-commands.h | 2 ++ rtemsbsd/include/rtems/netcmds-config.h | 2 ++ rtemsbsd/rtems/rtems-bsd-shell-i2c.c | 35 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 rtemsbsd/rtems/rtems-bsd-shell-i2c.c (limited to 'rtemsbsd') diff --git a/rtemsbsd/include/machine/rtems-bsd-commands.h b/rtemsbsd/include/machine/rtems-bsd-commands.h index 1b022902..f5f2955a 100644 --- a/rtemsbsd/include/machine/rtems-bsd-commands.h +++ b/rtemsbsd/include/machine/rtems-bsd-commands.h @@ -54,6 +54,8 @@ int rtems_bsd_command_netstat(int argc, char **argv); int rtems_bsd_command_pfctl(int argc, char **argv); +int rtems_bsd_command_i2c(int argc, char **argv); + int rtems_bsd_command_ping(int argc, char **argv); int rtems_bsd_command_ping6(int argc, char **argv); diff --git a/rtemsbsd/include/rtems/netcmds-config.h b/rtemsbsd/include/rtems/netcmds-config.h index f8dcdcdc..4d72a4fa 100644 --- a/rtemsbsd/include/rtems/netcmds-config.h +++ b/rtemsbsd/include/rtems/netcmds-config.h @@ -26,6 +26,8 @@ extern rtems_shell_cmd_t rtems_shell_ARP_Command; extern rtems_shell_cmd_t rtems_shell_PFCTL_Command; +extern rtems_shell_cmd_t rtems_shell_I2C_Command; + extern rtems_shell_cmd_t rtems_shell_PING_Command; extern rtems_shell_cmd_t rtems_shell_PING6_Command; diff --git a/rtemsbsd/rtems/rtems-bsd-shell-i2c.c b/rtemsbsd/rtems/rtems-bsd-shell-i2c.c new file mode 100644 index 00000000..2e1da406 --- /dev/null +++ b/rtemsbsd/rtems/rtems-bsd-shell-i2c.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2019 Vijay Kumar Banerjee +#include + +rtems_shell_cmd_t rtems_shell_I2C_Command = { + .name = "i2c", + .usage = "i2c [args]", + .topic = "i2c", + .command = rtems_bsd_command_i2c +}; -- cgit v1.2.3