Skip to content

cpu: samd21: fix gpio irq handling compile handling#2865

Merged
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
kaspar030:fix_samd21_gpio_compile_issue
May 26, 2015
Merged

cpu: samd21: fix gpio irq handling compile handling#2865
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
kaspar030:fix_samd21_gpio_compile_issue

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

fixes compile issue exposed in #2852 (bug shows when compiling with -Os)

(this gpio implementation needs a complete rewrite)

@OlegHahm
Copy link
Copy Markdown
Member

This fixes an issue by an PR that's not even merged?

@OlegHahm OlegHahm added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: drivers Area: Device drivers labels Apr 24, 2015
@kaspar030
Copy link
Copy Markdown
Contributor Author

@OlegHahm The PR exposed a bug.

@haukepetersen
Copy link
Copy Markdown
Contributor

this PR does suppress the warning, but does not fix the issue:
say GPIO_NUMOF is 8. Then the sizeof(gpio_config) is 8. Now your loop accesses this array from 0 to 16 -> this seems off :-)

@biboc
Copy link
Copy Markdown
Member

biboc commented Apr 29, 2015

Wait, if we set GPIO_NUMOF to 1 and we use only PA04 as an int for GPIO1, extint for PA04 is 4 so gpio_config[extint].cb = cb; will crash because of static gpio_state_t gpio_config[GPIO_NUMOF];

I do understand why it needs a rewrite ...

@OlegHahm OlegHahm modified the milestone: Release 2015.06 Apr 29, 2015
@kaspar030
Copy link
Copy Markdown
Contributor Author

@OlegHahm Could you give this a try?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please replace with a non-literal

@OlegHahm
Copy link
Copy Markdown
Member

This PR alone seems to work - will test with #2852.

@OlegHahm
Copy link
Copy Markdown
Member

ACK, please squash.

@OlegHahm OlegHahm added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label May 15, 2015
@haukepetersen
Copy link
Copy Markdown
Contributor

ACK

@PeterKietzmann
Copy link
Copy Markdown
Member

Third ACK. Please squash :-)

@kaspar030 kaspar030 force-pushed the fix_samd21_gpio_compile_issue branch from 4fadabf to aff2593 Compare May 26, 2015 08:23
@kaspar030
Copy link
Copy Markdown
Contributor Author

squashed, rebased

@OlegHahm OlegHahm removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label May 26, 2015
@PeterKietzmann PeterKietzmann added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 26, 2015
@PeterKietzmann
Copy link
Copy Markdown
Member

And go

PeterKietzmann added a commit that referenced this pull request May 26, 2015
cpu: samd21: fix gpio irq handling compile handling
@PeterKietzmann PeterKietzmann merged commit 68dd9a3 into RIOT-OS:master May 26, 2015
@kaspar030 kaspar030 deleted the fix_samd21_gpio_compile_issue branch February 7, 2017 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants