Move *scan prototypes to target.h.
This commit is contained in:
parent
4e04c1dded
commit
e28e158721
|
@ -26,10 +26,8 @@
|
||||||
#include "exception.h"
|
#include "exception.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "gdb_packet.h"
|
#include "gdb_packet.h"
|
||||||
#include "jtag_scan.h"
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "morse.h"
|
#include "morse.h"
|
||||||
#include "adiv5.h"
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#ifdef PLATFORM_HAS_TRACESWO
|
#ifdef PLATFORM_HAS_TRACESWO
|
||||||
|
@ -185,12 +183,6 @@ static bool cmd_jtag_scan(target *t, int argc, char **argv)
|
||||||
gdb_out("JTAG device scan failed!\n");
|
gdb_out("JTAG device scan failed!\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
gdb_outf("Device IR Len IDCODE Description\n");
|
|
||||||
for(int i = 0; i < jtag_dev_count; i++)
|
|
||||||
gdb_outf("%d\t%d\t0x%08lX %s\n", i,
|
|
||||||
jtag_devs[i].ir_len, jtag_devs[i].idcode,
|
|
||||||
jtag_devs[i].descr);
|
|
||||||
gdb_out("\n");
|
|
||||||
cmd_targets(NULL);
|
cmd_targets(NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,6 @@ void adiv5_ap_write(ADIv5_AP_t *ap, uint16_t addr, uint32_t value);
|
||||||
uint32_t adiv5_ap_read(ADIv5_AP_t *ap, uint16_t addr);
|
uint32_t adiv5_ap_read(ADIv5_AP_t *ap, uint16_t addr);
|
||||||
|
|
||||||
void adiv5_jtag_dp_handler(jtag_dev_t *dev);
|
void adiv5_jtag_dp_handler(jtag_dev_t *dev);
|
||||||
int adiv5_swdp_scan(void);
|
|
||||||
|
|
||||||
void adiv5_mem_read(ADIv5_AP_t *ap, void *dest, uint32_t src, size_t len);
|
void adiv5_mem_read(ADIv5_AP_t *ap, void *dest, uint32_t src, size_t len);
|
||||||
void adiv5_mem_write(ADIv5_AP_t *ap, uint32_t dest, const void *src, size_t len);
|
void adiv5_mem_write(ADIv5_AP_t *ap, uint32_t dest, const void *src, size_t len);
|
||||||
|
|
|
@ -45,8 +45,6 @@ typedef struct jtag_dev_s {
|
||||||
extern struct jtag_dev_s jtag_devs[JTAG_MAX_DEVS+1];
|
extern struct jtag_dev_s jtag_devs[JTAG_MAX_DEVS+1];
|
||||||
extern int jtag_dev_count;
|
extern int jtag_dev_count;
|
||||||
|
|
||||||
int jtag_scan(const uint8_t *lrlens);
|
|
||||||
|
|
||||||
void jtag_dev_write_ir(jtag_dev_t *dev, uint32_t ir);
|
void jtag_dev_write_ir(jtag_dev_t *dev, uint32_t ir);
|
||||||
void jtag_dev_shift_dr(jtag_dev_t *dev, uint8_t *dout, const uint8_t *din, int ticks);
|
void jtag_dev_shift_dr(jtag_dev_t *dev, uint8_t *dout, const uint8_t *din, int ticks);
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
|
|
||||||
typedef struct target_s target;
|
typedef struct target_s target;
|
||||||
|
|
||||||
|
int adiv5_swdp_scan(void);
|
||||||
|
int jtag_scan(const uint8_t *lrlens);
|
||||||
|
|
||||||
|
void target_list_free(void);
|
||||||
|
|
||||||
/* The destroy callback function will be called by target_list_free() just
|
/* The destroy callback function will be called by target_list_free() just
|
||||||
* before the target is free'd. This may be because we're scanning for new
|
* before the target is free'd. This may be because we're scanning for new
|
||||||
* targets, or because of a communication failure. The target data may
|
* targets, or because of a communication failure. The target data may
|
||||||
|
@ -94,11 +99,6 @@ struct target_command_s {
|
||||||
struct target_command_s *next;
|
struct target_command_s *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern target *target_list;
|
|
||||||
|
|
||||||
target *target_new(unsigned size);
|
|
||||||
void target_list_free(void);
|
|
||||||
|
|
||||||
#include "target_internal.h"
|
#include "target_internal.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
#ifndef __TARGET_INTERNAL_H
|
#ifndef __TARGET_INTERNAL_H
|
||||||
#define __TARGET_INTERNAL_H
|
#define __TARGET_INTERNAL_H
|
||||||
|
|
||||||
|
extern target *target_list;
|
||||||
|
target *target_new(unsigned size);
|
||||||
|
|
||||||
struct target_ram {
|
struct target_ram {
|
||||||
uint32_t start;
|
uint32_t start;
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
|
|
Loading…
Reference in New Issue