X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fjtag%2Fjlink.c;h=56187e2e2be8ed57e9cb2748d13a9c69b57a2e75;hb=f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1;hp=97a8e48577f466924a7281ca61bc093f2ac0b88a;hpb=53d605e12c3765aeedabf2bfe0c5cc338dc95d5a;p=openocd.git diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index 97a8e48577..56187e2e2b 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -50,7 +50,7 @@ static unsigned int jlink_hw_jtag_version = 2; //#define JLINK_TAP_BUFFER_SIZE 384 #define JLINK_IN_BUFFER_SIZE 2048 -#define JLINK_OUT_BUFFER_SIZE 2*2048+4 +#define JLINK_OUT_BUFFER_SIZE 2*2048 + 4 #define JLINK_EMU_RESULT_BUFFER_SIZE 64 /* Global USB buffers */ @@ -299,7 +299,7 @@ static int jlink_register_commands(struct command_context_s *cmd_ctx) "query jlink info"); register_command(cmd_ctx, NULL, "jlink_hw_jtag", &jlink_handle_jlink_hw_jtag_command, COMMAND_EXEC, - "set/get jlink hw jtag command version [2|3]"); + "set/get jlink hw jtag command version [2 | 3]"); return ERROR_OK; } @@ -669,7 +669,7 @@ static int jlink_handle_jlink_hw_jtag_command(struct command_context_s *cmd_ctx, /* J-Link tap functions */ -static unsigned tap_length=0; +static unsigned tap_length = 0; static uint8_t tms_buffer[JLINK_TAP_BUFFER_SIZE]; static uint8_t tdi_buffer[JLINK_TAP_BUFFER_SIZE]; static uint8_t tdo_buffer[JLINK_TAP_BUFFER_SIZE]; @@ -770,7 +770,7 @@ static int jlink_tap_execute(void) /* JLink returns an extra NULL in packet when size of in message is a multiple of 64, creates problems with usb comms */ /* WARNING This will interfere with tap state counting */ - while ((TAP_SCAN_BYTES(tap_length)%64)==0) + while ((TAP_SCAN_BYTES(tap_length)%64) == 0) { jlink_tap_append_step((tap_get_state() == TAP_RESET)?1:0, 0); } @@ -931,13 +931,13 @@ static int jlink_usb_message(jlink_jtag_t *jlink_jtag, int out_length, int in_le result2 = jlink_usb_read_emu_result(jlink_jtag); if (1 != result2) { - LOG_ERROR("jlink_usb_read_emu_result retried requested=1, result=%d, in_length=%i", result2,in_length); - /* Try again once, should only happen if (in_length%64==0) */ + LOG_ERROR("jlink_usb_read_emu_result retried requested = 1, result=%d, in_length=%i", result2,in_length); + /* Try again once, should only happen if (in_length%64 == 0) */ result2 = jlink_usb_read_emu_result(jlink_jtag); if (1 != result2) { LOG_ERROR("jlink_usb_read_emu_result failed " - "(requested=1, result=%d)", result2); + "(requested = 1, result=%d)", result2); return ERROR_JTAG_DEVICE_ERROR; } }