1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Copyright (C) 2016-2020 by Marc Schink <dev@zapb.de>
7 #ifndef OPENOCD_TARGET_RTT_H
8 #define OPENOCD_TARGET_RTT_H
13 #include <target/target.h>
16 int target_rtt_start(struct target *target, const struct rtt_control *ctrl,
18 int target_rtt_stop(struct target *target, void *user_data);
19 int target_rtt_find_control_block(struct target *target,
20 target_addr_t *address, size_t size, const char *id, bool *found,
22 int target_rtt_read_control_block(struct target *target,
23 target_addr_t address, struct rtt_control *ctrl, void *user_data);
24 int target_rtt_write_callback(struct target *target,
25 struct rtt_control *ctrl, unsigned int channel_index,
26 const uint8_t *buffer, size_t *length, void *user_data);
27 int target_rtt_read_callback(struct target *target,
28 const struct rtt_control *ctrl, struct rtt_sink_list **sinks,
29 size_t length, void *user_data);
30 int target_rtt_read_channel_info(struct target *target,
31 const struct rtt_control *ctrl, unsigned int channel_index,
32 enum rtt_channel_type type, struct rtt_channel_info *info,
35 #endif /* OPENOCD_TARGET_RTT_H */