#include "can-jf0815.h"

#include <why-time.h>
#include <why-irq.h>

#include <print>

int main()
{
    Why::init();

    CAN_JF0815 can("my-can");

    while (true) {
        auto frame = can.recv();
        std::println("ID {}, dlc {}, data {}", frame.id, frame.dlc, std::string((const char*)frame.data, frame.dlc));
    }

    return 0;
}
