492 {
494
496 PRINT(
"*** INFO: sendDataTimeout %d" PRINT_EOL,
size);
497 }
498
500 return 0;
501
502
508 }
509
510
511
512
519
520
521#if !EFI_UNIT_TEST
523 size_t numFcReceived = 0;
524 int separationTimeUs = 0;
525 while (numFcReceived < 3) {
526
528 efiPrintf("IsoTp: Flow Control frame not received");
529
530 return 0;
531 }
533
534
536
537 continue;
538 }
539
540
541 numFcReceived++;
543
544 if (flowStatus == CAN_FLOW_STATUS_ABORT) {
545 efiPrintf("IsoTp: Flow Control ABORT");
546
547 return -4;
548 }
549
550 if (flowStatus == CAN_FLOW_STATUS_WAIT_MORE) {
551
552 if (numFcReceived < 3) {
553 continue;
554 }
555
556 return -5;
557 }
558
559 if (flowStatus != CAN_FLOW_STATUS_OK) {
560 efiPrintf("IsoTp: Flow Control unknown Status %d", flowStatus);
561
562 return -6;
563 }
564
567 if (blockSize != 0) {
568
569 efiPrintf("IsoTp: Flow Control blockSize is not supported %d", blockSize);
570
571 return -7;
572 }
573
574 if (minSeparationTime <= 0x7f) {
575
576 separationTimeUs = minSeparationTime * 1000;
577 } else if ((minSeparationTime >= 0xf1) && (minSeparationTime <= 0xf9)) {
578
579 separationTimeUs = (minSeparationTime - 0xf0) * 100;
580 }
581
582 break;
583 }
584#endif
585
586
587 uint8_t idx = 1;
590
592 header.
index = ((idx++) & 0x0f);
595 if (numSent < 1)
596 break;
599
600#if ! EFI_UNIT_TEST
601 if (separationTimeUs) {
602 chThdSleepMicroseconds(separationTimeUs);
603 }
604#endif
605 }
607}
int sendFrame(const IsoTpFrameHeader &header, const uint8_t *data, int num, can_sysinterval_t timeout)
size_t isoHeaderByteIndex
fifo_buffer_sync< CANRxFrame, ISOTP_RX_QUEUE_LEN > rxFifoBuf
static constexpr engine_configuration_s * engineConfiguration
@ ISO_TP_FRAME_CONSECUTIVE
@ ISO_TP_FRAME_FLOW_CONTROL
uint8_t data8[8]
Frame data.