beautypg.com

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

Page 13

background image

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

Page 13 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


filterPattPassThruMsg

.

Data

[

0

]

=

static_cast

<

unsigned

char

>(

pattId

>>

24

);

filterPattPassThruMsg

.

Data

[

1

]

=

static_cast

<

unsigned

char

>(

pattId

>>

16

);

filterPattPassThruMsg

.

Data

[

2

]

=

static_cast

<

unsigned

char

>(

pattId

>>

8

);

filterPattPassThruMsg

.

Data

[

3

]

=

static_cast

<

unsigned

char

>(

pattId

>>

0

);

//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

)

{

//Open Device