ftdi_bmp: Export and use reset functions.

This commit is contained in:
Uwe Bonnes 2020-12-30 17:04:46 +01:00 committed by UweBonnes
parent 1845d71f00
commit cfdf55855e
2 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,8 @@ void libftdi_jtagtap_tdi_tdo_seq(
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_srst_set_val(bool assert){};
bool libftdi_srst_get_val(void) { return false};
# pragma GCC diagnostic pop
#else
#include <ftdi.h>
@ -134,6 +136,8 @@ void libftdi_jtagtap_tdi_tdo_seq(
bool libftdi_swd_possible(bool *do_mpsse, bool *direct_bb_swd);
void libftdi_max_frequency_set(uint32_t freq);
uint32_t libftdi_max_frequency_get(void);
void libftdi_srst_set_val(bool assert);
bool libftdi_srst_get_val(void);
#endif
#define MPSSE_SK 1

View File

@ -299,6 +299,8 @@ void platform_srst_set_val(bool assert)
return remote_srst_set_val(assert);
case BMP_TYPE_JLINK:
return jlink_srst_set_val(&info, assert);
case BMP_TYPE_LIBFTDI:
return libftdi_srst_set_val(assert);
default:
break;
}
@ -313,6 +315,8 @@ bool platform_srst_get_val(void)
return stlink_srst_get_val();
case BMP_TYPE_JLINK:
return jlink_srst_get_val(&info);
case BMP_TYPE_LIBFTDI:
return libftdi_srst_get_val();
default:
break;
}