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

Allow caller to choose transmit and receive pins #3

merged 1 commit into from Dec 30, 2013


None yet
2 participants
Copy link

commented Dec 10, 2013

I've got my transmitter connected to different pins than those in the library due to other constraints, so this adds an overload of lw_setup that the caller can use to specify which pins should be used for transmitting and receiving messages.

As lw_setup always called attachInterrupt, most of the receive code (~1k for my Arduino Uno) ended up being compiled even if it wasn't being used. I've split the setup code into lw_tx_setup and lw_rx_setup to allow calling only one of them if just tx or rx is being performed in a project.

Add overload for lw_setup and tx/rx only setup
* Add an overload of lw_setup so that the caller can optionally specify
  which pins should be used for transmitting and receiving messages
  (and which interrupt to attach).
* Split setup into lw_tx_setup and lw_rx_setup so that these can be
  called individually for projects only using transmit or receive to
  reduce the compiled code size.

This comment has been minimized.

Copy link
Contributor Author

commented Dec 30, 2013

@lawrie Would you be able to take a look at this pull request?

lawrie added a commit that referenced this pull request Dec 30, 2013

Merge pull request #3 from ribbons/specify-pins
Allow caller to choose transmit and receive pins

@lawrie lawrie merged commit 395630c into lawrie:master Dec 30, 2013

@ribbons ribbons deleted the ribbons:specify-pins branch Dec 31, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.