beautypg.com

Hd can module programmer’s guide (linux) – Hatteland Display HT B22 (Fanless) User Manual

Page 9

background image

DOC101356-1_ - rev 2 – 2013-09-24 - Created by:6644

Page 9 of 24

Hatteland Display AS, Åmsosen, N-5578 Nedre Vats, Norway

Tel: (+47) 4814 2200 - [email protected] - www.hatteland-display.com

HD CAN Module Programmer’s Guide (Linux)

All intellectual properties belongs to Hatteland Display AS

static

void

callPassThruClose

()

{

PassThruClose

(

deviceId

);

}

/**************************************************************************
**********//**
* @brief Function to Connect Channel

***************************************************************************
************/

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

()