CAN初始化器参数 [英] CAN initializer perameters
本文介绍了CAN初始化器参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我第一次使用C ++做CAN:我正在使用API函数来初始化CAN。 API CAN初始化的功能如下:
/// < 摘要 >
///初始化PCAN频道
/// < / summary >
/// < param 名称 = 频道 > ; PCAN频道的句柄< / param >
/// < param < span class =code-attribute> name = Btr0Btr1 > 通讯速度(BTR0BTR1)代码)< / param >
/// // < param 名称 = HwType > NON PLUG& PLAY:硬件类型和操作模式< / param >
/// < param name = IOPort > NON PLUG& PLAY:并行端口的I / O地址< / param >
/// < param name = 中断 > NON PLUG& PLAY:中断号码并行端口< / param >
/// < 返回 > ; TPCANStatus错误代码< / returns >
TPCANStatus __stdcall CAN_Initialize(
TPCANHandle频道,
TPCANBaudrate Btr0Btr1,
TPCANType HwType _DEF_ARG,
DWORD IOPort _DEF_ARG,
WORD中断_DEF_ARG);
我不确定最后3个参数会在这里找到什么以及如何找到它们
例如CAN_Initialize(PCAN_NONEBUS,PCAN_BAUD_5K,??,??,? ? );
任何帮助都可以通过????
解决方案
来访问DLL文件。使用Loadlibrary()和GetProcAddress()
例如查看此链接
https://www.c-plusplus.net/forum / 128715满
I am doing CAN first time using C++: I am using API function to initialize CAN. Function for API CAN intialization is as following
/// <summary>
/// Initializes a PCAN Channel
/// </summary>
/// <param name="Channel">"The handle of a PCAN Channel"</param>
/// <param name="Btr0Btr1">"The speed for the communication (BTR0BTR1 code)"</param>
/// <param name="HwType">"NON PLUG&PLAY: The type of hardware and operation mode"</param>
/// <param name="IOPort">"NON PLUG&PLAY: The I/O address for the parallel port"</param>
/// <param name="Interrupt">"NON PLUG&PLAY: Interrupt number of the parallel port"</param>
/// <returns>"A TPCANStatus error code"</returns>
TPCANStatus __stdcall CAN_Initialize(
TPCANHandle Channel,
TPCANBaudrate Btr0Btr1,
TPCANType HwType _DEF_ARG,
DWORD IOPort _DEF_ARG,
WORD Interrupt _DEF_ARG);
I am not sure about the last 3 parameters what will come here and how to find them
e.g CAN_Initialize(PCAN_NONEBUS, PCAN_BAUD_5K, ??, ??, ?? );
Any help\suggestion please????
解决方案
to access DLL file. use Loadlibrary() and GetProcAddress()
for example check this link
https://www.c-plusplus.net/forum/128715-full
这篇关于CAN初始化器参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文