Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

SPI on STM32F4 + example #343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rvlander
Copy link

@rvlander rvlander commented Sep 9, 2015

I reused code from stm32l1, adapted it and wrote an new example. More testing is needed.
There was also a typo (copy/paste) bug in peripheral_clock.rs.

Maybe a refactor should be done to factorize common code between stm32 mcus. Are there any plans regarding this?

@rvlander
Copy link
Author

rvlander commented Sep 9, 2015

TODO: update AltMode enum in pin.rs.

@rvlander rvlander changed the title SPI on STM32 + example SPI on STM32F4 + example Sep 9, 2015
use volatile_cell::VolatileCell;
use core::ops::Drop;

ioregs!(SPI = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please use placement ioregs ( SPI @ <address> ) in here and get rid of extern block below?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this mean duplicate memory tree for each SPIx?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Actually yes, I'll fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #344

@farcaller
Copy link
Member

A refactor would surely be welcome from someone who has good understanding of STM MCUs, I'm absolutely willing to give up that tree for maintenance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants