OpenOCD
target/rtt.c File Reference
Include dependency graph for target/rtt.c:

Go to the source code of this file.

Functions

static bool channel_is_active (const struct rtt_channel *channel)
 
static int read_channel_name (struct target *target, target_addr_t address, char *name, size_t length)
 
static int read_from_channel (struct target *target, const struct rtt_channel *channel, uint8_t *buffer, size_t *length)
 
static int read_rtt_channel (struct target *target, const struct rtt_control *ctrl, unsigned int channel_index, enum rtt_channel_type type, struct rtt_channel *channel)
 
int target_rtt_find_control_block (struct target *target, target_addr_t *address, size_t size, const char *id, bool *found, void *user_data)
 
int target_rtt_read_callback (struct target *target, const struct rtt_control *ctrl, struct rtt_sink_list **sinks, size_t num_channels, void *user_data)
 
int target_rtt_read_channel_info (struct target *target, const struct rtt_control *ctrl, unsigned int channel_index, enum rtt_channel_type type, struct rtt_channel_info *info, void *user_data)
 
int target_rtt_read_control_block (struct target *target, target_addr_t address, struct rtt_control *ctrl, void *user_data)
 
int target_rtt_start (struct target *target, const struct rtt_control *ctrl, void *user_data)
 
int target_rtt_stop (struct target *target, void *user_data)
 
int target_rtt_write_callback (struct target *target, struct rtt_control *ctrl, unsigned int channel_index, const uint8_t *buffer, size_t *length, void *user_data)
 
static int write_to_channel (struct target *target, const struct rtt_channel *channel, const uint8_t *buffer, size_t *length)
 

Function Documentation

◆ channel_is_active()

static bool channel_is_active ( const struct rtt_channel channel)
static

Definition at line 171 of file target/rtt.c.

References rtt_channel::size.

Referenced by target_rtt_read_callback(), and target_rtt_write_callback().

◆ read_channel_name()

static int read_channel_name ( struct target target,
target_addr_t  address,
char *  name,
size_t  length 
)
static

Definition at line 61 of file target/rtt.c.

References ERROR_OK, length, MIN, name, offset, and target_read_buffer().

Referenced by target_rtt_read_channel_info().

◆ read_from_channel()

static int read_from_channel ( struct target target,
const struct rtt_channel channel,
uint8_t *  buffer,
size_t *  length 
)
static

◆ read_rtt_channel()

◆ target_rtt_find_control_block()

int target_rtt_find_control_block ( struct target target,
target_addr_t address,
size_t  size,
const char *  id,
bool *  found,
void *  user_data 
)

Definition at line 241 of file target/rtt.c.

References addr, rtt_channel::address, ERROR_OK, LOG_INFO, MIN, size, and target_read_buffer().

Referenced by COMMAND_HANDLER().

◆ target_rtt_read_callback()

int target_rtt_read_callback ( struct target target,
const struct rtt_control ctrl,
struct rtt_sink_list **  sinks,
size_t  num_channels,
void *  user_data 
)

◆ target_rtt_read_channel_info()

int target_rtt_read_channel_info ( struct target target,
const struct rtt_control ctrl,
unsigned int  channel_index,
enum rtt_channel_type  type,
struct rtt_channel_info info,
void *  user_data 
)

◆ target_rtt_read_control_block()

int target_rtt_read_control_block ( struct target target,
target_addr_t  address,
struct rtt_control ctrl,
void *  user_data 
)

◆ target_rtt_start()

int target_rtt_start ( struct target target,
const struct rtt_control ctrl,
void *  user_data 
)

Definition at line 50 of file target/rtt.c.

References ERROR_OK.

Referenced by COMMAND_HANDLER().

◆ target_rtt_stop()

int target_rtt_stop ( struct target target,
void *  user_data 
)

Definition at line 56 of file target/rtt.c.

References ERROR_OK.

Referenced by COMMAND_HANDLER().

◆ target_rtt_write_callback()

int target_rtt_write_callback ( struct target target,
struct rtt_control ctrl,
unsigned int  channel_index,
const uint8_t *  buffer,
size_t *  length,
void *  user_data 
)

◆ write_to_channel()

static int write_to_channel ( struct target target,
const struct rtt_channel channel,
const uint8_t *  buffer,
size_t *  length 
)
static