Skip to content

Pr/new i2c if#4

Closed
smlng wants to merge 141 commits intomasterfrom
pr/new_i2c_if
Closed

Pr/new i2c if#4
smlng wants to merge 141 commits intomasterfrom
pr/new_i2c_if

Conversation

@smlng
Copy link
Copy Markdown
Owner

@smlng smlng commented Jul 12, 2018

Contribution description

Issues/PRs references

haukepetersen and others added 30 commits July 12, 2018 09:33
- non matching doxygen input parameter to i2c_write_reg
- non/matching missing function parameter
- invalid return type to i2c_release
- fix reag/write regs function (NOSTART/NOSTOP flags missing)
- use ret variable name instead of err (cosmetic)
- split PERIPH_I2C_NEED_READ/WRITE_REGS to simplify cpu side implementation
This is automatically called by the periph_init function
mali and others added 26 commits July 12, 2018 09:33
Rework atmega i2c to match new i2c interface.
Only i2c_read_bytes and i2c_write_bytes are implemented.
    cppcheck reported 'duplicateBranch' error in 2 if-else
    statements, b/c they are empty when running static-tests.
- dont send stop if bus is busy and before any action is done on bus
- and bus check that looks for bus error, arbitration and nack events
- check for ACK (TXIS) before writing bytes on bus and not between each write
    add missing i2c_acquire and i2c_release calls to properly guard
    i2c read and write operations.
	Changed shell to reflect the api very closely.
	This allows full access to each function for unit testing.
	Add automated script to test devices against a known testers.
	This will make it easier to run tests instead of manual testing.
	This is something that works for now but will be better integrated later.
@smlng
Copy link
Copy Markdown
Owner Author

smlng commented Jul 12, 2018

just testing

@smlng smlng closed this Jul 12, 2018
@smlng smlng deleted the pr/new_i2c_if branch June 25, 2019 08:40
smlng pushed a commit that referenced this pull request Sep 3, 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.

8 participants