OpenOCD
swim.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /*
4  * Copyright (C) 2020 by Antonio Borneo <borneo.antonio@gmail.com
5  */
6 
13 #ifndef OPENOCD_JTAG_SWIM_H
14 #define OPENOCD_JTAG_SWIM_H
15 
16 #define SWIM_FREQ_LOW 363
17 #define SWIM_FREQ_HIGH 800
18 
19 struct swim_driver {
25  int (*srst)(void);
26 
36  int (*read_mem)(uint32_t addr, uint32_t size, uint32_t count,
37  uint8_t *buffer);
38 
48  int (*write_mem)(uint32_t addr, uint32_t size, uint32_t count,
49  const uint8_t *buffer);
50 
58  int (*reconnect)(void);
59 };
60 
61 int swim_system_reset(void);
62 int swim_read_mem(uint32_t addr, uint32_t size, uint32_t count,
63  uint8_t *buffer);
64 int swim_write_mem(uint32_t addr, uint32_t size, uint32_t count,
65  const uint8_t *buffer);
66 int swim_reconnect(void);
67 
68 #endif /* OPENOCD_JTAG_SWIM_H */
uint32_t addr
Definition: nuttx.c:65
size_t size
Size of the control block search area.
Definition: rtt/rtt.c:30
int(* read_mem)(uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
Read target memory through ROTF (read on-the-fly) command.
Definition: swim.h:36
int(* reconnect)(void)
Reconnect to the target.
Definition: swim.h:58
int(* write_mem)(uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
Write target memory through WOTF (write on-the-fly) command.
Definition: swim.h:48
int(* srst)(void)
Send SRST (system reset) command to target.
Definition: swim.h:25
int swim_read_mem(uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
Definition: swim.c:29
int swim_reconnect(void)
Definition: swim.c:45
int swim_system_reset(void)
Definition: swim.c:22
int swim_write_mem(uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
Definition: swim.c:37
uint8_t count[4]
Definition: vdebug.c:22