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

stmhal: Pick AF for I2C pins dynamically #1833

Merged
merged 4 commits into from
Feb 11, 2016

Conversation

dhylands
Copy link
Contributor

This also adds I2C2 and I2C3 definitions for the Nucleo 401 board
and fixes up pins.csv

On PYBV10 this increases the flash size by 16 bytes. I suspect that having more peripherals use this mechanism will reduce the code size.

I tested this on a PYBOARD (I2C1 & 2) my CERB40 (I2C1,2,3), and on a NUCLEO-F401RE (I2C1,2,3) board.

@dpgeorge
Copy link
Member

Thanks, but please make separate commits for the changes to the board files and the I2C stuff.

mp_hal_gpio_set_af will search for a given function and unit
and set the alternate function to the alternate function index
found.
This groups the pins for a port together and puts them in numerical
order. It also adds ARDUINO pin names.
@dhylands
Copy link
Contributor Author

rebased and split into several commits

@dpgeorge dpgeorge merged commit 32b7e93 into micropython:master Feb 11, 2016
tannewt pushed a commit to tannewt/circuitpython that referenced this pull request May 14, 2019
The footer already links directly to https://adafru.it/discord, which seems like a more permanent location. I've just replaced the expired link at the top with the same thing.
tannewt added a commit to tannewt/circuitpython that referenced this pull request May 14, 2019
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.

None yet

2 participants