arduino / arduino/ArduinoCore-arc32
Inconsistency between code and documentation regarding Interrupt change
- Dominant language
- C
- Stars
- 330
- Forks
- 281
- PR merge metrics
- No merged PRs in 30d
Description
First and foremost, thanks for introducing Curie to the Arduino world. To me it sparked interest in using the Curie for more serious projects.
Having said that .. it appears to me that the documentation for the CHANGE interrupt mode is incorrect for Arduino IO4 and IO5.
[WInterrupts.c](https://github.com/01org/corelibs-arduino101/blob/master/cores/arduino/WInterrupts.c#L71-L79) indicates `CHANGE` mode is only valid for the pins connected to the Quark core (`p->ulGPIOType == SOC_GPIO`)
[variant.cpp](https://github.com/01org/corelibs-arduino101/blob/master/variants/arduino_101/variant.cpp#L74-L75) assigns the ulGPIOType as `ulGPIOType == SOC_GPIO` for Arduino `IO 2, 4, 7, 8, 10-13, 21-28`
That means
- Arduino IO4 is assumed to be connected to SOC_GPIO, and would support CHANGE interrupts
- Arduino IO5 is assumed to be connected to SS_GPIO, and would **not** support CHANGE interrupts
However .. the [documentation at arduino.cc](https://www.arduino.cc/en/Main/ArduinoBoard101) reads
> change is only supported by pins 2, **5**, 7, 8, 10, 11, 12, 13.
I suspect this should be
> change is only supported by pins 2, **4**, 7, 8, 10, 11, 12, 13.
Please advise
Yours,
[Coert Vonk](https://www.coertvonk.com)
[Independent Firmware Engineer wearables](https://github.com/cvonk)
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the CHANGE interrupt handling in cores/arduino/WInterrupts.c with the GPIO assignments in variants/arduino_101/variant.cpp, then check the Arduino 101 board documentation linked in the issue. Confirm which pins support CHANGE interrupts and update the documentation or clarify the code/documentation discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100