-
Notifications
You must be signed in to change notification settings - Fork 30
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
feature-request: sleepmode and changing filters #6
Comments
HI thezenox |
Sorry for the delay for answering.
Changing the filters on the fly can be done only if the MCP2515 is in the configuration mode. It is not documented, but you can call can.begin several times, this function first puts the MCP2515 in the configuration mode, sets the filter, then puts the MCP2515 in normal mode. This is a way for changing filters on the fly.
I can add the following functions:
- a can.end that puts the MCP2515 in configuration mode, and frees the driver transmit and receive buffers;
- a can.setMode that puts the MCP2515 in Sleep mode, or Listen-only mode, or Normal Operation mode;
- a can.setFilters function first gets the current mode, puts the MCP2515 in the configuration mode, sets the filter, then restores the MCP2515 current mode.
Do you agree ?
Pierre
… Le 7 févr. 2019 à 12:52, Flo ***@***.***> a écrit :
nice lib, but I am missing sleep mode and changing filters on the fly. Do you plan to add it?
Bits 5-7 of CANCTRL_REGISTER
000 = Set Normal Operation mode
001 = Set Sleep mode
010 = Set Loopback mode
011 = Set Listen-only mode
100 = Set Configuration mode
Would be nice with bit modifing and readback.
Before setting filters, enter configuration mode and change back to normal mode afterwards.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#6>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASys1MmL67Xth63vVD7v1y53zmgLMJjxks5vLBODgaJpZM4anImk>.
|
I would love to have those functions. @thezenox ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice lib, but I am missing sleep mode and changing filters on the fly. Do you plan to add it?
Would be nice with bit modifing and readback.
Before setting filters, enter configuration mode and change back to normal mode afterwards.
The text was updated successfully, but these errors were encountered: