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

M0 & M1 optional? #11

Closed
tqueale opened this issue Oct 21, 2019 · 4 comments
Closed

M0 & M1 optional? #11

tqueale opened this issue Oct 21, 2019 · 4 comments

Comments

@tqueale
Copy link

tqueale commented Oct 21, 2019

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
Copy link
Author

tqueale commented Oct 23, 2019

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
Copy link
Owner

KrisKasprzak commented Oct 23, 2019 via email

@tqueale
Copy link
Author

tqueale commented Oct 23, 2019

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
Copy link
Author

tqueale commented Nov 30, 2019

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.

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

No branches or pull requests

2 participants