Enable error interrupt
This commit is contained in:
parent
36af43b144
commit
a62562b716
2 changed files with 2 additions and 0 deletions
|
@ -74,6 +74,7 @@ void init() {
|
|||
mcp2515.reset();
|
||||
mcp2515.setBitrate(CAN_50KBPS);
|
||||
mcp2515.setNormalMode();
|
||||
mcp2515.setRegister(MCP_CANINTE, CANINTF_ERRIF);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ void setup(uint8_t type, uint8_t id) {
|
|||
pinMode(GREEN_LED, OUTPUT);
|
||||
digitalWrite(RED_LED, LOW);
|
||||
digitalWrite(GREEN_LED, LOW);
|
||||
attachInterrupt(digitalPinToInterrupt(MCP_INT), interrupt_can_error, RISING);
|
||||
}
|
||||
|
||||
bool loop(obus_can::message* message) {
|
||||
|
|
Loading…
Reference in a new issue