Skip to content

Conversation

@anangl
Copy link
Member

@anangl anangl commented Oct 30, 2019

Convert the sample to use the new GPIO API and additionally:

  • add some error messages for unsuccessful GPIO API calls
  • correct the index of def_val element used in the right_button
    callback, to match the one used when the callback is installed
  • use flags defined in devicetree for the pin that drives the LED
    (for consistency, as this does not make much difference for a pin
    that is only toggled).

Tested on nrf52840_pca10056.

Convert the sample to use the new GPIO API and additionally:
- add some error messages for unsuccessful GPIO API calls
- correct the index of `def_val` element used in the `right_button`
  callback, to match the one used when the callback is installed
- use flags defined in devicetree for the pin that drives the LED
  (for consistency, as this does not make much difference for a pin
  that is only toggled)

Signed-off-by: Andrzej Głąbek <[email protected]>
@anangl anangl added area: GPIO area: USB Universal Serial Bus area: Samples Samples labels Oct 30, 2019
@anangl anangl requested a review from jfischer-no as a code owner October 30, 2019 11:05
@anangl anangl changed the title samples/subsys/usb/hid-mouse: Convert to use the new GPIO API [TOPIC-GPIO] samples/subsys/usb/hid-mouse: Convert to use the new GPIO API Oct 30, 2019
@galak galak merged commit 0398b3a into zephyrproject-rtos:topic-gpio Nov 4, 2019
@anangl anangl deleted the gpio/convert_hid_mouse_sample branch November 19, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: GPIO area: Samples Samples area: USB Universal Serial Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants