X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fregister.c;h=58cc85e281e003c0ac04c98bfa650fc9bfff3938;hb=ccde06a08fbf9c4f57b321dbec0509f73239c2de;hp=37915eb494c48879c5c79ed2cff58bd0cdb1d64d;hpb=0cba0d4df3fe120f08945703506f8405760325c9;p=openocd.git diff --git a/src/target/register.c b/src/target/register.c index 37915eb494..58cc85e281 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -2,7 +2,7 @@ * Copyright (C) 2005 by Dominic Rath * * Dominic.Rath@gmx.de * * * - * Copyright (C) 2007,2008 Øyvind Harboe * + * Copyright (C) 2007,2008 Øyvind Harboe * * oyvind.harboe@zylin.com * * * * This program is free software; you can redistribute it and/or modify * @@ -25,16 +25,13 @@ #endif #include "register.h" - #include "log.h" -#include "command.h" -#include -#include reg_arch_type_t *reg_arch_types = NULL; -reg_t* register_get_by_name(reg_cache_t *first, char *name, int search_all) +reg_t* register_get_by_name(reg_cache_t *first, + const char *name, bool search_all) { int i; reg_cache_t *cache = first; @@ -69,7 +66,7 @@ reg_cache_t** register_get_last_cache_p(reg_cache_t **first) return cache_p; } -int register_reg_arch_type(int (*get)(reg_t *reg), int (*set)(reg_t *reg, u8 *buf)) +int register_reg_arch_type(int (*get)(reg_t *reg), int (*set)(reg_t *reg, uint8_t *buf)) { reg_arch_type_t** arch_type_p = ®_arch_types; int id = 0; @@ -112,7 +109,7 @@ static int register_get_dummy_core_reg(reg_t *reg) return ERROR_OK; } -static int register_set_dummy_core_reg(reg_t *reg, u8 *buf) +static int register_set_dummy_core_reg(reg_t *reg, uint8_t *buf) { reg->dirty = 1; reg->valid = 1; @@ -123,7 +120,7 @@ static int register_set_dummy_core_reg(reg_t *reg, u8 *buf) void register_init_dummy(reg_t *reg) { static int dummy_arch_type = -1; - if (dummy_arch_type == -1 ) + if (dummy_arch_type == -1) dummy_arch_type = register_reg_arch_type(register_get_dummy_core_reg, register_set_dummy_core_reg); reg->arch_type = dummy_arch_type;