Giter Club home page Giter Club logo

Comments (15)

therealprof avatar therealprof commented on June 3, 2024

Actually the agreed on terminology is pac. I would not go as far as insta-dropping stm32 but we can certainly mark it is deprecated and re-export the PAC as pac.

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

Funny enough even the proponents of that terminology are not using pac to re-export the PAC:
pub use nrf52832_pac as target;

from stm32f1xx-hal.

TheZoq2 avatar TheZoq2 commented on June 3, 2024

Changing the name does sound like a good idea, I don't really like the current stm32 name, device makes a lot more sense. However, if pac is the agreed upon terminology, we should probably do that.

Out of curiosity, why was pac chosen, I don't really understand what it would mean in this context.

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

pac := Peripheral Access Crate

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

cf. https://rust-embedded.github.io/book/portability/index.html

from stm32f1xx-hal.

TeXitoi avatar TeXitoi commented on June 3, 2024

Of course we will do that with a new export. I don't really care of the name as long as it can be common between all hal implementation (not only stm32).

The ambiguity with pac is that there are 2 PAC crates: the core PAC (cortex-m) and the device PAC (stm32f1 in this case).

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

Is that so? I haven't thought of cortex-m as a PAC so far. Maybe we should raise the question as issue on the embedded-wg issue tracker to sort out potential conflicts before settling on an implementation.

from stm32f1xx-hal.

TheZoq2 avatar TheZoq2 commented on June 3, 2024

If nothing else, the figure in the embedded book seems to indicate that the PAC is the only layer between the microcontroller and the HAL. A wg issue sounds like a good idea to get clarifications about this and to make sure it is standardised

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

Well, don't let the figure irritate you; I've created that. ;)

However https://rust-embedded.github.io/book/start/registers.html agrees with that view and that hadn't been done by me.

from stm32f1xx-hal.

TeXitoi avatar TeXitoi commented on June 3, 2024

The thing is that makes me saying that cortex-m is a "PAC" is that there is a Peripherals object in cortex-m: https://docs.rs/cortex-m/0.5.8/cortex_m/peripheral/struct.Peripherals.html

from stm32f1xx-hal.

TeXitoi avatar TeXitoi commented on June 3, 2024

In RTFM, there is a core peripheral object and a device peripheral object that is given to the init function.

from stm32f1xx-hal.

TheZoq2 avatar TheZoq2 commented on June 3, 2024

#29 Closed this automatically but I don't think it's fixed since we didn't agree upon a name

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

@TheZoq2 Uhm, but with the latest changes we're exporting it as stm32, pac and device.

from stm32f1xx-hal.

TheZoq2 avatar TheZoq2 commented on June 3, 2024

Yea, that's true, but I feel like we should eventually decide on one of them to avoid confusion. Allthough I suppose allowing all three also has some benefits

from stm32f1xx-hal.

therealprof avatar therealprof commented on June 3, 2024

Well, if we have to chose one it should probably the documented one which is pac. 😏

from stm32f1xx-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.