OpenOCD
pld.c File Reference
Include dependency graph for pld.c:

Go to the source code of this file.

Functions

 COMMAND_HANDLER (handle_pld_device_command)
 
 COMMAND_HANDLER (handle_pld_devices_command)
 
 COMMAND_HANDLER (handle_pld_init_command)
 
 COMMAND_HANDLER (handle_pld_load_command)
 
struct pld_deviceget_pld_device_by_num (int num)
 
static int pld_init (struct command_context *cmd_ctx)
 
int pld_register_commands (struct command_context *cmd_ctx)
 

Variables

static const struct command_registration pld_command_handler []
 
static const struct command_registration pld_config_command_handlers []
 
static struct pld_devicepld_devices
 
static struct pld_driverpld_drivers []
 
static const struct command_registration pld_exec_command_handlers []
 
struct pld_driver virtex2_pld
 

Function Documentation

◆ COMMAND_HANDLER() [1/4]

COMMAND_HANDLER ( handle_pld_device_command  )

◆ COMMAND_HANDLER() [2/4]

COMMAND_HANDLER ( handle_pld_devices_command  )

◆ COMMAND_HANDLER() [3/4]

COMMAND_HANDLER ( handle_pld_init_command  )

Definition at line 182 of file pld.c.

References CMD_ARGC, CMD_CTX, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, LOG_INFO, and pld_init().

◆ COMMAND_HANDLER() [4/4]

◆ get_pld_device_by_num()

struct pld_device* get_pld_device_by_num ( int  num)

Definition at line 29 of file pld.c.

References pld_device::next, NULL, and pld_devices.

Referenced by COMMAND_HANDLER().

◆ pld_init()

static int pld_init ( struct command_context cmd_ctx)
static

Definition at line 174 of file pld.c.

References ERROR_OK, pld_devices, pld_exec_command_handlers, and register_commands().

Referenced by COMMAND_HANDLER().

◆ pld_register_commands()

int pld_register_commands ( struct command_context cmd_ctx)

Definition at line 225 of file pld.c.

References NULL, pld_command_handler, and register_commands().

Referenced by setup_command_handler().

Variable Documentation

◆ pld_command_handler

const struct command_registration pld_command_handler[]
static
Initial value:
= {
{
.name = "pld",
.mode = COMMAND_ANY,
.help = "programmable logic device commands",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:247
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration pld_config_command_handlers[]
Definition: pld.c:198

Definition at line 182 of file pld.c.

Referenced by pld_register_commands().

◆ pld_config_command_handlers

const struct command_registration pld_config_command_handlers[]
static
Initial value:
= {
{
.name = "device",
.mode = COMMAND_CONFIG,
.handler = handle_pld_device_command,
.help = "configure a PLD device",
.usage = "driver_name [driver_args ... ]",
},
{
.name = "init",
.mode = COMMAND_CONFIG,
.handler = handle_pld_init_command,
.help = "initialize PLD devices",
.usage = ""
},
}
@ COMMAND_CONFIG
Definition: command.h:41

Definition at line 182 of file pld.c.

◆ pld_devices

struct pld_device* pld_devices
static

Definition at line 27 of file pld.c.

Referenced by COMMAND_HANDLER(), get_pld_device_by_num(), and pld_init().

◆ pld_drivers

struct pld_driver* pld_drivers[]
static
Initial value:
= {
}
struct pld_driver virtex2_pld
Definition: virtex2.c:236
#define NULL
Definition: usb.h:16

Definition at line 22 of file pld.c.

Referenced by COMMAND_HANDLER().

◆ pld_exec_command_handlers

const struct command_registration pld_exec_command_handlers[]
static
Initial value:
= {
{
.name = "devices",
.handler = handle_pld_devices_command,
.mode = COMMAND_EXEC,
.help = "list configured pld devices",
.usage = "",
},
{
.name = "load",
.handler = handle_pld_load_command,
.mode = COMMAND_EXEC,
.help = "load configuration file into PLD",
.usage = "pld_num filename",
},
}
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 118 of file pld.c.

Referenced by pld_init().

◆ virtex2_pld

struct pld_driver virtex2_pld
extern

Definition at line 188 of file virtex2.c.