1 /* -------------------------------- Arctic Core ------------------------------
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
6 * This source code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by the
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * -------------------------------- Arctic Core ------------------------------*/
23 #ifndef LINIF_CFG_H_
\r
24 #define LINIF_CFG_H_
\r
26 #include "Std_Types.h"
\r
27 #include "Lin_Cfg.h"
\r
31 PDU_MSG_LIN_TX_1 = 0, // Changed by Mattias original value 101
\r
36 /* Switches the Development Error Detection and Notification
\r
38 #define LINIF_DEV_ERROR_DETECT STD_ON
\r
40 /* States if multiple drivers are included in the LIN Interface or not. The
\r
41 * reason for this parameter is to reduce the size of LIN Interface if multiple
\r
42 * drivers are not used. */
\r
43 #define LINIF_MULTIPLE_DRIVER_SUPPORT STD_OFF
\r
45 /* States if the node configuration commands Assign NAD and Conditional
\r
46 * Change NAD are supported. */
\r
47 #define LINIF_OPTIONAL_REQUEST_SUPPORTED STD_OFF
\r
49 /* States if the TP is included in the LIN Interface or not. The reason for this
\r
50 * parameter is to reduce the size of LIN Interface if the TP is not used. */
\r
51 #define LINIF_TP_SUPPORTED STD_OFF
\r
53 /* Switches the LinIf_GetVersionInfo function ON or OFF. */
\r
54 #define LINIF_VERSION_INFO_API STD_ON
\r
57 /* Switches the Development Error Detection and Notification
\r
59 boolean LinIfDevErrorDetect;
\r
60 /* States if multiple drivers are included in the LIN Interface or not. The
\r
61 * reason for this parameter is to reduce the size of LIN Interface if multiple
\r
62 * drivers are not used. */
\r
63 boolean LinIfMultipleDriversSupported;
\r
64 /* States if the node configuration commands Assign NAD and Conditional
\r
65 * Change NAD are supported. */
\r
66 boolean LinIfNcOptionalRequestSupported;
\r
67 /* States if the TP is included in the LIN Interface or not. The reason for this
\r
68 * parameter is to reduce the size of LIN Interface if the TP is not used. */
\r
69 boolean LinIfTpSupported;
\r
70 /* Switches the LinIf_GetVersionInfo function ON or OFF. */
\r
71 boolean LinIfVersionInfoApi;
\r
77 }LinIf_ChecksumType;
\r
90 }LinIf_FrameTypeType;
\r
96 LinIfSlaveToSlavePdu,
\r
98 }LinIf_PduDirectionType;
\r
101 LinIf_ChecksumType LinIfChecksumType;
\r
102 char* LinIfFrameName;
\r
103 uint8 LinIfFramePriority;
\r
104 LinIf_FrameTypeType LinIfFrameType;
\r
107 uint8 LinIfTxTargetPduId;
\r
108 uint8 *LinIfFixedFrameSdu;
\r
109 LinIf_PduDirectionType LinIfPduDirection;
\r
110 //LinIf_SubstitutionFramesType *LinIfSubstitutionFrames;
\r
114 uint32 LinIfJitter;
\r
118 uint32 LinIfConfiguredNad;
\r
119 uint32 LinIfFunctionId;
\r
120 char* LinIfProtocolVersion;
\r
121 uint32 LinIfResponseErrorBitPos;
\r
122 uint32 LinIfSupplierId;
\r
123 uint32 LinIfVariant;
\r
124 uint32 LinIfResponseErrorEventRef;
\r
125 uint16 LinIfResponseErrorFrameRef;
\r
129 CONTINUE_AT_IT_POINT,
\r
130 START_FROM_BEGINNING,
\r
131 }LinIf_ResumePositionType;
\r
140 uint16 LinIfEntryIndex;
\r
141 uint16 LinIfCollisionResolvingRef;
\r
142 uint16 LinIfFrameRef;
\r
146 LinIf_ResumePositionType LinIfResumePosition;
\r
147 LinIfRunModeType LinIfRunMode;
\r
148 uint8 LinIfSchedulePriority;
\r
149 uint16 LinIfScheduleTableIndex;
\r
150 char* LinIfScheduleTableName;
\r
151 const LinIfEntryType *LinIfEntry;
\r
152 uint16 LinIfNofEntries;
\r
153 }LinIf_ScheduleTableType;
\r
155 typedef uint8 LinIf_WakeUpSourceType;
\r
157 typedef char* LinIf_NodeComposition;
\r
160 /* Internal ID for the channel on LIN Interface level. This parameter shall map
\r
161 * the NetworkHandleType to the physical LIN channel.
\r
162 * Implementation Type: NetworkHandleType */
\r
163 uint8 LinIfChannelId;
\r
164 /* Number of schedule requests the schedule table manager can handle for
\r
166 uint8 LinIfScheduleRequestQueueLength;
\r
167 /* Reference to the used channel in Lin. Replaces LINIF_CHANNEL_INDEX */
\r
168 const Lin_ChannelConfigType *LinIfChannelRef;
\r
170 /* Generic container for all types of LIN frames. */
\r
171 const LinIf_FrameType *LinIfFrame;
\r
172 /* Each Master can only be connected to one physical channel.
\r
173 * This could be compared to the Node parameter in a LDF file. */
\r
174 LinIf_MasterType LinIfMaster;
\r
175 /* Describes a schedule table. Each LinIfChannel may have several schedule tables.
\r
176 * Each schedule table can only be connected to one channel. */
\r
177 const LinIf_ScheduleTableType *LinIfScheduleTable;
\r
178 /* The Node attributes of the Slaves are provided with these parameter. */
\r
179 const LinIf_SlaveType *LinIfSlave;
\r
180 /* This container contains the configuration (parameters) needed
\r
181 to configure a wakeup capable channel */
\r
182 const LinIf_WakeUpSourceType *LinIfWakeUpSource;
\r
183 } LinIf_ChannelType;
\r
186 uint16 LinIfTimeBase;
\r
187 const LinIf_ChannelType *LinIfChannel;
\r
188 }LinIf_GlobalConfigType;
\r
191 const LinIf_GeneralType *LinIfGeneral;
\r
192 const LinIf_GlobalConfigType *LinIfGlobalConfig;
\r
195 extern const LinIfEntryType LinIfEntryCfg1[];
\r
196 extern const LinIf_ScheduleTableType LinIfScheduleTableCfg[];
\r
197 extern const LinIf_ChannelType LinIfChannelCfg[];
\r
198 extern const LinIf_GlobalConfigType LinIfGlobalConfig;
\r
200 // TODO not in Lin if spec
\r
201 extern const LinIf_FrameType LinIfFrameCfg[];
\r
203 #define LINIF_CONTROLLER_CNT 1
\r
204 #define LINIF_SCH_CNT 2
\r
206 #endif /*LINIF_CFG_H_*/
\r