10 CMD_OP_EXEC = (1 << 2),
27 void (*out)(const char *format, va_list ap);
33 int (*cb)(struct cmd_state *cs, enum cmd_op op, const char *cmd,
34 int argc, char **argv);
38 /* structure describing a field in a register */
45 struct reg_field_ops {
46 const struct reg_field *fields;
47 const char **field_names;
50 int (*write_cb)(void *data, uint32_t reg, uint32_t val);
51 uint32_t (*read_cb)(void *data, uint32_t reg);
54 uint32_t reg_field_read(struct reg_field_ops *ops, struct reg_field *field);
55 int reg_field_write(struct reg_field_ops *ops, struct reg_field *field, uint32_t val);
56 int reg_field_cmd(struct cmd_state *cs, enum cmd_op op,
57 const char *cmd, int argc, char **argv,
58 struct reg_field_ops *ops);