From d585c1627a14e7789aa659d73c43a1408657b041 Mon Sep 17 00:00:00 2001 From: Jens Bauer Date: Tue, 25 Feb 2014 22:05:13 +0100 Subject: [PATCH] CMSIS-DAP: Fix build errors on Mac OS X Rename the argument variable 'wait' to 'delay', as 'wait' conflicts with an API function declared in system header /usr/include/sys/wait.h on Mac OS X. Change-Id: I5742da6e5def6e5ec197e774c3844e4bf0424569 Signed-off-by: Jens Bauer Reviewed-on: http://openocd.zylin.com/1973 Tested-by: jenkins Reviewed-by: Andrey Yurovsky Reviewed-by: Spencer Oliver --- src/jtag/drivers/cmsis_dap_usb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c index 29bb15bc..f4d08ca9 100644 --- a/src/jtag/drivers/cmsis_dap_usb.c +++ b/src/jtag/drivers/cmsis_dap_usb.c @@ -284,7 +284,7 @@ static int cmsis_dap_usb_xfer(struct cmsis_dap *dap, int txlen) return ERROR_OK; } -static int cmsis_dap_cmd_DAP_SWJ_Pins(uint8_t pins, uint8_t mask, uint32_t wait, uint8_t *input) +static int cmsis_dap_cmd_DAP_SWJ_Pins(uint8_t pins, uint8_t mask, uint32_t delay, uint8_t *input) { int retval; uint8_t *buffer = cmsis_dap_handle->packet_buffer; @@ -293,10 +293,10 @@ static int cmsis_dap_cmd_DAP_SWJ_Pins(uint8_t pins, uint8_t mask, uint32_t wait, buffer[1] = CMD_DAP_SWJ_PINS; buffer[2] = pins; buffer[3] = mask; - buffer[4] = wait & 0xff; - buffer[5] = (wait >> 8) & 0xff; - buffer[6] = (wait >> 16) & 0xff; - buffer[7] = (wait >> 24) & 0xff; + buffer[4] = delay & 0xff; + buffer[5] = (delay >> 8) & 0xff; + buffer[6] = (delay >> 16) & 0xff; + buffer[7] = (delay >> 24) & 0xff; retval = cmsis_dap_usb_xfer(cmsis_dap_handle, 8); if (retval != ERROR_OK) { @@ -412,7 +412,7 @@ static int cmsis_dap_cmd_DAP_Disconnect(void) return ERROR_OK; } -static int cmsis_dap_cmd_DAP_TFER_Configure(uint8_t idle, uint16_t wait, uint16_t retry) +static int cmsis_dap_cmd_DAP_TFER_Configure(uint8_t idle, uint16_t delay, uint16_t retry) { int retval; uint8_t *buffer = cmsis_dap_handle->packet_buffer; @@ -420,8 +420,8 @@ static int cmsis_dap_cmd_DAP_TFER_Configure(uint8_t idle, uint16_t wait, uint16_ buffer[0] = 0; /* report number */ buffer[1] = CMD_DAP_TFER_CONFIGURE; buffer[2] = idle; - buffer[3] = wait & 0xff; - buffer[4] = (wait >> 8) & 0xff; + buffer[3] = delay & 0xff; + buffer[4] = (delay >> 8) & 0xff; buffer[5] = retry & 0xff; buffer[6] = (retry >> 8) & 0xff; retval = cmsis_dap_usb_xfer(cmsis_dap_handle, 7); -- 2.39.5