Skip to content

[Arduino compatibility] Ax pin definition - #208

Merged
fpistm merged 1 commit into
stm32duino:masterfrom
fpistm:arduino_compatibility_pin_140
Jan 29, 2018
Merged

fpistm merged 1 commit into
stm32duino:masterfrom
fpistm:arduino_compatibility_pin_140

Conversation

@fpistm

@fpistm fpistm commented Jan 27, 2018

Copy link
Copy Markdown
Member

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
Copy Markdown
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

fpistm commented Jan 27, 2018 •

Copy link
Copy Markdown
Member Author

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