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 <jens@gpio.dk>
Reviewed-on: http://openocd.zylin.com/1973
Tested-by: jenkins
Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Jens Bauer 2014-02-25 22:05:13 +01:00 committed by Spencer Oliver
parent da0d1e374b
commit d585c1627a
1 changed files with 8 additions and 8 deletions

View File

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