X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Foocd_trace.h;h=e7584e4c9dbf26d37afcb8cef5cf6b1090593af4;hb=2b44b52478708c3bef58033dfd4f7bb7db74d843;hp=77e985fbb612f86b79437261093e83b56f60514c;hpb=3d6bcf07921753141a3905ee5619724573460cb3;p=openocd.git diff --git a/src/target/oocd_trace.h b/src/target/oocd_trace.h index 77e985fbb6..e7584e4c9d 100644 --- a/src/target/oocd_trace.h +++ b/src/target/oocd_trace.h @@ -13,34 +13,26 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * along with this program. If not, see . * ***************************************************************************/ -#ifndef OOCD_TRACE_H -#define OOCD_TRACE_H -#include "command.h" - -#include "etm.h" +#ifndef OPENOCD_TARGET_OOCD_TRACE_H +#define OPENOCD_TARGET_OOCD_TRACE_H #include -#include /* registers */ -enum -{ - OOCD_TRACE_ID = 0x7, - OOCD_TRACE_ADDRESS = 0x0, - OOCD_TRACE_TRIGGER_COUNTER = 0x01, - OOCD_TRACE_CONTROL = 0x2, - OOCD_TRACE_STATUS = 0x3, - OOCD_TRACE_SDRAM_COUNTER = 0x4, +enum { + OOCD_TRACE_ID = 0x7, + OOCD_TRACE_ADDRESS = 0x0, + OOCD_TRACE_TRIGGER_COUNTER = 0x01, + OOCD_TRACE_CONTROL = 0x2, + OOCD_TRACE_STATUS = 0x3, + OOCD_TRACE_SDRAM_COUNTER = 0x4, }; /* commands */ -enum -{ +enum { OOCD_TRACE_NOP = 0x0, OOCD_TRACE_READ_REG = 0x10, OOCD_TRACE_WRITE_REG = 0x18, @@ -49,16 +41,13 @@ enum OOCD_TRACE_RESYNC = 0xf0, }; -typedef struct oocd_trace_s -{ - etm_context_t *etm_ctx; +struct oocd_trace { + struct etm_context *etm_ctx; char *tty; int tty_fd; struct termios oldtio, newtio; -} oocd_trace_t; - -extern etm_capture_driver_t oocd_trace_capture_driver; +}; -extern int oocd_trace_register_commands(struct command_context_s *cmd_ctx); +extern struct etm_capture_driver oocd_trace_capture_driver; -#endif /* OOCD_TRACE_TRACE_H */ +#endif /* OPENOCD_TARGET_OOCD_TRACE_H */