cmsisDAP: only throw exception in CTOR method

This commit is contained in:
Gwenhael Goavec-Merou
2026-07-02 08:43:56 +02:00
parent 53180a83f2
commit dfcc540daa
2 changed files with 66 additions and 39 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ class CmsisDAP: public JtagInterface {
int dapResetTarget();
#ifdef ENABLE_CMSISDAP_V1
void initWithHID(const cable_t &cable, int index, int8_t verbose);
bool initWithHID(const cable_t &cable, int index, int8_t verbose);
#endif
#ifdef ENABLE_CMSISDAP_V2
struct cmsis_dap_v2_dev_t {
@@ -114,7 +114,7 @@ class CmsisDAP: public JtagInterface {
};
std::vector<cmsis_dap_v2_dev_t> findCmsisDapDevices(uint16_t vid, uint16_t pid);
void initWithBulk(const cable_t &cable, int8_t verbose);
bool initWithBulk(const cable_t &cable, int8_t verbose, bool err_as_info);
#endif
int read_info(uint8_t info, uint8_t *rd_info, int max_len);
int xfer(int tx_len, uint8_t *rx_buff, int rx_len);