Code Monkey home page Code Monkey logo

stm32f103xx's Introduction

stm32f103xx

This crate has been DEPRECATED in favor of the stm32f1xx crate. This crate will receive no further updates or bug fixes.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

stm32f103xx's People

Contributors

bors[bot] avatar burrbull avatar emilgardis avatar homunkulus avatar idubrov avatar japaric avatar jonas-schievink avatar kinnison avatar willglynn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stm32f103xx's Issues

USB epxr registers as array?

        #[doc = "0x00 - endpoint 0 register"] pub ep0r: EP0R,
        #[doc = "0x04 - endpoint 1 register"] pub ep1r: EP1R,
        #[doc = "0x08 - endpoint 2 register"] pub ep2r: EP2R,
        #[doc = "0x0c - endpoint 3 register"] pub ep3r: EP3R,
        #[doc = "0x10 - endpoint 4 register"] pub ep4r: EP4R,
        #[doc = "0x14 - endpoint 5 register"] pub ep5r: EP5R,
        #[doc = "0x18 - endpoint 6 register"] pub ep6r: EP6R,
        #[doc = "0x1c - endpoint 7 register"] pub ep7r: EP7R,

It would be useful to treat this as an array of 8 endpoints all with the same type, instead of 8 fields with different types.

As a workaround, is this safe?

fn get_ep(usb: &device::USB, ep: u8) -> &device::usb::EP0R {
    assert!(ep < 8);
    unsafe {
        let ptr: *const device::usb::EP0R = &usb.ep0r;
        &*(ptr.offset(ep as isize))
    }
}

API tailored for specific microcontrollers.

I am opening the issue here but it applies to other device crates as well.
SVD file from which this library is generated describes the whole stm32f103 family. But not every peripheral available in all devices. For example basic timers are present only in high-density and XL-density line.
So to catch errors like usage of unavailable peripherals and to make library smaller I made separate SVD file for each type of microcontroller that I using. I even removed configuration bits for GPIO pins that are unavailable on given package. And it works surprisingly well. Now a program that tries to use unavailable peripherals or pins simply will not compile. It makes porting to different device much easier.
I would like to share my work but don't want to create clutter with crates like "stm32f103c8". Maybe better approach will be to somehow combine different variants of API into single crate with ability to select specific microcontroller? Is it possible to use features for that?

RTFM v4 interrupt

Getting an error when trying to compile on the new RTFM version:

#[app(device = stm32f103xx)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find interrupt in stm32f103xx

it looks like in the lm3s6965 crate you added:
pub use self::Interrupt as interrupt;

is that needed for this crate too?

Mention the stm32f103xx-hal crate

For beginners (like me) it would be good if the readme could mention that the stm32f103xx-hal crate which builds on top of the register descriptions defined in this crate exists. That would make it immediately clear what the scope of each crate is.

Differences between svd

hi Japaric,

I really appreciate your work and your effort to developp RUST in the embedded world.
After a successfull port on STM32F072, I try on STM32F103.

As STM32F72, I downloaded SVD file from the ST website for STM32F103.
I found somes differences with the svd file you used.
examples : ( right : st version )
image

image

image

Which version is better ?
Thanks !

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.