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

[Arduino compatibility] Ax pin definition #208

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jan 27, 2018

Ax definition is now inline with Arduino style
Variant has only to define the digital pin number of the first analog input (i.e. which digital pin is A0)
Clean variant header include

Fix #140

@fpistm fpistm added enhancement New feature or request arduino compatibility labels Jan 27, 2018
@fpistm fpistm added this to the Next release milestone Jan 27, 2018
@fpistm fpistm self-assigned this Jan 27, 2018
@fpistm fpistm force-pushed the arduino_compatibility_pin_140 branch from 92eeacb to c8cdb46 Compare January 27, 2018 14:49
@lacklustrlabs
Copy link
Contributor

Can't help feeling that converting from an enum to uint8_t for Ax is a step back, but that's the burden of legacy code i guess.

Somewhat unrelated to this PR, but in the same files:
In C++ we can have typed enums, is it possible to use an unsigned type for the Dx enum or will that break with the C-compatibility?

@fpistm
Copy link
Member Author

fpistm commented Jan 27, 2018

I think enum could be kept but at this time I will kept legacy code. About Dx, I will check about C compatibility. typed enum break C-compatibility.
The Dx could eventually be defined as constant:

#define D0 (0)
#define D1 (1)
...

Ax definition is now inline with Arduino style
Variant has only to define the digital pin number
of the first analog input  (i.e. which digital pin is A0)

Clean variant header include

Fix stm32duino#140

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm force-pushed the arduino_compatibility_pin_140 branch from c8cdb46 to c4c9f48 Compare January 29, 2018 09:39
@fpistm fpistm merged commit 3f30641 into stm32duino:master Jan 29, 2018
@fpistm fpistm deleted the arduino_compatibility_pin_140 branch January 29, 2018 15:06
@fpistm fpistm modified the milestones: Next release, 1.2.0 Mar 15, 2018
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
…in_140

[Arduino compatibility] Ax pin definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants