fpga: Use enum for bitstream command types

Using enum simplify handling of different bitstream command
types.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek 2017-01-06 11:20:54 +01:00
parent ef4cab9d4f
commit 5cf22289ae

View file

@ -18,15 +18,17 @@
static int fpga_get_op(char *opstr); static int fpga_get_op(char *opstr);
/* Local defines */ /* Local defines */
#define FPGA_NONE -1 enum {
#define FPGA_INFO 0 FPGA_NONE = -1,
#define FPGA_LOAD 1 FPGA_INFO,
#define FPGA_LOADB 2 FPGA_LOAD,
#define FPGA_DUMP 3 FPGA_LOADB,
#define FPGA_LOADMK 4 FPGA_DUMP,
#define FPGA_LOADP 5 FPGA_LOADMK,
#define FPGA_LOADBP 6 FPGA_LOADP,
#define FPGA_LOADFS 7 FPGA_LOADBP,
FPGA_LOADFS,
};
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* command form: /* command form: