Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

stm32: do not use private constructor #3931

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hvraven
Copy link

@hvraven hvraven commented Feb 28, 2025

I see compile errors using a recent git checkout of embassy with an stm32l431cb. Use the from_bits function instead.

error[E0603]: tuple struct constructor `Sloten` is private
    --> /usr/local/cargo/git/checkouts/embassy-9312dcb0ed774b29/17301c0/embassy-stm32/src/sai/mod.rs:939:36
     |
939  |                 w.set_sloten(vals::Sloten(config.slot_enable as u16));
     |                                    ^^^^^^ private tuple struct constructor
     |
    ::: /usr/local/cargo/git/checkouts/stm32-data-generated-cb34dad5f3150296/5ffbb82/stm32-metapac/src/chips/stm32l431cb/../../peripherals/sai_v2.rs:1523:23
     |
1523 |     pub struct Sloten(u16);
     |                       --- a constructor is private if any of the fields is private
     |
note: the tuple struct constructor `Sloten` is defined here
    --> /usr/local/cargo/git/checkouts/stm32-data-generated-cb34dad5f3150296/5ffbb82/stm32-metapac/src/chips/stm32l431cb/../../peripherals/sai_v2.rs:1523:5
     |
1523 |     pub struct Sloten(u16);
     |     ^^^^^^^^^^^^^^^^^

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.

1 participant