You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/18 19:16:05 UTC
[GitHub] rleberknight opened a new issue #1574: hal_gpio_irq_release()
passing the wrong value to hal_gpio_irq_disable()
rleberknight opened a new issue #1574: hal_gpio_irq_release() passing the wrong value to hal_gpio_irq_disable()
URL: https://github.com/apache/mynewt-core/issues/1574
In apache-mynewt-core/hw/mcu/nordic/nrf52xxx-compat/src/hal_gpio.c
apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_gpio.c
and
apache-mynewt-core/hw/mcu/nordic/nrf51xxx/src/hal_gpio.c
hal_gpio_irq_release() takes a pin as an argument, and passes that to hal_gpio_find_pin(pin) to get an index into hal_gpio_irqs[].
It then passes that index to hal_gpio_irq_disable(i).
hal_gpio_irq_disable() then passes the index to hal_gpio_find_pin()
Using a pin to get an index with hal_gpio_find_pin() and then passing that index to hal_gpio_find_pin()
is obviously wrong.
I believe that hal_gpio_irq_disable() wants the pin, not the index.
So the line
hal_gpio_irq_disable(i)
should be changed to
hal_gpio_irq_disable(pin)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services