summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 12:19:39 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 12:19:39 -0800
commitd16968e24f5d9e436ae4e136cd27652c4c948203 (patch)
tree4255ac70d59c57ba646b382d5ba87f2c84bee358 /src
parent96b62996d2d81b09a48bf253bc9e60e637f687bd (diff)
downloadopenocd_libswd-d16968e24f5d9e436ae4e136cd27652c4c948203.tar.gz
openocd_libswd-d16968e24f5d9e436ae4e136cd27652c4c948203.tar.bz2
openocd_libswd-d16968e24f5d9e436ae4e136cd27652c4c948203.tar.xz
openocd_libswd-d16968e24f5d9e436ae4e136cd27652c4c948203.zip
remove rlink structure typedefs
Remove useless typedefs from the rlink driver. Improve whitespace.
Diffstat (limited to 'src')
-rw-r--r--src/jtag/rlink/rlink.c17
-rw-r--r--src/jtag/rlink/rlink.h17
-rw-r--r--src/jtag/rlink/rlink_speed_table.c2
3 files changed, 17 insertions, 19 deletions
diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c
index bc354575..9dd8b888 100644
--- a/src/jtag/rlink/rlink.c
+++ b/src/jtag/rlink/rlink.c
@@ -576,8 +576,7 @@ dtc_run_download(
* The dtc reply queue is a singly linked list that describes what to do with the reply packet that comes from the DTC. Only SCAN_IN and SCAN_IO generate these entries.
*/
-typedef
-struct dtc_reply_queue_entry_s {
+struct dtc_reply_queue_entry {
struct dtc_reply_queue_entry_s *next;
jtag_command_t *cmd; /* the command that resulted in this entry */
@@ -588,7 +587,7 @@ struct dtc_reply_queue_entry_s {
int length; /* how many bits are processed in this operation? */
enum scan_type type; /* SCAN_IN/SCAN_OUT/SCAN_IO */
} scan;
-} dtc_reply_queue_entry_t;
+};
/*
@@ -598,8 +597,8 @@ struct dtc_reply_queue_entry_s {
static
struct {
- dtc_reply_queue_entry_t *rq_head;
- dtc_reply_queue_entry_t *rq_tail;
+ struct dtc_reply_queue_entry *rq_head;
+ struct dtc_reply_queue_entry *rq_tail;
uint32_t cmd_index;
uint32_t reply_index;
uint8_t cmd_buffer[USB_EP2BANK_SIZE];
@@ -631,7 +630,7 @@ dtc_queue_init(void) {
static
inline
-dtc_reply_queue_entry_t *
+struct dtc_reply_queue_entry *
dtc_queue_enqueue_reply(
enum scan_type type,
uint8_t *buffer,
@@ -640,9 +639,9 @@ dtc_queue_enqueue_reply(
int length,
jtag_command_t *cmd
) {
- dtc_reply_queue_entry_t *rq_entry;
+ struct dtc_reply_queue_entry *rq_entry;
- rq_entry = malloc(sizeof(dtc_reply_queue_entry_t));
+ rq_entry = malloc(sizeof(struct dtc_reply_queue_entry));
if (rq_entry != NULL) {
rq_entry->scan.type = type;
rq_entry->scan.buffer = buffer;
@@ -672,7 +671,7 @@ dtc_queue_enqueue_reply(
static
int
dtc_queue_run(void) {
- dtc_reply_queue_entry_t *rq_p, *rq_next;
+ struct dtc_reply_queue_entry *rq_p, *rq_next;
int retval;
int usb_err;
int bit_cnt;
diff --git a/src/jtag/rlink/rlink.h b/src/jtag/rlink/rlink.h
index 6bab26e6..b53be5ce 100644
--- a/src/jtag/rlink/rlink.h
+++ b/src/jtag/rlink/rlink.h
@@ -20,13 +20,12 @@
#include "types.h"
-typedef
-struct rlink_speed_table_s {
- uint8_t const *dtc;
- uint16_t dtc_size;
- uint16_t khz;
- uint8_t prescaler;
-} rlink_speed_table_t;
+struct rlink_speed_table {
+ uint8_t const *dtc;
+ uint16_t dtc_size;
+ uint16_t khz;
+ uint8_t prescaler;
+};
-extern const rlink_speed_table_t rlink_speed_table[];
-extern const size_t rlink_speed_table_size;
+extern const struct rlink_speed_table rlink_speed_table[];
+extern const size_t rlink_speed_table_size;
diff --git a/src/jtag/rlink/rlink_speed_table.c b/src/jtag/rlink/rlink_speed_table.c
index 1f3e973b..5c40ab46 100644
--- a/src/jtag/rlink/rlink_speed_table.c
+++ b/src/jtag/rlink/rlink_speed_table.c
@@ -87,7 +87,7 @@ static const uint8_t dtc_2[] = {
36, 139, 112, 193, 151, 96
};
-const rlink_speed_table_t rlink_speed_table[] = {{
+const struct rlink_speed_table rlink_speed_table[] = {{
dtc_64, sizeof(dtc_64), (ST7_FOSC * 2) / (1000 * 64), 64
}, {
dtc_11, sizeof(dtc_11), (ST7_FOSC * 2) / (1000 * 11), 11