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>
This commit is contained in:
Mathias K
2013-10-24 14:11:33 +02:00
committed by Spencer Oliver
parent edfb677d34
commit 1e6970dafd
5 changed files with 39 additions and 39 deletions

View File

@@ -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);
}

View File

@@ -58,7 +58,7 @@ struct hl_interface_s {
/** */
const struct hl_layout *layout;
/** */
void *fd;
void *handle;
};
/** */

View File

@@ -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");

View File

@@ -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);
};
/** */