Skip to content

enable usage of interrupts with received packets #33

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

Merged
merged 3 commits into from
Dec 18, 2019
Merged

enable usage of interrupts with received packets #33

merged 3 commits into from
Dec 18, 2019

Conversation

jerryneedell
Copy link
Contributor

Change send/receive functions to allow for the use of interrupts in the user code.
the changes are invoked if receive is called with timeout=None
in this case the initial call to listen is skipped assuming a packet has already been received
the user code must call listen.
send was modified to accept a kwarg keep_listenting -- if set to True then listen is call after the packet is sent.

add example for interrupt usage for Raspberry Pi
add example that transmits periodically.

Tested on Raspberry Pi Zero-W
and on feather_m0_adalogger (tested transmit example and that existing code still runs)

These changes should not impact any existing code.

@jerryneedell jerryneedell requested review from brentru and a team December 12, 2019 19:56
@brentru
Copy link
Member

brentru commented Dec 12, 2019

@jerryneedell Ok, testing against hardware first.

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerryneedell OK - Runs on my hardware, requesting some code and docu changes before I pull in and release.

Thanks for your time on this PR!

@brentru
Copy link
Member

brentru commented Dec 18, 2019

LGTM!

@brentru brentru merged commit bc7da6c into adafruit:master Dec 18, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 19, 2019
Updating https://www.github.com/adafruit/Adafruit_CircuitPython_MCP4728 to 1.0.1 from 1.0.0:
  > Merge remote-tracking branch 'adafruit/master'
  > Fixing CP-isnt-CPython bug

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 1.3.0 from 1.2.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#19 from jerryneedell/jerryn_interrupt
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#17 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM9x to 1.2.0 from 1.1.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#33 from jerryneedell/jerryn_interrupt
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#30 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 4.1.0 from 4.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#36 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#35 from CapableRobot/skip-init-write

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_BLE_Apple_Notification_Center, Adafruit_CircuitPython_BLE_Magic_Light, Adafruit_CircuitPython_Display_Notification
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