Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mpsse! macro has incorrect enums for enable/disable_adaptive_data_clocking #17

Open
quantumdude836 opened this issue Sep 29, 2024 · 0 comments

Comments

@quantumdude836
Copy link

Attempting to use mpsse! with the enable_adaptive_data_clocking/disable_adaptive_data_clocking commands emits code that tries to reference MpsseCmd::{EnableDataClocking, DisableDataClocking}, but these enums don't exist. Instead, they're called EnableAdaptiveClocking and DisableAdaptiveClocking.

Example code (ft is of type &mut libftd2xx::Ft2232h):

{
    mpsse! {
        let cmd = {
            disable_adaptive_data_clocking();
            disable_3phase_data_clocking();
        };
    }
    ft.write_all(&cmd).unwrap();
}

This results in the following compiler error:

error[E0599]: no variant or associated item named `DisableDataClocking` found for enum `MpsseCmd` in the current scope
  --> src/main.rs:22:9
   |
22 | /         mpsse! {
23 | |             let cmd = {
24 | |                 disable_adaptive_data_clocking();
25 | |                 disable_3phase_data_clocking();
26 | |             };
27 | |         }
   | |         ^
   | |         |
   | |_________variant or associated item not found in `MpsseCmd`
   |           help: there is a variant with a similar name: `Disable3PhaseClocking`
   |
   = note: this error originates in the macro `mpsse` (in Nightly builds, run with -Z macro-backtrace for more info)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant