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
19 /** @file LinIf_Cfg.h
\r
20 * Definitions of configuration parameters for LIN Interface.
\r
23 #warning "This default file may only be used as an example!"
\r
25 #ifndef LINIF_CFG_H_
\r
26 #define LINIF_CFG_H_
\r
28 #include "Std_Types.h"
\r
29 #include "Lin_Cfg.h"
\r
33 PDU_MSG_LIN_TX_1 = 0, // Changed by Mattias original value 101
\r
38 /** Switches the Development Error Detection and Notification
\r
40 #define LINIF_DEV_ERROR_DETECT STD_ON
\r
42 /** States if multiple drivers are included in the LIN Interface or not. The
\r
43 * reason for this parameter is to reduce the size of LIN Interface if multiple
\r
44 * drivers are not used. */
\r
45 #define LINIF_MULTIPLE_DRIVER_SUPPORT STD_OFF
\r
47 /** States if the node configuration commands Assign NAD and Conditional
\r
48 * Change NAD are supported. */
\r
49 #define LINIF_OPTIONAL_REQUEST_SUPPORTED STD_OFF
\r
51 /** States if the TP is included in the LIN Interface or not. The reason for this
\r
52 * parameter is to reduce the size of LIN Interface if the TP is not used. */
\r
53 #define LINIF_TP_SUPPORTED STD_OFF
\r
55 /** Switches the LinIf_GetVersionInfo function ON or OFF. */
\r
56 #define LINIF_VERSION_INFO_API STD_ON
\r
59 /** Switches the Development Error Detection and Notification
\r
61 boolean LinIfDevErrorDetect;
\r
62 /** States if multiple drivers are included in the LIN Interface or not. The
\r
63 * reason for this parameter is to reduce the size of LIN Interface if multiple
\r
64 * drivers are not used. */
\r
65 boolean LinIfMultipleDriversSupported;
\r
66 /** States if the node configuration commands Assign NAD and Conditional
\r
67 * Change NAD are supported. */
\r
68 boolean LinIfNcOptionalRequestSupported;
\r
69 /** States if the TP is included in the LIN Interface or not. The reason for this
\r
70 * parameter is to reduce the size of LIN Interface if the TP is not used. */
\r
71 boolean LinIfTpSupported;
\r
72 /** Switches the LinIf_GetVersionInfo function ON or OFF. */
\r
73 boolean LinIfVersionInfoApi;
\r
79 }LinIf_ChecksumType;
\r
92 }LinIf_FrameTypeType;
\r
98 LinIfSlaveToSlavePdu,
\r
100 }LinIf_PduDirectionType;
\r
103 LinIf_ChecksumType LinIfChecksumType;
\r
104 char* LinIfFrameName;
\r
105 uint8 LinIfFramePriority;
\r
106 LinIf_FrameTypeType LinIfFrameType;
\r
109 uint8 LinIfTxTargetPduId;
\r
110 uint8 *LinIfFixedFrameSdu;
\r
111 LinIf_PduDirectionType LinIfPduDirection;
\r
112 //LinIf_SubstitutionFramesType *LinIfSubstitutionFrames;
\r
116 uint32 LinIfJitter;
\r
120 uint32 LinIfConfiguredNad;
\r
121 uint32 LinIfFunctionId;
\r
122 char* LinIfProtocolVersion;
\r
123 uint32 LinIfResponseErrorBitPos;
\r
124 uint32 LinIfSupplierId;
\r
125 uint32 LinIfVariant;
\r
126 uint32 LinIfResponseErrorEventRef;
\r
127 uint16 LinIfResponseErrorFrameRef;
\r
131 CONTINUE_AT_IT_POINT,
\r
132 START_FROM_BEGINNING,
\r
133 }LinIf_ResumePositionType;
\r
142 uint16 LinIfEntryIndex;
\r
143 uint16 LinIfCollisionResolvingRef;
\r
144 uint16 LinIfFrameRef;
\r
148 LinIf_ResumePositionType LinIfResumePosition;
\r
149 LinIfRunModeType LinIfRunMode;
\r
150 uint8 LinIfSchedulePriority;
\r
151 uint16 LinIfScheduleTableIndex;
\r
152 char* LinIfScheduleTableName;
\r
153 const LinIfEntryType *LinIfEntry;
\r
154 uint16 LinIfNofEntries;
\r
155 }LinIf_ScheduleTableType;
\r
157 typedef uint8 LinIf_WakeUpSourceType;
\r
159 typedef char* LinIf_NodeComposition;
\r
162 /* Internal ID for the channel on LIN Interface level. This parameter shall map
\r
163 * the NetworkHandleType to the physical LIN channel.
\r
164 * Implementation Type: NetworkHandleType */
\r
165 uint8 LinIfChannelId;
\r
166 /* Number of schedule requests the schedule table manager can handle for
\r
168 uint8 LinIfScheduleRequestQueueLength;
\r
169 /* Reference to the used channel in Lin. Replaces LINIF_CHANNEL_INDEX */
\r
170 const Lin_ChannelConfigType *LinIfChannelRef;
\r
172 /* Generic container for all types of LIN frames. */
\r
173 const LinIf_FrameType *LinIfFrame;
\r
174 /* Each Master can only be connected to one physical channel.
\r
175 * This could be compared to the Node parameter in a LDF file. */
\r
176 LinIf_MasterType LinIfMaster;
\r
177 /* Describes a schedule table. Each LinIfChannel may have several schedule tables.
\r
178 * Each schedule table can only be connected to one channel. */
\r
179 const LinIf_ScheduleTableType *LinIfScheduleTable;
\r
180 /* The Node attributes of the Slaves are provided with these parameter. */
\r
181 const LinIf_SlaveType *LinIfSlave;
\r
182 /* This container contains the configuration (parameters) needed
\r
183 to configure a wakeup capable channel */
\r
184 const LinIf_WakeUpSourceType *LinIfWakeUpSource;
\r
185 } LinIf_ChannelType;
\r
188 uint16 LinIfTimeBase;
\r
189 const LinIf_ChannelType *LinIfChannel;
\r
190 }LinIf_GlobalConfigType;
\r
193 const LinIf_GeneralType *LinIfGeneral;
\r
194 const LinIf_GlobalConfigType *LinIfGlobalConfig;
\r
197 extern const LinIfEntryType LinIfEntryCfg1[];
\r
198 extern const LinIf_ScheduleTableType LinIfScheduleTableCfg[];
\r
199 extern const LinIf_ChannelType LinIfChannelCfg[];
\r
200 extern const LinIf_GlobalConfigType LinIfGlobalConfig;
\r
202 // TODO not in Lin if spec
\r
203 extern const LinIf_FrameType LinIfFrameCfg[];
\r
205 #define LINIF_CONTROLLER_CNT 1
\r
206 #define LINIF_SCH_CNT 2
\r
208 #endif /*LINIF_CFG_H_*/
\r