MCPcopy Create free account
hub / github.com/Seeed-Studio/Seeed_Arduino_CAN / readMsgBufID

Method readMsgBufID

src/can-serial.cpp:403–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403INT8U Can232::readMsgBufID(INT32U *ID, INT8U *len, INT8U buf[]) {
404#ifndef _MCP_FAKE_MODE_
405 return lw232CAN? lw232CAN->readMsgBufID(ID, len, buf): CAN_NOMSG;
406#else
407 *ID = random(0x100, 0x110);
408 *len = 4;
409 buf[0] = random(0x01, 0x10);
410 buf[1] = random(0xa1, 0xf0);
411 buf[2] = 0x00;
412 buf[3] = 0x00;
413 return CAN_OK;
414#endif
415}
416
417INT8U Can232::receiveSingleFrame() {
418 INT8U ret = LW232_OK;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected