These functions handle Status and Errors.
More...
|
| uint8_t | mcp2515_status (pi_mcp2515_t *pi_mcp2515) |
| | Check status via the STATUS instruction.
|
| uint8_t | mcp2515_error_tx_count (pi_mcp2515_t *pi_mcp2515) |
| | Check the value of the 'transmit' (TX) error counter.
|
| uint8_t | mcp2515_error_rx_count (pi_mcp2515_t *pi_mcp2515) |
| | Check the value of the 'receive' (RX) error counter.
|
| uint8_t | mcp2515_error_flags (pi_mcp2515_t *pi_mcp2515) |
| | Fetch the contents of the error flag (EFLG) register.
|
| bool | mcp2515_error (pi_mcp2515_t *pi_mcp2515) |
| | Check error flags in the EFLG register.
|
| int | mcp2515_error_clear_errif (pi_mcp2515_t *pi_mcp2515) |
| | Clear error interrupt flag.
|
These functions handle Status and Errors.
◆ mcp2515_error()
| bool mcp2515_error |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Check error flags in the EFLG register.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- true if any error flags are set.
◆ mcp2515_error_clear_errif()
| int mcp2515_error_clear_errif |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Clear error interrupt flag.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- zero if success, otherwise non-zero.
◆ mcp2515_error_flags()
| uint8_t mcp2515_error_flags |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Fetch the contents of the error flag (EFLG) register.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- contents of the error flag (EFLG) register.
◆ mcp2515_error_rx_count()
| uint8_t mcp2515_error_rx_count |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Check the value of the 'receive' (RX) error counter.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- the RX error count.
◆ mcp2515_error_tx_count()
| uint8_t mcp2515_error_tx_count |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Check the value of the 'transmit' (TX) error counter.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- the TX error count.
◆ mcp2515_status()
| uint8_t mcp2515_status |
( |
pi_mcp2515_t * | pi_mcp2515 | ) |
|
Check status via the STATUS instruction.
- Parameters
-
| pi_mcp2515 | the piMCP2515 handle. |
- Returns
- the current status value.