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

Clean variants files #167

Merged
merged 1 commit into from
Dec 6, 2017
Merged

Clean variants files #167

merged 1 commit into from
Dec 6, 2017

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Dec 5, 2017

  • Common definitions are moved to pins_arduino_var.h.
    They could be redefined in variant.h if needed.
  • Removed UART_EMUL definitions as it is needed to be reworked in SoftwareSerial library.
  • Pin number over D15 replaced by pin name (more relevant)
  • Fixed some typos

- Common definitions are moved to pins_arduino_var.h.
  They could be redefined in variant.h if needed.
- Removed *UART_EMUL* definitions as it need to be reworked
  in SoftwareSerial library.
- Pin number over D15 replaced by pin name (more relevant)
- Fixed some typos

Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
@fpistm fpistm added the enhancement New feature or request label Dec 5, 2017
@fpistm fpistm self-assigned this Dec 5, 2017
@fpistm fpistm requested a review from a user December 5, 2017 13:41
@Adminius
Copy link
Contributor

Adminius commented Dec 5, 2017

#ifndef is a good idea! ;)

@fpistm
Copy link
Member Author

fpistm commented Dec 5, 2017

by default, for board with Arduino header, SCL and SDA are on D14/D15 , if the board you add do not have it, only define it properly in the variant.h:
Based on your example (I used PXn name to match silkscreen of your board):

//I2C Definitions
#define SDA                    PA10
#define SCL                     PA9

Note: why post in this PR instead of the #165?

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Could we move also LED_BUILTIN and USER_BTN?

@fpistm
Copy link
Member Author

fpistm commented Dec 5, 2017

Could we move also LED_BUILTIN and USER_BTN?

I'm wondered the same question, using those default values:

#define LED_BUILTIN             13
#define USER_BTN                PC13

but some boards do not have LED or button, so I preferred to not define one by default.
Are you agreed with that?

@ghost
Copy link

ghost commented Dec 5, 2017

Yes, I am.
In fact I missed the boards without LED or button.

@fpistm
Copy link
Member Author

fpistm commented Dec 5, 2017

With this PR, variant is now cleaned and include only specific pin mapping

@fpistm fpistm merged commit 0e046b5 into stm32duino:master Dec 6, 2017
@fpistm fpistm deleted the variant_cleanup branch December 6, 2017 14:13
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants