aboutsummaryrefslogtreecommitdiff
path: root/src/target/dsp5680xx.c
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-01-02 20:35:09 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2021-01-13 11:33:53 +0000
commit7e64e5a895ecd9bf25c5d2b39ff3119dafa30489 (patch)
treeb1cb98a5c984c124501b8e9bd1983da082d79a05 /src/target/dsp5680xx.c
parent4cf5ab614bd830355065bb9400acf5484dc3f2c3 (diff)
downloadriscv-openocd-7e64e5a895ecd9bf25c5d2b39ff3119dafa30489.zip
riscv-openocd-7e64e5a895ecd9bf25c5d2b39ff3119dafa30489.tar.gz
riscv-openocd-7e64e5a895ecd9bf25c5d2b39ff3119dafa30489.tar.bz2
openocd: fix doxygen parameters of functions
Add to doxygen comment the missing parameters. Remove from doxygen comment any non-existing parameter. Fix the parameter names in doxygen comment to match the one in the function prototype. Where the parameter name in the doxygen description seems better than the one in the code, change the code. Escape the character '<' to prevent doxygen to interpret it as an xml tag. Change-Id: I22da723339ac7d7a7a64ac4c1cc4336e2416c2cc Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6002 Tested-by: jenkins
Diffstat (limited to 'src/target/dsp5680xx.c')
-rw-r--r--src/target/dsp5680xx.c49
1 files changed, 14 insertions, 35 deletions
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c
index ec07c25..62844ea 100644
--- a/src/target/dsp5680xx.c
+++ b/src/target/dsp5680xx.c
@@ -1410,27 +1410,21 @@ static int dsp5680xx_write_32(struct target *t, uint32_t a, uint32_t c,
* P: (program) memory or X: (dat) memory.
*
* @param target
- * @param address
+ * @param a address
* @param size Bytes (1), Half words (2), Words (4).
* @param count In bytes.
- * @param buffer
+ * @param b buffer
*
* @return
*/
-static int dsp5680xx_write(struct target *t, target_addr_t a, uint32_t s, uint32_t c,
+static int dsp5680xx_write(struct target *target, target_addr_t a, uint32_t size, uint32_t count,
const uint8_t *b)
{
/* TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012 */
- struct target *target = t;
-
uint32_t address = a;
- uint32_t count = c;
-
uint8_t const *buffer = b;
- uint32_t size = s;
-
check_halt_and_debug(target);
int retval = 0;
@@ -1479,12 +1473,12 @@ static int dsp5680xx_write_buffer(struct target *t, target_addr_t a, uint32_t si
*
* @return
*/
-static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t size,
- uint8_t *buf)
+static int dsp5680xx_read_buffer(struct target *target, target_addr_t address, uint32_t size,
+ uint8_t *buffer)
{
- check_halt_and_debug(t);
+ check_halt_and_debug(target);
/* The "/2" solves the byte/word addressing issue.*/
- return dsp5680xx_read(t, a, 2, size / 2, buf);
+ return dsp5680xx_read(target, address, 2, size / 2, buffer);
}
/**
@@ -1499,19 +1493,19 @@ static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t siz
*
* @return
*/
-static int dsp5680xx_checksum_memory(struct target *t, target_addr_t a, uint32_t s,
+static int dsp5680xx_checksum_memory(struct target *target, target_addr_t address, uint32_t size,
uint32_t *checksum)
{
return ERROR_FAIL;
}
/**
- * Calculates a signature over @a word_count words in the data from @a buff16.
+ * Calculates a signature over @a word_count words in the data from @a buff8.
* The algorithm used is the same the FM uses, so the @a return may be used to compare
* with the one generated by the FM module, and check if flashing was successful.
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
*
- * @param buff16
+ * @param buff8
* @param word_count
*
* @return
@@ -1609,7 +1603,7 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected)
* Some commands use the parameters @a address and @a data, others ignore them.
*
* @param target
- * @param command Command to execute.
+ * @param c Command to execute.
* @param address Command parameter.
* @param data Command parameter.
* @param hfm_ustat FM status register.
@@ -1617,21 +1611,10 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected)
*
* @return
*/
-static int dsp5680xx_f_ex(struct target *t, uint16_t c, uint32_t a, uint32_t d,
- uint16_t *h, int p)
+static int dsp5680xx_f_ex(struct target *target, uint16_t c, uint32_t address, uint32_t data,
+ uint16_t *hfm_ustat, int pmem)
{
- struct target *target = t;
-
uint32_t command = c;
-
- uint32_t address = a;
-
- uint32_t data = d;
-
- uint16_t *hfm_ustat = h;
-
- int pmem = p;
-
int retval;
retval = core_load_TX_RX_high_addr_to_r0(target);
@@ -1799,13 +1782,9 @@ static int set_fm_ck_div(struct target *target)
*
* @return
*/
-static int dsp5680xx_f_signature(struct target *t, uint32_t a, uint32_t words,
+static int dsp5680xx_f_signature(struct target *target, uint32_t address, uint32_t words,
uint16_t *signature)
{
- struct target *target = t;
-
- uint32_t address = a;
-
int retval;
uint16_t hfm_ustat;