X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Fregister.h;h=ca8866b1e2cece5253ec393eda5adf557a085318;hb=d0dee7ccafcf87259fadf6c5de43df8583b0e885;hp=d139379bb95b63be835464bc8234d0c28261ac26;hpb=8b994145b849c40b0a195c3fb332b9770b2f9097;p=fw%2Fopenocd diff --git a/src/target/register.h b/src/target/register.h index d139379bb..ca8866b1e 100644 --- a/src/target/register.h +++ b/src/target/register.h @@ -27,45 +27,49 @@ struct target_s; -typedef struct bitfield_desc_s +struct bitfield_desc { char *name; int num_bits; -} bitfield_desc_t; +}; -typedef struct reg_s +struct reg { char *name; void *value; int dirty; int valid; uint32_t size; - bitfield_desc_t *bitfield_desc; + struct bitfield_desc *bitfield_desc; int num_bitfields; void *arch_info; int arch_type; -} reg_t; +}; -typedef struct reg_cache_s +struct reg_cache { char *name; - struct reg_cache_s *next; - reg_t *reg_list; + struct reg_cache *next; + struct reg *reg_list; int num_regs; -} reg_cache_t; +}; -typedef struct reg_arch_type_s +struct reg_arch_type { int id; - int (*get)(reg_t *reg); - int (*set)(reg_t *reg, uint8_t *buf); - struct reg_arch_type_s *next; -} reg_arch_type_t; + int (*get)(struct reg *reg); + int (*set)(struct reg *reg, uint8_t *buf); + struct reg_arch_type *next; +}; -extern reg_t* register_get_by_name(reg_cache_t *first, char *name, int search_all); -extern reg_cache_t** register_get_last_cache_p(reg_cache_t **first); -extern int register_reg_arch_type(int (*get)(reg_t *reg), int (*set)(reg_t *reg, uint8_t *buf)); -extern reg_arch_type_t* register_get_arch_type(int id); -extern void register_init_dummy(reg_t *reg); +struct reg* register_get_by_name(struct reg_cache *first, + const char *name, bool search_all); +struct reg_cache** register_get_last_cache_p(struct reg_cache **first); + +int register_reg_arch_type(int (*get)(struct reg *reg), + int (*set)(struct reg *reg, uint8_t *buf)); +struct reg_arch_type* register_get_arch_type(int id); + +void register_init_dummy(struct reg *reg); #endif /* REGISTER_H */