#include <stdio.h>
#include "pico/stdlib.h"
#include "can_mcp2515.h"
struct can_frame rx;
int main() {
stdio_init_all();
//Initialize interface
//MCP2515_INIT(0, 17, 16, 18, 10000000);
MCP2515_reset();
MCP2515_setBitrate(CAN_125KBPS, MCP_8MHZ);
MCP2515_setNormalMode();
//Listen loop
while(true) {
if(MCP2515_readMessage(&rx) == MCP2515_ERROR_OK) {
printf("New frame from ID: %10x\n", rx.can_id);
}
}
return 0;
}