1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2006 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
6 ***************************************************************************/
8 #ifndef OPENOCD_PLD_PLD_H
9 #define OPENOCD_PLD_PLD_H
11 #include <helper/command.h>
15 #define __PLD_DEVICE_COMMAND(name) \
16 COMMAND_HELPER(name, struct pld_device *pld)
20 __PLD_DEVICE_COMMAND((*pld_device_command));
21 const struct command_registration *commands;
22 int (*load)(struct pld_device *pld_device, const char *filename);
25 #define PLD_DEVICE_COMMAND_HANDLER(name) \
26 static __PLD_DEVICE_COMMAND(name)
29 struct pld_driver *driver;
31 struct pld_device *next;
34 int pld_register_commands(struct command_context *cmd_ctx);
36 struct pld_device *get_pld_device_by_num(int num);
38 #define ERROR_PLD_DEVICE_INVALID (-1000)
39 #define ERROR_PLD_FILE_LOAD_FAILED (-1001)
41 #endif /* OPENOCD_PLD_PLD_H */