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

Use PTR constant instead of deprecated ptr() function on registers and peripherals #28

Open
ghost opened this issue Sep 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 23, 2022

Command: crate build

Full warning:

warning: use of deprecated associated function `cortex_m::peripheral::MPU::ptr`: Use the associated constant `PTR` instead
   --> board-support/src/lib.rs:140:26
    |
140 |         let mpu = &*MPU::ptr();
    |                          ^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: `nw-board-support` (lib) generated 1 warning
@willemml willemml changed the title Compiling warning: "deprecated associated function cortex_m::peripheral::MPU::ptr" Use cortex_m::peripheral::MPU::PTR instead of deprecated cortex_m::peripheral::MPU::ptr() Sep 23, 2022
@willemml willemml changed the title Use cortex_m::peripheral::MPU::PTR instead of deprecated cortex_m::peripheral::MPU::ptr() Use PTR constant instead of deprecated ptr() function on registers and peripherals Sep 23, 2022
@ghost
Copy link
Author

ghost commented Sep 23, 2022

@willemml this seems to be fixed on edf1c4f615f424c4f111ef8ee557631922a4d2bd

I don't know why this happens to me

@willemml
Copy link
Member

You might be using nightly rust or a newer version, I don't know why it only happens sometimes, if/when I work on this again I'll check the code for use of deprecated functions.

@willemml willemml added the bug Something isn't working label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant