summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 09:48:18 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 11:58:13 -0800
commitd64a873db44258470b50f370f2c8af71157952d0 (patch)
tree54e2929c0be1ee9ba84f0a067de0a9dd1f7353e1 /src
parentdfecfd5fd471708ac15af08b52964e8f8da9f4be (diff)
downloadopenocd_libswd-d64a873db44258470b50f370f2c8af71157952d0.tar.gz
openocd_libswd-d64a873db44258470b50f370f2c8af71157952d0.tar.bz2
openocd_libswd-d64a873db44258470b50f370f2c8af71157952d0.tar.xz
openocd_libswd-d64a873db44258470b50f370f2c8af71157952d0.zip
improve mips32_pracc_context
Use struct mips32_pracc_context instead of a typedef.
Diffstat (limited to 'src')
-rw-r--r--src/target/mips32_pracc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c
index 4f597a5e..abc4a6f5 100644
--- a/src/target/mips32_pracc.c
+++ b/src/target/mips32_pracc.c
@@ -77,7 +77,8 @@ Nico Coesel
#include "mips32.h"
#include "mips32_pracc.h"
-typedef struct {
+struct mips32_pracc_context
+{
uint32_t *local_iparam;
int num_iparam;
uint32_t *local_oparam;
@@ -87,7 +88,7 @@ typedef struct {
uint32_t stack[32];
int stack_offset;
struct mips_ejtag *ejtag_info;
-} mips32_pracc_context;
+};
static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
{
@@ -108,7 +109,7 @@ static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
return ERROR_OK;
}
-static int mips32_pracc_exec_read(mips32_pracc_context *ctx, uint32_t address)
+static int mips32_pracc_exec_read(struct mips32_pracc_context *ctx, uint32_t address)
{
struct mips_ejtag *ejtag_info = ctx->ejtag_info;
int offset;
@@ -164,7 +165,7 @@ static int mips32_pracc_exec_read(mips32_pracc_context *ctx, uint32_t address)
return ERROR_OK;
}
-static int mips32_pracc_exec_write(mips32_pracc_context *ctx, uint32_t address)
+static int mips32_pracc_exec_write(struct mips32_pracc_context *ctx, uint32_t address)
{
uint32_t ejtag_ctrl,data;
int offset;
@@ -211,7 +212,7 @@ int mips32_pracc_exec(struct mips_ejtag *ejtag_info, int code_len, uint32_t *cod
{
uint32_t ejtag_ctrl;
uint32_t address, data;
- mips32_pracc_context ctx;
+ struct mips32_pracc_context ctx;
int retval;
int pass = 0;