use ARRAY_SIZE macro
[openocd.git] / src / jtag / rlink / rlink_speed_table.c
index f91a58eb5566335dc7a0f6d221bbe554b4101da5..2ef62ee3969fbb81d9078da667c9cf9bd819420a 100644 (file)
@@ -6,7 +6,7 @@
 #include "rlink.h"
 #include "st7.h"
 
-static const u8 dtc_64[] = {
+static const uint8_t dtc_64[] = {
        0, 2, 68, 84, 67, 2, 13, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148,
        191, 143, 142, 5, 3, 0, 0, 0, 2, 68, 84, 67, 4, 0, 192, 5, 15, 0, 42, 42,
        42, 73, 0, 88, 0, 160, 189, 0, 0, 0, 0, 106, 9, 1, 8, 22, 100, 111, 119,
@@ -27,7 +27,7 @@ static const u8 dtc_64[] = {
        60, 97, 203, 8, 2, 36, 139, 124, 193, 151, 96
 };
 
-static const u8 dtc_11[] = {
+static const uint8_t dtc_11[] = {
        0, 2, 68, 84, 67, 2, 13, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148,
        188, 143, 142, 5, 3, 0, 0, 0, 2, 68, 84, 67, 4, 0, 192, 5, 15, 0, 42, 42,
        42, 73, 0, 88, 0, 154, 183, 0, 0, 0, 0, 106, 9, 1, 8, 22, 100, 111, 119,
@@ -47,7 +47,7 @@ static const u8 dtc_11[] = {
        203, 8, 2, 36, 139, 117, 193, 151, 96
 };
 
-static const u8 dtc_8[] = {
+static const uint8_t dtc_8[] = {
        0, 2, 68, 84, 67, 2, 13, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148,
        187, 143, 142, 5, 3, 0, 0, 0, 2, 68, 84, 67, 4, 0, 192, 5, 15, 0, 42, 42,
        42, 73, 0, 88, 0, 152, 181, 0, 0, 0, 0, 106, 9, 1, 8, 22, 100, 111, 119,
@@ -67,7 +67,7 @@ static const u8 dtc_8[] = {
        8, 2, 36, 139, 115, 193, 151, 96
 };
 
-static const u8 dtc_2[] = {
+static const uint8_t dtc_2[] = {
        0, 2, 68, 84, 67, 2, 14, 160, 176, 151, 147, 182, 141, 152, 177, 129, 148,
        186, 143, 185, 142, 5, 3, 0, 0, 0, 2, 68, 84, 67, 4, 0, 192, 5, 15, 0,
        42, 42, 42, 73, 0, 88, 0, 149, 178, 0, 0, 0, 0, 106, 9, 1, 8, 22, 100,
@@ -87,7 +87,7 @@ static const u8 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
@@ -97,5 +97,5 @@ const rlink_speed_table_t rlink_speed_table[] = {{
        dtc_2, sizeof(dtc_2), (ST7_FOSC * 2) / (1000 * 2), 2
 }};
 
-const size_t rlink_speed_table_size = sizeof(rlink_speed_table) / sizeof(*rlink_speed_table);
+const size_t rlink_speed_table_size = ARRAY_SIZE(rlink_speed_table);
 

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)