RP-01_Flutter/lib/CanLib/canfd_init_config.dart
2025-04-30 17:01:25 +08:00

49 lines
920 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'dart:ffi';
final class CanFdInitConfig extends Struct {
/// 0-正常模式1-自发自收模式
@Uint8()
external int mode;
/// 0-禁止ISO CRC,1-使能ISO CRC
@Uint8()
external int isocrcEnable;
/// 0-禁止重发1-无限制重发
@Uint8()
external int retrySend;
/// 0-不接入内部120欧终端电阻1-接入内部120欧终端电阻
@Uint8()
external int resEnable;
/// 仲裁段波特率参数, 波特率=40M/NBT_BRP*(1+NBT_SEG1+NBT_SEG2)
@Uint8()
external int nbtBRP;
@Uint8()
external int nbtSEG1;
@Uint8()
external int nbtSEG2;
@Uint8()
external int nbtSJW;
/// 数据段波特率参数, 波特率=40M/DBT_BRP*(1+DBT_SEG1+DBT_SEG2)
@Uint8()
external int dbtBRP;
@Uint8()
external int dbtSEG1;
@Uint8()
external int dbtSEG2;
@Uint8()
external int dbtSJW;
/// 预留字段
@Array<Uint8>(8)
external Array<Uint8> res0;
}