Improve lpc288x.c command argument parsing.
[openocd.git] / src / flash / lpc288x.c
index e40ec4423b080f89b965e21472100616eaeb90af..61aa3a008edfe643b6f017a3b8b593108a8afd47 100644 (file)
@@ -127,7 +127,7 @@ static uint32_t lpc288x_wait_status_busy(flash_bank_t *bank, int timeout)
                alive_sleep(1);
                timeout--;
                target_read_u32(target, F_STAT, &status);
-       }while (((status & FS_DONE) == 0) && timeout);
+       } while (((status & FS_DONE) == 0) && timeout);
 
        if (timeout == 0)
        {
@@ -209,13 +209,13 @@ static int lpc288x_flash_bank_command(struct command_context_s *cmd_ctx, char *c
 
        /* part wasn't probed for info yet */
        lpc288x_info->cidr = 0;
-       lpc288x_info->cclk = strtoul(args[6], NULL, 0);
+       COMMAND_PARSE_NUMBER(u32, args[6], lpc288x_info->cclk);
 
        return ERROR_OK;
 }
 
-/* The frequency is the AHB clock frequency divided by (CLK_DIV ×3) + 1.
- * This must be programmed such that the Flash Programming clock frequency is 66 kHz ± 20%.
+/* The frequency is the AHB clock frequency divided by (CLK_DIV ×3) + 1.
+ * This must be programmed such that the Flash Programming clock frequency is 66 kHz Â± 20%.
  * AHB = 12 MHz ?
  * 12000000/66000 = 182
  * CLK_DIV = 60 ? */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)