diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-02-26 14:06:44 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-03-06 16:14:36 +0000 |
commit | 5db10c0559c6ae346e93621db5cd6db98bde422d (patch) | |
tree | c369fc070c2641cc471ba7b0a2b16dbc3310b766 | |
parent | bc1f5cabc046d36696f5e3b55319e4e1b7a385f9 (diff) | |
download | riscv-openocd-5db10c0559c6ae346e93621db5cd6db98bde422d.zip riscv-openocd-5db10c0559c6ae346e93621db5cd6db98bde422d.tar.gz riscv-openocd-5db10c0559c6ae346e93621db5cd6db98bde422d.tar.bz2 |
target/avr32_ap7k: Use 'bool' data type
Change-Id: I49f1a6c6ee6d175935eb40b49abf8ebdf56a0b6e
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4961
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
-rw-r--r-- | src/target/avr32_ap7k.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/target/avr32_ap7k.c b/src/target/avr32_ap7k.c index f8da8d5..cf08e3a 100644 --- a/src/target/avr32_ap7k.c +++ b/src/target/avr32_ap7k.c @@ -110,8 +110,8 @@ static int avr32_read_core_reg(struct target *target, int num) reg_value = ap7k->core_regs[num]; buf_set_u32(ap7k->core_cache->reg_list[num].value, 0, 32, reg_value); - ap7k->core_cache->reg_list[num].valid = 1; - ap7k->core_cache->reg_list[num].dirty = 0; + ap7k->core_cache->reg_list[num].valid = true; + ap7k->core_cache->reg_list[num].dirty = false; return ERROR_OK; } @@ -129,8 +129,8 @@ static int avr32_write_core_reg(struct target *target, int num) reg_value = buf_get_u32(ap7k->core_cache->reg_list[num].value, 0, 32); ap7k->core_regs[num] = reg_value; LOG_DEBUG("write core reg %i value 0x%" PRIx32 "", num, reg_value); - ap7k->core_cache->reg_list[num].valid = 1; - ap7k->core_cache->reg_list[num].dirty = 0; + ap7k->core_cache->reg_list[num].valid = true; + ap7k->core_cache->reg_list[num].dirty = false; return ERROR_OK; } @@ -159,8 +159,8 @@ static int avr32_set_core_reg(struct reg *reg, uint8_t *buf) return ERROR_TARGET_NOT_HALTED; buf_set_u32(reg->value, 0, 32, value); - reg->dirty = 1; - reg->valid = 1; + reg->dirty = true; + reg->valid = true; return ERROR_OK; } @@ -196,8 +196,8 @@ static struct reg_cache *avr32_build_reg_cache(struct target *target) reg_list[i].name = avr32_core_reg_list[i]; reg_list[i].size = 32; reg_list[i].value = calloc(1, 4); - reg_list[i].dirty = 0; - reg_list[i].valid = 0; + reg_list[i].dirty = false; + reg_list[i].valid = false; reg_list[i].type = &avr32_reg_type; reg_list[i].arch_info = &arch_info[i]; } |