KrisKasprzak / EBYTE

Libraries to program and use UART-based EBYTE wireless data transceivers
244 stars 76 forks source link

M0 & M1 optional? #11

Closed tqueale closed 4 years ago

tqueale commented 5 years ago

I wish to always use my unit in 'normal' mode (M1 & M0 both LOW). Is there an option to assign -1 to these pins during creation of the EBYTE object, similar to that provided for the Aux pin? Both M0 & M1 would be hard wired to Gnd. Saves 2 I/O lines as well.

tqueale commented 5 years ago

OK, just had a look through the source code. This is not an option so I will need to modify my copy of the library if I continue down that path.

KrisKasprzak commented 5 years ago

the latest source code allows -1 for M0 and M1 Thanks, Kris Kasprzakkris.kasprzak@yahoo.com

On Tuesday, October 22, 2019, 10:30:53 PM CDT, tqueale <notifications@github.com> wrote:  

OK, just had a look through the source code. This is not an option so I will need to modify my copy of the library if I continue down that path.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tqueale commented 5 years ago

It appears that the changes for M0 & M1 also assume that Aux is also not used as you never set pinmode for Aux if M0 & M1 are set to -1. That should not be the case as Aux is still very valid. Also, at line 61 "if ((_M0 == -1) & (_M1 == -1)){" did you mean '&&'? Not trying to be picky, just trying to understand.

tqueale commented 4 years ago

Should I raise a new issue for the query about the use of a bit-wise and (&) at line 61 where I believe a logical and (&&) was intended? And another for the missing Aux function when M0 & M1 are set to -1? It appears you may not have seen my previous comments.