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

New pin mapping helper #722

Merged
merged 1 commit into from
Aug 3, 2024
Merged

New pin mapping helper #722

merged 1 commit into from
Aug 3, 2024

Conversation

Paciente8159
Copy link
Owner

@Paciente8159 Paciente8159 commented Aug 3, 2024

New pin mapping helper that allow an easier pin mapping definition/setup for boardmaps.

To define a pin on a board you needed to define the bit and port of the pin like this

#define STEP0_BIT 2	 // assigns STEP0 pin
#define STEP0_PORT D // assigns STEP0 port

This now can also be done like this

#define STEP0_PIN D2 // assigns STEP0 pin

On MCU's like the ESP32 and the RP2040 this can be done like this

#define STEP0_PIN GPIO3 // assigns STEP0 pin

The new pin mapping helper will generate under the hood the BIT and PORT definitions.
To prevent configuration errors, if the pin was already defined via BIT and PORT, that will take precedence over the new PIN definition and the PIN definition will have no effect.

- New pin mapping helper that allow an easier pin mapping definition/setup for boardmaps
@Paciente8159 Paciente8159 added new feature: core new feature: core features core: HAL core: HAL, pinouts, boards, tools core: config core: configuration files tested: OK tested: OK and ready to integrate new feature: HAL new feature: HAL boards, mcus, etc labels Aug 3, 2024
@Paciente8159 Paciente8159 merged commit 4721914 into master Aug 3, 2024
30 checks passed
@Paciente8159 Paciente8159 deleted the pinout-translation-unit branch August 3, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core: config core: configuration files core: HAL core: HAL, pinouts, boards, tools new feature: core new feature: core features new feature: HAL new feature: HAL boards, mcus, etc tested: OK tested: OK and ready to integrate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant