OpenOCD
swim.c File Reference
Include dependency graph for swim.c:

Go to the source code of this file.

Functions

 COMMAND_HANDLER (handle_swim_newtap_command)
 
static void swim_constructor (void)
 
int swim_read_mem (uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
 
int swim_reconnect (void)
 
int swim_system_reset (void)
 
static int swim_transport_init (struct command_context *cmd_ctx)
 
static int swim_transport_select (struct command_context *cmd_ctx)
 
int swim_write_mem (uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
 
bool transport_is_swim (void)
 

Variables

struct adapter_driveradapter_driver
 
static struct transport swim_transport
 
static const struct command_registration swim_transport_command_handlers []
 
static const struct command_registration swim_transport_subcommand_handlers []
 

Function Documentation

◆ COMMAND_HANDLER()

◆ swim_constructor()

static void swim_constructor ( void  )
static

Definition at line 144 of file swim.c.

◆ swim_read_mem()

int swim_read_mem ( uint32_t  addr,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer 
)

Definition at line 29 of file swim.c.

References addr, buffer, count, swim_driver::read_mem, size, and adapter_driver::swim_ops.

Referenced by stm8_adapter_read_memory(), and stm8_read_u8().

◆ swim_reconnect()

int swim_reconnect ( void  )

Definition at line 45 of file swim.c.

References swim_driver::reconnect, and adapter_driver::swim_ops.

Referenced by stm8_examine().

◆ swim_system_reset()

int swim_system_reset ( void  )

Definition at line 22 of file swim.c.

References swim_driver::srst, and adapter_driver::swim_ops.

Referenced by stm8_reset_assert().

◆ swim_transport_init()

static int swim_transport_init ( struct command_context cmd_ctx)
static

Definition at line 121 of file swim.c.

◆ swim_transport_select()

static int swim_transport_select ( struct command_context cmd_ctx)
static

Definition at line 114 of file swim.c.

References LOG_DEBUG, NULL, register_commands(), and swim_transport_command_handlers.

◆ swim_write_mem()

int swim_write_mem ( uint32_t  addr,
uint32_t  size,
uint32_t  count,
const uint8_t *  buffer 
)

Definition at line 37 of file swim.c.

References addr, buffer, count, size, adapter_driver::swim_ops, and swim_driver::write_mem.

Referenced by stm8_adapter_write_memory(), and stm8_write_u8().

◆ transport_is_swim()

bool transport_is_swim ( void  )

Variable Documentation

◆ adapter_driver

Definition at line 26 of file adapter.c.

◆ swim_transport

struct transport swim_transport
static
Initial value:
= {
.name = "swim",
}
static int swim_transport_select(struct command_context *cmd_ctx)
Definition: swim.c:114
static int swim_transport_init(struct command_context *cmd_ctx)
Definition: swim.c:121

Definition at line 121 of file swim.c.

Referenced by transport_is_swim().

◆ swim_transport_command_handlers

const struct command_registration swim_transport_command_handlers[]
static
Initial value:
= {
{
.name = "swim",
.mode = COMMAND_ANY,
.help = "perform swim adapter actions",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration swim_transport_subcommand_handlers[]
Definition: swim.c:91

Definition at line 52 of file swim.c.

Referenced by swim_transport_select().

◆ swim_transport_subcommand_handlers

const struct command_registration swim_transport_subcommand_handlers[]
static
Initial value:
= {
{
.name = "newtap",
.handler = handle_swim_newtap_command,
.mode = COMMAND_CONFIG,
.help = "Create a new TAP instance named basename.tap_type, "
"and appends it to the scan chain.",
.usage = "basename tap_type",
},
}
@ COMMAND_CONFIG
Definition: command.h:41

Definition at line 52 of file swim.c.