summaryrefslogtreecommitdiff
path: root/src/jtag/interface.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-16 03:29:30 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-16 09:58:11 -0800
commitdc1685ca25567fe75c8d50c825fb0303fbb66fac (patch)
treee51e63fe1e40d3c60673f57784f88c43277f5eba /src/jtag/interface.c
parent10cce4a5fe85bfd680bc338c900b0033d7174b6a (diff)
downloadopenocd+libswd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.tar.gz
openocd+libswd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.tar.bz2
openocd+libswd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.tar.xz
openocd+libswd-dc1685ca25567fe75c8d50c825fb0303fbb66fac.zip
move ARRAY_SIZE macro to types.h
The ARRAY_SIZE macro was defined in several target files, so move it to types.h. This patch also removes two other identical macros: DIM (from jtag.h) and asizeof (from arm11.h).
Diffstat (limited to 'src/jtag/interface.c')
-rw-r--r--src/jtag/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/interface.c b/src/jtag/interface.c
index f0624142..1ed45123 100644
--- a/src/jtag/interface.c
+++ b/src/jtag/interface.c
@@ -363,7 +363,7 @@ const char *tap_state_name(tap_state_t state)
{
unsigned i;
- for (i = 0; i < DIM(tap_name_mapping); i++) {
+ for (i = 0; i < ARRAY_SIZE(tap_name_mapping); i++) {
if (tap_name_mapping[i].symbol == state)
return tap_name_mapping[i].name;
}
@@ -374,7 +374,7 @@ tap_state_t tap_state_by_name(const char *name)
{
unsigned i;
- for (i = 0; i < DIM(tap_name_mapping); i++) {
+ for (i = 0; i < ARRAY_SIZE(tap_name_mapping); i++) {
/* be nice to the human */
if (strcasecmp(name, tap_name_mapping[i].name) == 0)
return tap_name_mapping[i].symbol;