Trying to call the function below:
typedef struct tagZCAN_CHANNEL_INIT_CONFIG {
UINT can_type; //0:can 1:canfd
union
{
struct
{
UINT acc_code;
UINT acc_mask;
UINT reserved;
BYTE filter;
BYTE timing0;
BYTE timing1;
BYTE mode;
}can;
struct
{
UINT acc_code;
UINT acc_mask;
UINT abit_timing;
UINT dbit_timing;
UINT brp;
BYTE filter;
BYTE mode;
USHORT pad;
UINT reserved;
}canfd;
};
}ZCAN_CHANNEL_INIT_CONFIG;
CHANNEL_HANDLE ZCAN_InitCAN(DEVICE_HANDLE device_handle, UINT can_index, ZCAN_CHANNEL_INIT_CONFIG* pInitConfig);
Can anyone give me some tips on how to pass this structure with union into DLL?
Thanks for any help you can provide!