📄 diag_l2_iso9141.h
字号:
/*
* freediag - Vehicle Diagnostic Utility
*
* CVSID $Id: diag_l2_iso9141.h,v 1.1.1.1 2002/01/15 20:28:17 rpalmeida Exp $
*
* Copyright (C) 2001 Richard Almeida & Ibex Ltd (rpa@ibex.co.uk)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*************************************************************************
*
* Diag
*
* L2 driver for ISO 9141 and ISO 9141-2 interface
*
* NOTE: this is only the startcommunications routine, raw routines are
* used for read/write
*
* NOTE: ISO9141/9141-2 do not specify any formatting of the data sent, except
* that ISO9141-2 says if the address is 0x33 then SAEJ1979 protocol is used.
*
* Therefore it is the responsibility of layers above this to format the
* whole frame, unlike in the ISO14230 L2 code which does this
*
*/
int
diag_l2_proto_9141_sc_common(diag_l2_conn_t *d_l2_conn, int bitrate,
u_int8_t target, u_int8_t source, int kb1, int kb2);
int
diag_l2_proto_9141_startcomms( diag_l2_conn_t *d_l2_conn, u_int16_t flags,
int bitrate, u_int8_t target, u_int8_t source);
int
diag_l2_proto_9141_2_startcomms( diag_l2_conn_t *d_l2_conn, u_int16_t flags,
int bitrate, u_int8_t target, u_int8_t source);
/*
* Read data, attempts to get complete set of responses (using timeout stuff)
*
*/
int
diag_l2_proto_9141_int_recv(diag_l2_conn_t *d_l2_conn, int timeout);
int
diag_l2_proto_9141_recv(diag_l2_conn_t *d_l2_conn, int timeout,
void (*callback)(void *handle, diag_msg_t *msg), void *handle);
/*
* Just send the data, with no processing etc, but insert the
* inter-frame delay (p2).
* Note, we copy the 1st two bytes as the source and dest address
* into the l2_conn info, so that in ISO9141-2 code below it has the
* addresses for doing idle timeout
*/
int
diag_l2_proto_9141_send(diag_l2_conn_t *d_l2_conn, diag_msg_t *msg);
diag_msg_t *
diag_l2_proto_9141_request(diag_l2_conn_t *d_l2_conn, diag_msg_t *msg,
int *errval);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -