Skip to content

Fix logic errors on _backend identification. - #698

Merged
trabucayre merged 1 commit into
trabucayre:masterfrom
lhartmann:master
Jul 31, 2026
Merged

Fix logic errors on _backend identification.#698
trabucayre merged 1 commit into
trabucayre:masterfrom
lhartmann:master

Conversation

@lhartmann

Copy link
Copy Markdown
Contributor

I got the compile error below, and went to check the sources. Turns out there was a logic error on backed type detection. Just patched the code following the pattern on the rest of the file.

IMHO that many switch(...) inside a class feels dirty. Maybe refactor backends as a separate classes?

/tmp/openFPGALoader/src/cmsisDAP.cpp: In constructor ‘CmsisDAP::CmsisDAP(const cable_t&, int, uint32_t, int8_t)’:
/tmp/openFPGALoader/src/cmsisDAP.cpp:204:35: error: ‘_hid_dev’ was not declared in this scope
  204 |                         hid_close(_hid_dev);
      |                                   ^~~~~~~~
/tmp/openFPGALoader/src/cmsisDAP.cpp:204:25: error: ‘hid_close’ was not declared in this scope
  204 |                         hid_close(_hid_dev);
      |                         ^~~~~~~~~
/tmp/openFPGALoader/src/cmsisDAP.cpp:205:25: error: ‘hid_exit’ was not declared in this scope
  205 |                         hid_exit();
      |                         ^~~~~~~~

@trabucayre
trabucayre merged commit d402bdb into trabucayre:master Jul 31, 2026
14 checks passed
@trabucayre

Copy link
Copy Markdown
Owner

Good catch!
Applied
Thanks @lhartmann !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants