Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRQ callback #33

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

IRQ callback #33

wants to merge 6 commits into from

Conversation

Premik
Copy link
Contributor

@Premik Premik commented Apr 22, 2017

The callback implemeted also the IRQ stuff.

  • There are helper methods created in the irq module. Which is accessible on the main avr object.
  • Currently helpers are only created for digital IO and ADC. But all the required IRQ methods/macros I found are already exposed on the swig level in the utils.i.
    For example to register a callback on pin change:
avr.irq.ioport_register_notify(myCallable, ("A", 6))

More comperhensive usage is in the test_irq.py.

This enables both-way communication between Python and simavr core. No need to create custom parts in C anymore just to be able to watch pin change etc.

@coveralls
Copy link

coveralls commented Apr 22, 2017

Coverage Status

Coverage increased (+3.7%) to 82.261% when pulling a3f031b on Premik:IRQCallback into a04237d on ponty:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling 2fb7d8a on Premik:IRQCallback into a04237d on ponty:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling 2fb7d8a on Premik:IRQCallback into a04237d on ponty:master.

@coveralls
Copy link

coveralls commented Apr 29, 2017

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling 2fb7d8a on Premik:IRQCallback into a04237d on ponty:master.

@coveralls
Copy link

coveralls commented Apr 29, 2017

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling a2cc8f6 on Premik:IRQCallback into a04237d on ponty:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling a2cc8f6 on Premik:IRQCallback into a04237d on ponty:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.7%) to 82.31% when pulling a2cc8f6 on Premik:IRQCallback into a04237d on ponty:master.

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.

2 participants