arduino / arduino/ArduinoCore-mbed

Pin definition error in PORTENTA_H7_M4/pins_arduino.h

Open
#580 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

File ArduinoCore-mbed/variants/PORTENTA_H7_M4/pins_arduino.h

The digital pin definitions for the pins D16 through D21 appear to be incorrect, and result in an error when used in code. These pins correspond to the digital pin designations for the analog pins.

48 // Digital pins
49 // -----------
50 #define D0 (0u)
51 #define D1 (1u)
52 #define D2 (2u)
53 #define D3 (3u)
54 #define D4 (4u)
55 #define D5 (5u)
56 #define D6 (6u)
57 #define D7 (7u)
58 #define D8 (8u)
59 #define D9 (9u)
60 #define D10 (10u)
61 #define D11 (11u)
62 #define D12 (12u)
63 #define D13 (13u)
64 #define D14 (14u)
65 #define D15 (15u)
66 #define D16 (u16)
67 #define D17 (u17)
68 #define D18 (u18)
69 #define D19 (u19)
70 #define D20 (u20)
71 #define D21 (u21)

The corresponding analog pin definitions appear to be correct:

27 // Analog pins
28 // -----------
29 #define PIN_A0 (15u)
30 #define PIN_A1 (16u)
31 #define PIN_A2 (17u)
32 #define PIN_A3 (18u)
33 #define PIN_A4 (19u)
34 #define PIN_A5 (20u)
35 #define PIN_A6 (21u)
36 #define PIN_A7 (22u)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in ArduinoCore-mbed/variants/PORTENTA_H7_M4/pins_arduino.h and compare the D16–D21 definitions with the corresponding analog pin definitions. Verify the reported error using those digital designations if possible; done means the definitions compile and work correctly while preserving the existing analog pin mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.