OpenOCD
hl_layout_api Struct Reference

Data Fields

int(* assert_srst )(void *handle, int srst)
 
int(* close )(void *handle)
 
int(* config_trace )(void *handle, bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)
 Configure trace parameters for the adapter. More...
 
int(* custom_command )(void *handle, const char *command)
 
int(* halt )(void *handle)
 
int(* idcode )(void *handle, uint32_t *idcode)
 Read the idcode of the target connected to the adapter. More...
 
int(* open )(struct hl_interface_param *param, void **handle)
 
int(* override_target )(const char *targetname)
 
int(* poll_trace )(void *handle, uint8_t *buf, size_t *size)
 Poll for new trace data. More...
 
int(* read_mem )(void *handle, uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)
 
int(* read_reg )(void *handle, unsigned int regsel, uint32_t *val)
 Read one register from the target. More...
 
int(* read_regs )(void *handle)
 
int(* reset )(void *handle)
 
int(* run )(void *handle)
 
int(* speed )(void *handle, int khz, bool query)
 
enum target_state(* state )(void *fd)
 
int(* step )(void *handle)
 
int(* write_debug_reg )(void *handle, uint32_t addr, uint32_t val)
 
int(* write_mem )(void *handle, uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)
 
int(* write_reg )(void *handle, unsigned int regsel, uint32_t val)
 Write one register to the target. More...
 

Detailed Description

Definition at line 27 of file hla_layout.h.

Field Documentation

◆ assert_srst

int(* hl_layout_api::assert_srst) (void *handle, int srst)

Definition at line 35 of file hla_layout.h.

Referenced by hl_interface_reset().

◆ close

int(* hl_layout_api::close) (void *handle)

Definition at line 31 of file hla_layout.h.

Referenced by hl_interface_quit().

◆ config_trace

int(* hl_layout_api::config_trace) (void *handle, bool enabled, enum tpiu_pin_protocol pin_protocol, uint32_t port_size, unsigned int *trace_freq, unsigned int traceclkin_freq, uint16_t *prescaler)

Configure trace parameters for the adapter.

Parameters
handleA handle to adapter
enabledWhether to enable trace
pin_protocolConfigured pin protocol
port_sizeTrace port width for sync mode
trace_freqA pointer to the configured trace frequency; if it points to 0, the adapter driver must write its maximum supported rate there
Returns
ERROR_OK on success, an error code on failure.

Definition at line 100 of file hla_layout.h.

Referenced by hl_interface_config_trace().

◆ custom_command

int(* hl_layout_api::custom_command) (void *handle, const char *command)

Definition at line 85 of file hla_layout.h.

Referenced by COMMAND_HANDLER().

◆ halt

int(* hl_layout_api::halt) (void *handle)

Definition at line 39 of file hla_layout.h.

◆ idcode

int(* hl_layout_api::idcode) (void *handle, uint32_t *idcode)

Read the idcode of the target connected to the adapter.

If the adapter doesn't support idcode retrieval, this callback should store 0 to indicate a wildcard match.

Parameters
handleA pointer to the device-specific handle
idcodeStorage for the detected idcode
Returns
ERROR_OK on success, or an error code on failure.

Definition at line 81 of file hla_layout.h.

Referenced by hl_interface_init_target().

◆ open

int(* hl_layout_api::open) (struct hl_interface_param *param, void **handle)

Definition at line 29 of file hla_layout.h.

◆ override_target

int(* hl_layout_api::override_target) (const char *targetname)

Definition at line 83 of file hla_layout.h.

Referenced by hl_interface_override_target().

◆ poll_trace

int(* hl_layout_api::poll_trace) (void *handle, uint8_t *buf, size_t *size)

Poll for new trace data.

Parameters
handleA handle to adapter
bufA pointer to buffer to store received data
sizeA pointer to buffer size; must be filled with the actual amount of bytes written
Returns
ERROR_OK on success, an error code on failure.

Definition at line 114 of file hla_layout.h.

Referenced by hl_interface_poll_trace().

◆ read_mem

int(* hl_layout_api::read_mem) (void *handle, uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer)

Definition at line 64 of file hla_layout.h.

Referenced by hl_dcc_read().

◆ read_reg

int(* hl_layout_api::read_reg) (void *handle, unsigned int regsel, uint32_t *val)

Read one register from the target.

Parameters
handleA pointer to the device-specific handle
regselRegister selection index compatible with all the values allowed by armv7m DCRSR.REGSEL
valA pointer to retrieve the register value
Returns
ERROR_OK on success, or an error code on failure.

Definition at line 53 of file hla_layout.h.

◆ read_regs

int(* hl_layout_api::read_regs) (void *handle)

Definition at line 43 of file hla_layout.h.

◆ reset

int(* hl_layout_api::reset) (void *handle)

Definition at line 33 of file hla_layout.h.

◆ run

int(* hl_layout_api::run) (void *handle)

Definition at line 37 of file hla_layout.h.

◆ speed

int(* hl_layout_api::speed) (void *handle, int khz, bool query)

Definition at line 87 of file hla_layout.h.

Referenced by hl_interface_khz(), and hl_interface_speed().

◆ state

enum target_state(* hl_layout_api::state) (void *fd)

Definition at line 114 of file hla_layout.h.

◆ step

int(* hl_layout_api::step) (void *handle)

Definition at line 41 of file hla_layout.h.

◆ write_debug_reg

int(* hl_layout_api::write_debug_reg) (void *handle, uint32_t addr, uint32_t val)

Definition at line 70 of file hla_layout.h.

◆ write_mem

int(* hl_layout_api::write_mem) (void *handle, uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer)

Definition at line 67 of file hla_layout.h.

Referenced by hl_dcc_read().

◆ write_reg

int(* hl_layout_api::write_reg) (void *handle, unsigned int regsel, uint32_t val)

Write one register to the target.

Parameters
handleA pointer to the device-specific handle
regselRegister selection index compatible with all the values allowed by armv7m DCRSR.REGSEL
valThe value to be written in the register
Returns
ERROR_OK on success, or an error code on failure.

Definition at line 62 of file hla_layout.h.


The documentation for this struct was generated from the following file: