Skip to content

mma8x5x: interruption management added#4

Closed
AurelienGONCE wants to merge 1 commit intopr/mma8x5xfrom
pr/mma8x5x_int
Closed

mma8x5x: interruption management added#4
AurelienGONCE wants to merge 1 commit intopr/mma8x5xfrom
pr/mma8x5x_int

Conversation

@AurelienGONCE
Copy link
Copy Markdown

Accelerometer mma8x5x have two interrupt pins configurable.

This PR gives the possibility to use the mma8x5x type device with interruption(s) and configure, one or the two interrupts to the expected source (data ready, freefall/motion, landscape, ...).

  • The use of mma8652_int module is necessary to call the right init function.
  • One or two mma8652_int_t structure have to be created to configure the mm8652 device.

This modification could be use with any of MMA devices defined in header file: MMA8652, MMA8653, MMA8451, MMA8452 and MMA8453.

It is xtimer and gpio module dependent

This PR is based on RIOT-OS#5433.

vincent-d pushed a commit that referenced this pull request Sep 6, 2019
The test randomly fails on `native` due to timers being not accurate but
it cannot be otherwise. So better disable it than raising fake errors.

    main(): This is RIOT! (Version: buildtest)
    Testing generic evtimer
    This should list 2 items
    ev #1 offset=1000
    ev #2 offset=500
    This should list 4 items
    ev #1 offset=659
    ev #2 offset=341
    ev #3 offset=500
    ev #4 offset=2454
    Are the reception times of all 4 msgs close to the supposed values?
    At    662 ms received msg 0: "#2 supposed to be 659"
    At   1009 ms received msg 1: "#0 supposed to be 1000"
    At   1511 ms received msg 2: "#1 supposed to be 1500"

    Traceback (most recent call last):
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 33, in <module>
        sys.exit(run(testfunc))
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/dist/pythonlibs/testrunner/__init__.py", line 29, in run
        testfunc(child)
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 26, in testfunc
        assert(actual in range(expected - ACCEPTED_ERROR, expected + ACCEPTED_ERROR))
    AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant