📄 diag_l2_mb1.h
字号:
/*
* freediag - Vehicle Diagnostic Utility
*
* CVSID $Id: diag_l2_mb1.h,v 1.2 2002/04/03 04:56:40 bjorn_helgaas 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.
*
*************************************************************************
*
* L2 driver for Mercedes Benz protocol used on things like the
* EGS (auto gearbox controller) on 1999/2000/2001 cars
* I have called this Mercedes Benz protocol 1, since all other control
* units I have played with use ISO14230
*
*/
int
diag_l2_proto_mb1_startcomms( diag_l2_conn_t *d_l2_conn, u_int16_t flags,
int bitrate, u_int8_t target, u_int8_t source);
/*
* Decode the message header, and check the message is complete
* and that the checksum is correct.
*
* Once we know the actual msglen, *msglen is filled in, else it is set to 0
*
* Data/len is received data/len
*/
int
diag_l2_proto_mb1_decode(u_int8_t *data, int len, int *msglen);
/*
* Internal receive, reads a whole message from the ECU -
* returns the data length of the packet received
*/
int
diag_l2_proto_mb1_int_recv(diag_l2_conn_t *d_l2_conn, int timeout, u_int8_t *data, int len);
/*
* Read data, attempts to get complete set of responses
*
*/
int
diag_l2_proto_mb1_recv(diag_l2_conn_t *d_l2_conn, int timeout,
void (*callback)(void *handle, diag_msg_t *msg), void *handle);
/*
* Send the data, using MB1 protocol
*/
int
diag_l2_proto_mb1_send(diag_l2_conn_t *d_l2_conn, diag_msg_t *msg);
diag_msg_t *
diag_l2_proto_mb1_request(diag_l2_conn_t *d_l2_conn, diag_msg_t *msg,
int *errval);
/*
* Timeout, called to send idle packet to keep link to ECU alive
*/
void
diag_l2_proto_mb1_timeout(diag_l2_conn_t *d_l2_conn);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -