hosted: Cleaned up and fixed the definitions of the fill functions for HOSTED_BMP_ONLY

This commit is contained in:
dragonmux 2022-06-15 21:54:57 -04:00 committed by Piotr Esden-Tempski
parent 94afb264e4
commit adc03e47d6
4 changed files with 35 additions and 35 deletions

View File

@ -41,14 +41,14 @@ int dap_init(bmp_info_t *info)
}
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
uint32_t dap_swj_clock(uint32_t clock) {return 0;}
void dap_exit_function(void) {};
void dap_adiv5_dp_defaults(ADIv5_DP_t *dp) {};
int cmsis_dap_jtagtap_init(jtag_proc_t *jtag_proc) {return -1;}
int dap_swdptap_init(ADIv5_DP_t *dp) {return -1;}
int dap_jtag_dp_init(ADIv5_DP_t *dp) {return -1;}
void dap_swd_configure(uint8_t cfg) {};
void dap_nrst_set_val(bool assert) {};
uint32_t dap_swj_clock(uint32_t clock) { return 0; }
void dap_exit_function(void) { }
void dap_adiv5_dp_defaults(ADIv5_DP_t *dp) { }
int cmsis_dap_jtagtap_init(jtag_proc_t *jtag_proc) { return -1; }
int dap_swdptap_init(ADIv5_DP_t *dp) { return -1; }
int dap_jtag_dp_init(ADIv5_DP_t *dp) { return -1; }
void dap_swd_configure(uint8_t cfg) { }
void dap_nrst_set_val(bool assert) { }
# pragma GCC diagnostic pop
#endif

View File

@ -102,18 +102,18 @@ typedef struct cable_desc_s {
#if HOSTED_BMP_ONLY == 1
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
int ftdi_bmp_init(BMP_CL_OPTIONS_t *cl_opts, bmp_info_t *info) {return -1;};
int libftdi_swdptap_init(ADIv5_DP_t *dp) {return -1;};
int libftdi_jtagtap_init(jtag_proc_t *jtag_proc) {return 0;};
void libftdi_buffer_flush(void) {};
int libftdi_buffer_write(const uint8_t *data, int size) {return size;};
int libftdi_buffer_read(uint8_t *data, int size) {return size;};
const char *libftdi_target_voltage(void) {return "ERROR";};
int ftdi_bmp_init(BMP_CL_OPTIONS_t *cl_opts, bmp_info_t *info) { return -1; }
int libftdi_swdptap_init(ADIv5_DP_t *dp) { return -1; }
int libftdi_jtagtap_init(jtag_proc_t *jtag_proc) { return 0; }
void libftdi_buffer_flush(void) { }
int libftdi_buffer_write(const uint8_t *data, int size) { return size; }
int libftdi_buffer_read(uint8_t *data, int size) { return size; }
const char *libftdi_target_voltage(void) { return "ERROR"; }
void libftdi_jtagtap_tdi_tdo_seq(
uint8_t *DO, const uint8_t final_tms, const uint8_t *DI, int ticks) {};
bool libftdi_swd_possible(bool *do_mpsse, bool *direct_bb_swd) {return false;};
void libftdi_max_frequency_set(uint32_t freq) {};
uint32_t libftdi_max_frequency_get(void) {return 0;};
uint8_t *DO, const uint8_t final_tms, const uint8_t *DI, int ticks) { }
bool libftdi_swd_possible(bool *do_mpsse, bool *direct_bb_swd) { return false; }
void libftdi_max_frequency_set(uint32_t freq) { }
uint32_t libftdi_max_frequency_get(void) { return 0; }
void libftdi_nrst_set_val(bool assert) { }
bool libftdi_nrst_get_val(void) { return false; }
# pragma GCC diagnostic pop

View File

@ -49,14 +49,14 @@
#if HOSTED_BMP_ONLY == 1
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
int jlink_init(bmp_info_t *info) {return -1;};
int jlink_swdp_scan(bmp_info_t *info) {return 0;};
int jlink_jtagtap_init(bmp_info_t *info, jtag_proc_t *jtag_proc) {return 0;};
const char *jlink_target_voltage(bmp_info_t *info) {return "ERROR";};
int jlink_init(bmp_info_t *info) { return -1; }
int jlink_swdp_scan(bmp_info_t *info) { return 0; }
int jlink_jtagtap_init(bmp_info_t *info, jtag_proc_t *jtag_proc) { return 0; }
const char *jlink_target_voltage(bmp_info_t *info) { return "ERROR"; }
void jlink_nrst_set_val(bmp_info_t *info, bool assert) { }
bool jlink_nrst_get_val(bmp_info_t *info) { return true; }
void jlink_max_frequency_set(bmp_info_t *info, uint32_t freq) {};
uint32_t jlink_max_frequency_get(bmp_info_t *info) {return 0;};
void jlink_max_frequency_set(bmp_info_t *info, uint32_t freq) { }
uint32_t jlink_max_frequency_get(bmp_info_t *info) { return 0; }
# pragma GCC diagnostic pop
#else
/** Device capabilities. (from openocd*/

View File

@ -27,18 +27,18 @@
#if HOSTED_BMP_ONLY == 1
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
int stlink_init(bmp_info_t *info) {return -1;};
int stlink_hwversion(void) {return -1;};
const char *stlink_target_voltage(bmp_info_t *info) {return "ERROR";};
int stlink_init(bmp_info_t *info) { return -1; }
int stlink_hwversion(void) { return -1; }
const char *stlink_target_voltage(bmp_info_t *info) { return "ERROR"; }
void stlink_nrst_set_val(bmp_info_t *info, bool assert) { }
bool stlink_nrst_get_val(void) { return true; }
int stlink_enter_debug_swd(bmp_info_t *info, ADIv5_DP_t *dp) {return -1;};
void stlink_adiv5_dp_defaults(ADIv5_DP_t *dp) {};
int stlink_jtag_dp_init(ADIv5_DP_t *dp) {return false;};
int jtag_scan_stlinkv2(bmp_info_t *info, const uint8_t *irlens) {return 0;};
void stlink_exit_function(bmp_info_t *info) {};
void stlink_max_frequency_set(bmp_info_t *info, uint32_t freq) {};
uint32_t stlink_max_frequency_get(bmp_info_t *info) {return 0;};
int stlink_enter_debug_swd(bmp_info_t *info, ADIv5_DP_t *dp) { return -1; }
void stlink_adiv5_dp_defaults(ADIv5_DP_t *dp) { }
int stlink_jtag_dp_init(ADIv5_DP_t *dp) { return false; }
int jtag_scan_stlinkv2(bmp_info_t *info, const uint8_t *irlens) { return 0; }
void stlink_exit_function(bmp_info_t *info) { }
void stlink_max_frequency_set(bmp_info_t *info, uint32_t freq) { }
uint32_t stlink_max_frequency_get(bmp_info_t *info) { return 0; }
# pragma GCC diagnostic pop
#else
int stlink_init(bmp_info_t *info);