73 LOG_ERROR(
"'%s' driver rejected pld device",
159 .handler = handle_pld_devices_command,
161 .help =
"list configured pld devices",
166 .handler = handle_pld_load_command,
168 .help =
"load configuration file into PLD",
169 .usage =
"pld_num filename",
187 static bool pld_initialized;
188 if (pld_initialized) {
189 LOG_INFO(
"'pld init' has already been called");
192 pld_initialized =
true;
202 .handler = handle_pld_device_command,
203 .help =
"configure a PLD device",
204 .usage =
"driver_name [driver_args ... ]",
209 .handler = handle_pld_init_command,
210 .help =
"initialize PLD devices",
219 .help =
"programmable logic device commands",
void command_print(struct command_invocation *cmd, const char *format,...)
#define CMD
Use this macro to access the command being handled, rather than accessing the variable directly.
#define CALL_COMMAND_HANDLER(name, extra ...)
Use this to macro to call a command helper (or a nested handler).
#define CMD_ARGV
Use this macro to access the arguments for the command being handled, rather than accessing the varia...
#define ERROR_COMMAND_SYNTAX_ERROR
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
#define COMMAND_PARSE_NUMBER(type, in, out)
parses the string in into out as a type, or prints a command error and passes the error code to the c...
#define CMD_CTX
Use this macro to access the context of the command being handled, rather than accessing the variable...
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
static int register_commands(struct command_context *cmd_ctx, const char *cmd_prefix, const struct command_registration *cmds)
Register one or more commands in the specified context, as children of parent (or top-level commends,...
#define LOG_ERROR(expr ...)
#define LOG_INFO(expr ...)
#define LOG_DEBUG(expr ...)
struct pld_device * get_pld_device_by_num(int num)
static int pld_init(struct command_context *cmd_ctx)
static const struct command_registration pld_config_command_handlers[]
COMMAND_HANDLER(handle_pld_device_command)
static const struct command_registration pld_exec_command_handlers[]
static const struct command_registration pld_command_handler[]
struct pld_driver virtex2_pld
static struct pld_driver * pld_drivers[]
static struct pld_device * pld_devices
int pld_register_commands(struct command_context *cmd_ctx)
int gettimeofday(struct timeval *tv, struct timezone *tz)
struct pld_driver * driver
int(* load)(struct pld_device *pld_device, const char *filename)
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y)