Owner manual

DOC101357-1_ - rev 2 2013-09-23 - Created by:6644
Page 14 of 25
Hatteland Display AS, Åmsosen, N-5578 Nedre Vats, Norway
Tel: (+47) 4814 2200 - mail@hatteland-display.com - www.hatteland-display.com
HD CAN Module Programmer’s Guide (Windows)
All intellectual properties belongs to Hatteland Display AS
//Set Standard ID(0/Standard;1/Extended)
filterFlags.bits.Can29BitId = 0;
filterMaskPassThruMsg.TxFlags = filterFlags.value;
filterFlags.bits.Can29BitId = 0;
filterPattPassThruMsg.TxFlags = filterFlags.value;
PassThruStartMsgFilter(channel_1, filterType,
filterMaskPassThruMsgPtr, filterPattPassThruMsgPtr, NULL,
&filterId[filterIdSel]);
}
/**************************************************************************
**********//**
* @brief Function to stop message filter
***************************************************************************
************/
static void callPassThruStopMsgFilter()
{
int filterIdSel = 0;
J2534_ERROR_CODE err;
err = PassThruStopMsgFilter(channel_1, filterId[filterIdSel]);
if (STATUS_NOERROR == err)
{
filterId[filterIdSel] = INITIAL_FILTER_ID;
}
}
/**************************************************************************
**********//**
* @brief Function to do software reset
***************************************************************************
************/
static void callPassThruReset()
{
PassThruReset();
}
int main(void)
{
//Load Library
if(!loadLib())
{
cout << "HDJ2534.dll - load error!" << endl;
return 0;
}
//Open Device
callPassThruOpen();
//Connect Channel_1 CAN 125000bps