ULINK driver and OpenULINK firmware: whitespace and comment fixes (trivial)
In commit de0130a0aa
, some doxygen documentation
blocks of the form "///< ..." (documentation after member) got changed to
"/* /< ...", which is not recognized by doxygen. This commit changes them to
the correct form "/**< ...".
Also, remove some leading whitespace characters and fix alignment of comment
blocks where appropriate.
Change-Id: I73a5cf55753722fa0e1d6551f05c47ee88172f0f
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
Reviewed-on: http://openocd.zylin.com/1483
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
7a3182fa42
commit
ba8e6f170c
|
@ -49,80 +49,80 @@
|
||||||
|
|
||||||
/** USB Device Descriptor. See USB 1.1 spec, pp. 196 - 198 */
|
/** USB Device Descriptor. See USB 1.1 spec, pp. 196 - 198 */
|
||||||
struct usb_device_descriptor {
|
struct usb_device_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< DEVICE Descriptor Type. */
|
uint8_t bDescriptorType; /**< DEVICE Descriptor Type. */
|
||||||
uint16_t bcdUSB; /* /< USB specification release number (BCD). */
|
uint16_t bcdUSB; /**< USB specification release number (BCD). */
|
||||||
uint8_t bDeviceClass; /* /< Class code. */
|
uint8_t bDeviceClass; /**< Class code. */
|
||||||
uint8_t bDeviceSubClass;/* /< Subclass code. */
|
uint8_t bDeviceSubClass; /**< Subclass code. */
|
||||||
uint8_t bDeviceProtocol;/* /< Protocol code. */
|
uint8_t bDeviceProtocol; /**< Protocol code. */
|
||||||
uint8_t bMaxPacketSize0;/* /< Maximum packet size for EP0 (8, 16, 32, 64). */
|
uint8_t bMaxPacketSize0; /**< Maximum packet size for EP0 (8, 16, 32, 64). */
|
||||||
uint16_t idVendor; /* /< USB Vendor ID. */
|
uint16_t idVendor; /**< USB Vendor ID. */
|
||||||
uint16_t idProduct; /* /< USB Product ID. */
|
uint16_t idProduct; /**< USB Product ID. */
|
||||||
uint16_t bcdDevice; /* /< Device Release Number (BCD). */
|
uint16_t bcdDevice; /**< Device Release Number (BCD). */
|
||||||
uint8_t iManufacturer; /* /< Index of manufacturer string descriptor. */
|
uint8_t iManufacturer; /**< Index of manufacturer string descriptor. */
|
||||||
uint8_t iProduct; /* /< Index of product string descriptor. */
|
uint8_t iProduct; /**< Index of product string descriptor. */
|
||||||
uint8_t iSerialNumber; /* /< Index of string descriptor containing serial #. */
|
uint8_t iSerialNumber; /**< Index of string descriptor containing serial #. */
|
||||||
uint8_t bNumConfigurations; /* /< Number of possible configurations. */
|
uint8_t bNumConfigurations; /**< Number of possible configurations. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** USB Configuration Descriptor. See USB 1.1 spec, pp. 199 - 200 */
|
/** USB Configuration Descriptor. See USB 1.1 spec, pp. 199 - 200 */
|
||||||
struct usb_config_descriptor {
|
struct usb_config_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< CONFIGURATION descriptor type. */
|
uint8_t bDescriptorType; /**< CONFIGURATION descriptor type. */
|
||||||
uint16_t wTotalLength; /* /< Combined total length of all descriptors. */
|
uint16_t wTotalLength; /**< Combined total length of all descriptors. */
|
||||||
uint8_t bNumInterfaces; /* /< Number of interfaces in this configuration. */
|
uint8_t bNumInterfaces; /**< Number of interfaces in this configuration. */
|
||||||
uint8_t bConfigurationValue; /* /< Value used to select this configuration. */
|
uint8_t bConfigurationValue; /**< Value used to select this configuration. */
|
||||||
uint8_t iConfiguration; /* /< Index of configuration string descriptor. */
|
uint8_t iConfiguration; /**< Index of configuration string descriptor. */
|
||||||
uint8_t bmAttributes; /* /< Configuration characteristics. */
|
uint8_t bmAttributes; /**< Configuration characteristics. */
|
||||||
uint8_t MaxPower; /* /< Maximum power consumption in 2 mA units. */
|
uint8_t MaxPower; /**< Maximum power consumption in 2 mA units. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** USB Interface Descriptor. See USB 1.1 spec, pp. 201 - 203 */
|
/** USB Interface Descriptor. See USB 1.1 spec, pp. 201 - 203 */
|
||||||
struct usb_interface_descriptor {
|
struct usb_interface_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< INTERFACE descriptor type. */
|
uint8_t bDescriptorType; /**< INTERFACE descriptor type. */
|
||||||
uint8_t bInterfaceNumber; /* /< Interface number. */
|
uint8_t bInterfaceNumber; /**< Interface number. */
|
||||||
uint8_t bAlternateSetting; /* /< Value used to select alternate setting. */
|
uint8_t bAlternateSetting; /**< Value used to select alternate setting. */
|
||||||
uint8_t bNumEndpoints; /* /< Number of endpoints used by this interface. */
|
uint8_t bNumEndpoints; /**< Number of endpoints used by this interface. */
|
||||||
uint8_t bInterfaceClass;/* /< Class code. */
|
uint8_t bInterfaceClass; /**< Class code. */
|
||||||
uint8_t bInterfaceSubclass; /* /< Subclass code. */
|
uint8_t bInterfaceSubclass; /**< Subclass code. */
|
||||||
uint8_t bInterfaceProtocol; /* /< Protocol code. */
|
uint8_t bInterfaceProtocol; /**< Protocol code. */
|
||||||
uint8_t iInterface; /* /< Index of interface string descriptor. */
|
uint8_t iInterface; /**< Index of interface string descriptor. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** USB Endpoint Descriptor. See USB 1.1 spec, pp. 203 - 204 */
|
/** USB Endpoint Descriptor. See USB 1.1 spec, pp. 203 - 204 */
|
||||||
struct usb_endpoint_descriptor {
|
struct usb_endpoint_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< ENDPOINT descriptor type. */
|
uint8_t bDescriptorType; /**< ENDPOINT descriptor type. */
|
||||||
uint8_t bEndpointAddress; /* /< Endpoint Address: USB 1.1 spec, table 9-10. */
|
uint8_t bEndpointAddress; /**< Endpoint Address: USB 1.1 spec, table 9-10. */
|
||||||
uint8_t bmAttributes; /* /< Endpoint Attributes: USB 1.1 spec, table 9-10. */
|
uint8_t bmAttributes; /**< Endpoint Attributes: USB 1.1 spec, table 9-10. */
|
||||||
uint16_t wMaxPacketSize;/* /< Maximum packet size for this endpoint. */
|
uint16_t wMaxPacketSize; /**< Maximum packet size for this endpoint. */
|
||||||
uint8_t bInterval; /* /< Polling interval (in ms) for this endpoint. */
|
uint8_t bInterval; /**< Polling interval (in ms) for this endpoint. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** USB Language Descriptor. See USB 1.1 spec, pp. 204 - 205 */
|
/** USB Language Descriptor. See USB 1.1 spec, pp. 204 - 205 */
|
||||||
struct usb_language_descriptor {
|
struct usb_language_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< STRING descriptor type. */
|
uint8_t bDescriptorType; /**< STRING descriptor type. */
|
||||||
uint16_t wLANGID[]; /* /< LANGID codes. */
|
uint16_t wLANGID[]; /**< LANGID codes. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** USB String Descriptor. See USB 1.1 spec, pp. 204 - 205 */
|
/** USB String Descriptor. See USB 1.1 spec, pp. 204 - 205 */
|
||||||
struct usb_string_descriptor {
|
struct usb_string_descriptor {
|
||||||
uint8_t bLength; /* /< Size of this descriptor in bytes. */
|
uint8_t bLength; /**< Size of this descriptor in bytes. */
|
||||||
uint8_t bDescriptorType;/* /< STRING descriptor type. */
|
uint8_t bDescriptorType; /**< STRING descriptor type. */
|
||||||
uint16_t bString[]; /* /< UNICODE encoded string. */
|
uint16_t bString[]; /**< UNICODE encoded string. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************** USB Control Endpoint 0 related *********************/
|
/********************** USB Control Endpoint 0 related *********************/
|
||||||
|
|
||||||
/** USB Control Setup Data. See USB 1.1 spec, pp. 183 - 185 */
|
/** USB Control Setup Data. See USB 1.1 spec, pp. 183 - 185 */
|
||||||
struct setup_data {
|
struct setup_data {
|
||||||
uint8_t bmRequestType; /* /< Characteristics of a request. */
|
uint8_t bmRequestType; /**< Characteristics of a request. */
|
||||||
uint8_t bRequest; /* /< Specific request. */
|
uint8_t bRequest; /**< Specific request. */
|
||||||
uint16_t wValue; /* /< Field that varies according to request. */
|
uint16_t wValue; /**< Field that varies according to request. */
|
||||||
uint16_t wIndex; /* /< Field that varies according to request. */
|
uint16_t wIndex; /**< Field that varies according to request. */
|
||||||
uint16_t wLength; /* /< Number of bytes to transfer in data stage. */
|
uint16_t wLength; /**< Number of bytes to transfer in data stage. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* External declarations for variables that need to be accessed outside of
|
/* External declarations for variables that need to be accessed outside of
|
||||||
|
|
|
@ -101,7 +101,7 @@ void jtag_scan_in(uint8_t out_offset, uint8_t in_offset)
|
||||||
tms_sequence_end = tms_sequence_end >> 1;
|
tms_sequence_end = tms_sequence_end >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTB = outb_buffer; /* TCK change here */
|
OUTB = outb_buffer; /* TCK changes here */
|
||||||
tdo_data = tdo_data >> 1;
|
tdo_data = tdo_data >> 1;
|
||||||
OUTB = (outb_buffer | PIN_TCK);
|
OUTB = (outb_buffer | PIN_TCK);
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ void jtag_slow_scan_in(uint8_t out_offset, uint8_t in_offset)
|
||||||
tms_sequence_end = tms_sequence_end >> 1;
|
tms_sequence_end = tms_sequence_end >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTB = outb_buffer; /* TCK change here */
|
OUTB = outb_buffer; /* TCK changes here */
|
||||||
for (k = 0; k < delay_scan_in; k++)
|
for (k = 0; k < delay_scan_in; k++)
|
||||||
;
|
;
|
||||||
tdo_data = tdo_data >> 1;
|
tdo_data = tdo_data >> 1;
|
||||||
|
@ -662,7 +662,7 @@ void jtag_slow_clock_tms(uint8_t count, uint8_t sequence)
|
||||||
* Get current JTAG signal states.
|
* Get current JTAG signal states.
|
||||||
*
|
*
|
||||||
* @return a 16-bit integer where the most-significant byte contains the state
|
* @return a 16-bit integer where the most-significant byte contains the state
|
||||||
* of the JTAG input signals and the least-significant byte cotains the state
|
* of the JTAG input signals and the least-significant byte contains the state
|
||||||
* of the JTAG output signals.
|
* of the JTAG output signals.
|
||||||
*/
|
*/
|
||||||
uint16_t jtag_get_signals(void)
|
uint16_t jtag_get_signals(void)
|
||||||
|
|
|
@ -123,14 +123,14 @@ enum ulink_delay_type {
|
||||||
* The last command sets #needs_postprocessing to true.
|
* The last command sets #needs_postprocessing to true.
|
||||||
*/
|
*/
|
||||||
struct ulink_cmd {
|
struct ulink_cmd {
|
||||||
uint8_t id; /* /< ULINK command ID */
|
uint8_t id; /**< ULINK command ID */
|
||||||
|
|
||||||
uint8_t *payload_out; /* /< OUT direction payload data */
|
uint8_t *payload_out; /**< OUT direction payload data */
|
||||||
uint8_t payload_out_size; /* /< OUT direction payload size for this command */
|
uint8_t payload_out_size; /**< OUT direction payload size for this command */
|
||||||
|
|
||||||
uint8_t *payload_in_start; /* /< Pointer to first element of IN payload array */
|
uint8_t *payload_in_start; /**< Pointer to first element of IN payload array */
|
||||||
uint8_t *payload_in; /* /< Pointer where IN payload shall be stored */
|
uint8_t *payload_in; /**< Pointer where IN payload shall be stored */
|
||||||
uint8_t payload_in_size;/* /< IN direction payload size for this command */
|
uint8_t payload_in_size; /**< IN direction payload size for this command */
|
||||||
|
|
||||||
/** Indicates if this command needs post-processing */
|
/** Indicates if this command needs post-processing */
|
||||||
bool needs_postprocessing;
|
bool needs_postprocessing;
|
||||||
|
@ -141,7 +141,7 @@ struct ulink_cmd {
|
||||||
/** Pointer to corresponding OpenOCD command for post-processing */
|
/** Pointer to corresponding OpenOCD command for post-processing */
|
||||||
struct jtag_command *cmd_origin;
|
struct jtag_command *cmd_origin;
|
||||||
|
|
||||||
struct ulink_cmd *next; /* /< Pointer to next command (linked list) */
|
struct ulink_cmd *next; /**< Pointer to next command (linked list) */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Describes one driver instance */
|
/** Describes one driver instance */
|
||||||
|
@ -150,15 +150,15 @@ struct ulink {
|
||||||
struct libusb_device_handle *usb_device_handle;
|
struct libusb_device_handle *usb_device_handle;
|
||||||
enum ulink_type type;
|
enum ulink_type type;
|
||||||
|
|
||||||
int delay_scan_in; /* /< Delay value for SCAN_IN commands */
|
int delay_scan_in; /**< Delay value for SCAN_IN commands */
|
||||||
int delay_scan_out; /* /< Delay value for SCAN_OUT commands */
|
int delay_scan_out; /**< Delay value for SCAN_OUT commands */
|
||||||
int delay_scan_io; /* /< Delay value for SCAN_IO commands */
|
int delay_scan_io; /**< Delay value for SCAN_IO commands */
|
||||||
int delay_clock_tck; /* /< Delay value for CLOCK_TMS commands */
|
int delay_clock_tck; /**< Delay value for CLOCK_TMS commands */
|
||||||
int delay_clock_tms; /* /< Delay value for CLOCK_TCK commands */
|
int delay_clock_tms; /**< Delay value for CLOCK_TCK commands */
|
||||||
|
|
||||||
int commands_in_queue; /* /< Number of commands in queue */
|
int commands_in_queue; /**< Number of commands in queue */
|
||||||
struct ulink_cmd *queue_start; /* /< Pointer to first command in queue */
|
struct ulink_cmd *queue_start; /**< Pointer to first command in queue */
|
||||||
struct ulink_cmd *queue_end; /* /< Pointer to last command in queue */
|
struct ulink_cmd *queue_end; /**< Pointer to last command in queue */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**************************** Function Prototypes *****************************/
|
/**************************** Function Prototypes *****************************/
|
||||||
|
@ -517,8 +517,8 @@ void ulink_print_signal_states(uint8_t input_signals, uint8_t output_signals)
|
||||||
(input_signals & SIGNAL_TDO ? 1 : 0),
|
(input_signals & SIGNAL_TDO ? 1 : 0),
|
||||||
(output_signals & SIGNAL_TMS ? 1 : 0),
|
(output_signals & SIGNAL_TMS ? 1 : 0),
|
||||||
(output_signals & SIGNAL_TCK ? 1 : 0),
|
(output_signals & SIGNAL_TCK ? 1 : 0),
|
||||||
(output_signals & SIGNAL_TRST ? 0 : 1),/* TRST and RESET are inverted */
|
(output_signals & SIGNAL_TRST ? 0 : 1), /* Inverted by hardware */
|
||||||
(output_signals & SIGNAL_RESET ? 0 : 1)); /* by hardware */
|
(output_signals & SIGNAL_RESET ? 0 : 1)); /* Inverted by hardware */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************** OpenULINK command generation helper functions ***************/
|
/**************** OpenULINK command generation helper functions ***************/
|
||||||
|
|
Loading…
Reference in New Issue