1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
16 /** @addtogroup LinIf LIN Interface
\r
20 * API and type definitions for LIN Interface.
\r
26 #define LINIF_SW_MAJOR_VERSION 1
\r
27 #define LINIF_SW_MINOR_VERSION 0
\r
28 #define LINIF_SW_PATCH_VERSION 0
\r
29 #define LINIF_AR_MAJOR_VERSION 2
\r
30 #define LINIF_AR_MINOR_VERSION 0
\r
31 #define LINIF_AR_PATCH_VERSION 1
\r
33 #include "Std_Types.h"
\r
34 #include "LinIf_Cfg.h"
\r
35 #include "LinIf_Types.h"
\r
36 #include "ComStack_Types.h"
\r
37 #include "ComM_Types.h"
\r
40 /** @name Service id's */
\r
42 #define LINIF_INIT_SERVICE_ID 0x00
\r
43 #define LINIF_GETVERSIONINFO_SERVICE_ID 0x03
\r
44 #define LINIF_SCHEDULEREQUEST_SERVICE_ID 0x05
\r
45 #define LINIF_GOTOSLEEP_SERVICE_ID 0x06
\r
46 #define LINIF_WAKEUP_SERVICE_ID 0x07
\r
47 #define LINIF_MAINFUNCTION_SERVICE_ID 0x80
\r
50 /** @name Error Codes */
\r
52 #define LINIF_E_UNINIT 0x00
\r
53 #define LINIF_E_ALREADY_INITIALIZED 0x10
\r
54 #define LINIF_E_NONEXISTENT_CHANNEL 0x20
\r
55 #define LINIF_E_PARAMETER 0x30
\r
56 #define LINIF_E_PARAMETER_POINTER 0x40
\r
57 #define LINIF_E_SCHEDULE_OVERFLOW 0x50
\r
58 #define LINIF_E_SCHEDULE_REQUEST_ERROR 0x51
\r
61 #if (LINIF_VERSION_INFO_API == STD_ON)
\r
62 void LinIf_GetVersionInfo( Std_VersionInfoType *versionInfo );
\r
63 #define LinIf_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,LINIF)
\r
66 void LinIf_Init( const void* ConfigPtr );
\r
68 void LinIf_DeInit();
\r
70 Std_ReturnType LinIf_Transmit(PduIdType LinTxPduId,const PduInfoType* PduInfoPtr);
\r
72 Std_ReturnType LinIf_ScheduleRequest(NetworkHandleType Channel,LinIf_SchHandleType Schedule);
\r
74 Std_ReturnType LinIf_GotoSleep(NetworkHandleType Channel);
\r
76 Std_ReturnType LinIf_WakeUp(NetworkHandleType Channel);
\r
78 void LinIf_MainFunction();
\r