|
piMCP2515
A library for controlling an MCP2515 on the Raspberry Pi and Raspberry Pi Pico
|
These functions handle REQOP (operating mode) functionality. More...
Functions | |
| int | mcp2515_reset (pi_mcp2515_t *pi_mcp2515) |
| Issue a reset command to the MCP2515 via the SPI interface. | |
| int | mcp2515_reqop (pi_mcp2515_t *pi_mcp2515, const mcp2515_reqop_t reqop) |
| Change the operating mode. | |
| mcp2515_reqop_t | mcp2515_reqop_get (pi_mcp2515_t *pi_mcp2515) |
| Get the current operating mode. | |
These functions handle REQOP (operating mode) functionality.
| int mcp2515_reqop | ( | pi_mcp2515_t * | pi_mcp2515, |
| const mcp2515_reqop_t | reqop ) |
Change the operating mode.
After the mode change, this code will then sleep for a 128 oscillator cycles delay before continuing operations as defined by the MCP2515 manual.
| pi_mcp2515 | the piMCP2515 handle. |
| reqop | the new operating mode. Acceptable values being:
|
| mcp2515_reqop_t mcp2515_reqop_get | ( | pi_mcp2515_t * | pi_mcp2515 | ) |
Get the current operating mode.
| pi_mcp2515 | the piMCP2515 handle. |
| int mcp2515_reset | ( | pi_mcp2515_t * | pi_mcp2515 | ) |
Issue a reset command to the MCP2515 via the SPI interface.
| pi_mcp2515 | the piMCP2515 handle. |