22 lines
367 B
C++
22 lines
367 B
C++
//
|
|
// Created by zuma on 12.10.2020.
|
|
//
|
|
|
|
#include <asyncdevice.h>
|
|
#include <picandevice.h>
|
|
|
|
int main() {
|
|
AsyncDevice device;
|
|
device.replace(new PICANDevice("can0"));
|
|
|
|
CAN_Raw msg = { .Id = 0x20, .Size = sizeof(int) };
|
|
int& counter = reinterpret_cast<int&>(msg.Data);
|
|
|
|
counter = 0;
|
|
while (counter++ < 1000) {
|
|
device.send(msg);
|
|
piMSleep(1);
|
|
}
|
|
|
|
piSleep(5);
|
|
} |