Hi all,

This trivial patch adds comment rulers to aid navigation.  It will apply
cleanly on top of the previous patch to factor jlink_execute_queue.

This is my last cosmetic improvement for now, as I have started to pull
out the pieces from Jeff's patches.  Now the fun(ctional) work begins.

Cheers,

Zach

diff -u src/jtag/jlink.c src/jtag/jlink.c
--- src/jtag/jlink.c	(working copy)
+++ src/jtag/jlink.c	(working copy)
@@ -64,6 +64,8 @@
 /* max speed 12MHz v5.0 jlink */
 #define JLINK_MAX_SPEED 12000
 
+/* ================================================================= */
+
 /* External interface functions */
 static int jlink_execute_queue(void);
 static int jlink_speed(int speed);
@@ -115,7 +117,8 @@
 
 static jlink_jtag_t* jlink_jtag_handle;
 
-/***************************************************************************/
+/* ================================================================= */
+/* ================================================================= */
 /* External interface implementation */
 
 jtag_interface_t jlink_interface =
@@ -130,6 +133,8 @@
 	.quit = jlink_quit
 };
 
+/* ================================================================= */
+
 static void jlink_execute_end_state(jtag_command_t *cmd)
 {
 	DEBUG_JTAG_IO("end_state: %i", cmd->cmd.end_state->end_state);
@@ -243,6 +248,8 @@
 	return jlink_tap_execute();
 }
 
+/* ================================================================= */
+
 /* Sets speed in kHz. */
 static int jlink_speed(int speed)
 {
@@ -287,6 +294,8 @@
 	return ERROR_OK;
 }
 
+/* ================================================================= */
+
 static int jlink_register_commands(struct command_context_s *cmd_ctx)
 {
 	register_command(cmd_ctx, NULL, "jlink_info", jlink_handle_jlink_info_command, COMMAND_EXEC,
@@ -294,6 +303,8 @@
 	return ERROR_OK;
 }
 
+/* ================================================================= */
+
 static int jlink_init(void)
 {
 	int check_cnt;
@@ -338,7 +349,8 @@
 	return ERROR_OK;
 }
 
-/***************************************************************************/
+/* ================================================================= */
+/* ================================================================= */
 /* Queue command implementations */
 
 static void jlink_end_state(tap_state_t state)
@@ -478,6 +490,8 @@
 	}
 }
 
+/* ================================================================= */
+
 static void jlink_simple_command(u8 command)
 {
 	int result;
@@ -493,6 +507,8 @@
 	}
 }
 
+/* ================================================================= */
+
 static int jlink_get_status(void)
 {
 	int result;
@@ -549,6 +565,8 @@
 	return ERROR_OK;
 }
 
+/* ================================================================= */
+
 static int jlink_handle_jlink_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
 	if (jlink_get_version_info() == ERROR_OK)
@@ -560,7 +578,8 @@
 	return ERROR_OK;
 }
 
-/***************************************************************************/
+/* ================================================================= */
+/* ================================================================= */
 /* J-Link tap functions */
 
 /* 2048 is the max value we can use here */
@@ -586,6 +605,8 @@
 
 static int last_tms;
 
+/* ================================================================= */
+
 static void jlink_tap_init(void)
 {
 	tap_length = 0;
@@ -603,6 +624,8 @@
 	}
 }
 
+/* ================================================================= */
+
 static void jlink_tap_append_step(int tms, int tdi)
 {
 	last_tms = tms;
@@ -650,6 +673,8 @@
 	pending_scan_results_length++;
 }
 
+/* ================================================================= */
+
 /* Pad and send a tap sequence to the device, and receive the answer.
  * For the purpose of padding we assume that we are in idle or pause state. */
 static int jlink_tap_execute(void)
@@ -736,7 +761,8 @@
 	return ERROR_OK;
 }
 
-/*****************************************************************************/
+/* ================================================================= */
+/* ================================================================= */
 /* JLink USB low-level functions */
 
 static jlink_jtag_t* jlink_usb_open()
@@ -842,6 +868,8 @@
 	return result;
 }
 
+/* ================================================================= */
+
 /* calls the given usb_bulk_* function, allowing for the data to trickle in with some timeouts  */
 static int usb_bulk_with_retries(
 		int (*f)(usb_dev_handle *, int, char *, int, int),
@@ -877,6 +905,8 @@
 			dev, ep, bytes, size, timeout);
 }
 
+/* ================================================================= */
+
 /* Write data from out_buffer to USB. */
 static int jlink_usb_write(jlink_jtag_t *jlink_jtag, int out_length)
 {
@@ -928,6 +958,8 @@
 	return result;
 }
 
+/* ================================================================= */
+
 #ifdef _DEBUG_USB_COMMS_
 #define BYTES_PER_LINE  16
 
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to