diff options
author | Paul Fertser <fercerpav@gmail.com> | 2016-11-13 15:02:55 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2016-12-08 15:08:42 +0000 |
commit | 702b150a6bf92fe56cf0cea72ccfad2d06eb64bc (patch) | |
tree | 0cad62f0c1f59b54c8b074bf7fc3691e466a58b9 | |
parent | 50e2253ab9433e5ff2d01a7338477a44e7cf8a6f (diff) |
target: LS1_SAP: fix "declaration of 'read' shadows a global" warning
Change-Id: I7070193819cc134f9fe1427c20a11160ec415ccb
Reported-by: Jens Bauer <jens-lists@gpio.dk>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/3877
Tested-by: jenkins
-rw-r--r-- | src/target/ls1_sap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/ls1_sap.c b/src/target/ls1_sap.c index 944e7252..b4d814bb 100644 --- a/src/target/ls1_sap.c +++ b/src/target/ls1_sap.c @@ -127,7 +127,7 @@ static void ls1_sap_set_addr_high(struct jtag_tap *tap, uint16_t addr_high) } static void ls1_sap_memory_cmd(struct jtag_tap *tap, uint32_t address, - int32_t size, int read) + int32_t size, bool rnw) { struct scan_field field; uint8_t cmd[8]; @@ -138,7 +138,7 @@ static void ls1_sap_memory_cmd(struct jtag_tap *tap, uint32_t address, field.out_value = cmd; buf_set_u64(cmd, 0, 9, 0); buf_set_u64(cmd, 9, 3, size); - buf_set_u64(cmd, 12, 1, !!read); + buf_set_u64(cmd, 12, 1, rnw); buf_set_u64(cmd, 13, 3, 0); buf_set_u64(cmd, 16, 32, address); buf_set_u64(cmd, 48, 16, 0); @@ -190,7 +190,7 @@ static int ls1_sap_read_memory(struct target *target, uint32_t address, ls1_sap_set_addr_high(target->tap, 0); while (count--) { - ls1_sap_memory_cmd(target->tap, address, size, 1); + ls1_sap_memory_cmd(target->tap, address, size, true); ls1_sap_memory_read(target->tap, size, buffer); address += size; buffer += size; @@ -213,7 +213,7 @@ static int ls1_sap_write_memory(struct target *target, uint32_t address, ls1_sap_set_addr_high(target->tap, 0); while (count--) { - ls1_sap_memory_cmd(target->tap, address, size, 0); + ls1_sap_memory_cmd(target->tap, address, size, false); ls1_sap_memory_write(target->tap, size, buffer); address += size; buffer += size; |