diff options
author | Mathias K <kesmtp@freenet.de> | 2013-10-24 14:11:33 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-11-07 22:19:50 +0000 |
commit | 1e6970dafdccfec388d1a816c2019f9c6b26e338 (patch) | |
tree | 6b854af8c7cccdaaf789f2ae03f7ea5db25bfe86 /src/jtag | |
parent | edfb677d3466a0d88fe9bd5ec1d8785a41b6bc4e (diff) |
hla: Make consistent parameter naming
Rename fd to handle.
Change-Id: I98615aed1546976d00b0f20856d4e8e75f83c575
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/1761
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/hla/hla_interface.c | 4 | ||||
-rw-r--r-- | src/jtag/hla/hla_interface.h | 2 | ||||
-rw-r--r-- | src/jtag/hla/hla_layout.c | 4 | ||||
-rw-r--r-- | src/jtag/hla/hla_layout.h | 22 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index 91931330..81cac488 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -72,7 +72,7 @@ int hl_interface_init_target(struct target *t) * can setup the private pointer in the tap structure * if the interface match the tap idcode */ - res = hl_if.layout->api->idcode(hl_if.fd, &t->tap->idcode); + res = hl_if.layout->api->idcode(hl_if.handle, &t->tap->idcode); if (res != ERROR_OK) return res; @@ -137,7 +137,7 @@ int hl_interface_init_reset(void) * we will attempt it again */ if (hl_if.param.connect_under_reset) { jtag_add_reset(0, 1); - hl_if.layout->api->assert_srst(hl_if.fd, 0); + hl_if.layout->api->assert_srst(hl_if.handle, 0); } else { jtag_add_reset(0, 0); } diff --git a/src/jtag/hla/hla_interface.h b/src/jtag/hla/hla_interface.h index fcf1d9e2..13c169f2 100644 --- a/src/jtag/hla/hla_interface.h +++ b/src/jtag/hla/hla_interface.h @@ -58,7 +58,7 @@ struct hl_interface_s { /** */ const struct hl_layout *layout; /** */ - void *fd; + void *handle; }; /** */ diff --git a/src/jtag/hla/hla_layout.c b/src/jtag/hla/hla_layout.c index 1d22fe13..0a20fbd3 100644 --- a/src/jtag/hla/hla_layout.c +++ b/src/jtag/hla/hla_layout.c @@ -41,9 +41,9 @@ static int hl_layout_open(struct hl_interface_s *adapter) LOG_DEBUG("hl_layout_open"); - adapter->fd = NULL; + adapter->handle = NULL; - res = adapter->layout->api->open(&adapter->param, &adapter->fd); + res = adapter->layout->api->open(&adapter->param, &adapter->handle); if (res != ERROR_OK) { LOG_DEBUG("failed"); diff --git a/src/jtag/hla/hla_layout.h b/src/jtag/hla/hla_layout.h index ccc3a003..9a991b65 100644 --- a/src/jtag/hla/hla_layout.h +++ b/src/jtag/hla/hla_layout.h @@ -35,25 +35,25 @@ extern struct hl_layout_api_s icdi_usb_layout_api; /** */ struct hl_layout_api_s { /** */ - int (*open) (struct hl_interface_param_s *param, void **fd); + int (*open) (struct hl_interface_param_s *param, void **handle); /** */ - int (*close) (void *fd); + int (*close) (void *handle); /** */ - int (*reset) (void *fd); + int (*reset) (void *handle); /** */ - int (*assert_srst) (void *fd, int srst); + int (*assert_srst) (void *handle, int srst); /** */ - int (*run) (void *fd); + int (*run) (void *handle); /** */ - int (*halt) (void *fd); + int (*halt) (void *handle); /** */ - int (*step) (void *fd); + int (*step) (void *handle); /** */ - int (*read_regs) (void *fd); + int (*read_regs) (void *handle); /** */ - int (*read_reg) (void *fd, int num, uint32_t *val); + int (*read_reg) (void *handle, int num, uint32_t *val); /** */ - int (*write_reg) (void *fd, int num, uint32_t val); + int (*write_reg) (void *handle, int num, uint32_t val); /** */ int (*read_mem) (void *handle, uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer); @@ -74,7 +74,7 @@ struct hl_layout_api_s { */ int (*idcode) (void *handle, uint32_t *idcode); /** */ - enum target_state (*state) (void *fd); + enum target_state (*state) (void *handle); }; /** */ |