Owner manual
DOC101357-1_ - rev 2 – 2013-09-23 - Created by:6644
Page 10 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
***************************************************************************
************/
static void callPassThruConnect()
{
int baudSel;
int protoSel;
int chanSel;
int devSel;
int flagSel;
unsigned long deviceIdToUse;
unsigned long baudrate;
unsigned long flags;
//"Enter protocol (0-J1850VPW, 1-J1850PWM, 2-ISO9141, 3-ISO14230, 4-
CAN, 5-ISO15765, "
// "6-SCI_A_ENGINE, 7-SCI_A_TRANS, 8-SCI_B_ENGINE, 9-
SCI_B_TRANS): ";
//Select CAN protocol
protoSel = 4;
//cout << "Enter baudrate (0-125kbps, 1-250kbps, 2-500kbps, 3-1Mbps,
4-invalid baudrate): ";
baudSel = 125000;
flags = PHYSICAL_CHANNEL;
deviceIdToUse = deviceId;
PassThruConnect(deviceIdToUse, static_cast<J2534_PROTOCOL>(protoSel +
1), flags, baudrate, &channel_1);
}
/**************************************************************************
**********//**
* @brief Function to disconnect channel
***************************************************************************
************/
static void callPassThruDisconnect()
{
PassThruDisconnect(channel_1);
}
/**************************************************************************
**********//**
* @brief Function to Read Message
***************************************************************************
************/
static void callPassThruReadMsgs()
{
unsigned long msgNum = 1;
unsigned long *msgNumPtr = &msgNum;
unsigned long timeout = 0;
unsigned int id = 0x10;
int chanSel;
int msgPtrSel;
int msgNumPtrSel;