1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2009 - 2010 by Simon Qian <SimonQian@SimonQian.com> *
5 ***************************************************************************/
7 #ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
8 #define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
10 #define VERSALOON_PRODUCTSTRING_INDEX 2
11 #define VERSALOON_SERIALSTRING_INDEX 3
13 #define VERSALOON_PRODUCTSTRING "Versaloon"
15 #define VERSALOON_VID 0x0483
16 #define VERSALOON_PID 0xA038
17 #define VERSALOON_INP 0x82
18 #define VERSALOON_OUTP 0x03
19 #define VERSALOON_IFACE 0x00
21 #define VERSALOON_FULL 1
22 #define VERSALOON_MINI 2
23 #define VERSALOON_NANO 3
25 #define VERSALOON_TIMEOUT 5000
26 #define VERSALOON_TIMEOUT_LONG 60000
30 #define VERSALOON_COMMON_CMD_START 0x00
31 #define VERSALOON_COMMON_CMD_END 0x0F
33 #define VERSALOON_GET_INFO 0x00
34 #define VERSALOON_GET_TVCC 0x01
35 #define VERSALOON_GET_HARDWARE 0x02
36 #define VERSALOON_GET_OFFLINE_SIZE 0x08
37 #define VERSALOON_ERASE_OFFLINE_DATA 0x09
38 #define VERSALOON_WRITE_OFFLINE_DATA 0x0A
39 #define VERSALOON_GET_OFFLINE_CHECKSUM 0x0B
40 #define VERSALOON_FW_UPDATE 0x0F
41 #define VERSALOON_FW_UPDATE_KEY 0xAA
44 #define VERSALOON_MCU_CMD_START 0x10
45 #define VERSALOON_MCU_CMD_END 0x1F
47 /* USB_TO_XXX Command */
48 #define VERSALOON_USB_TO_XXX_CMD_START 0x20
49 #define VERSALOON_USB_TO_XXX_CMD_END 0x7F
52 #define VERSALOON_VSLLINK_CMD_START 0x80
53 #define VERSALOON_VSLLINK_CMD_END 0xFF
62 #define VERSALOON_MAX_PENDING_NUMBER 4096
63 typedef RESULT(*versaloon_callback_t
)(void *, uint8_t *, uint8_t *);
64 struct versaloon_want_pos_t
{
68 struct versaloon_want_pos_t
*next
;
70 struct versaloon_pending_t
{
73 uint16_t want_data_pos
;
74 uint16_t want_data_size
;
75 uint16_t actual_data_size
;
79 struct versaloon_want_pos_t
*pos
;
81 versaloon_callback_t callback
;
83 extern struct versaloon_pending_t
84 versaloon_pending
[VERSALOON_MAX_PENDING_NUMBER
];
85 extern uint16_t versaloon_pending_idx
;
86 void versaloon_set_pending_id(uint32_t id
);
87 void versaloon_set_callback(versaloon_callback_t callback
);
88 void versaloon_set_extra_data(void *p
);
89 RESULT
versaloon_add_want_pos(uint16_t offset
, uint16_t size
, uint8_t *buff
);
90 RESULT
versaloon_add_pending(uint8_t type
, uint8_t cmd
, uint16_t actual_szie
,
91 uint16_t want_pos
, uint16_t want_size
, uint8_t *buffer
, uint8_t collect
);
92 void versaloon_free_want_pos(void);
94 RESULT
versaloon_send_command(uint16_t out_len
, uint16_t *inlen
);
95 extern uint8_t *versaloon_buf
;
96 extern uint8_t *versaloon_cmd_buf
;
97 extern uint16_t versaloon_buf_size
;
99 #endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H */
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)