]> rtime.felk.cvut.cz Git - arc.git/blob - include/Dio.h
Merged in from diagnostic-dev
[arc.git] / include / Dio.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
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>.
9  *
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
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16 #ifndef DIO_H_\r
17 #define DIO_H_\r
18 \r
19 #include "Std_Types.h" /** @req DIO131 */\r
20 \r
21 // API Service ID's\r
22 #define DIO_READCHANNEL_ID                      0x00\r
23 #define DIO_WRITECHANNEL_ID                     0x01\r
24 #define DIO_READPORT_ID                         0x02\r
25 #define DIO_WRITEPORT_ID                        0x03\r
26 #define DIO_READCHANNELGROUP_ID         0x04\r
27 #define DIO_WRITECHANNELGROUP_ID        0x05\r
28 #define DIO_GETVERSIONINFO_ID           0x12\r
29 \r
30 #define DIO_E_PARAM_INVALID_CHANNEL_ID          10\r
31 #define DIO_E_PARAM_INVALID_PORT_ID             20\r
32 #define DIO_E_PARAM_INVALID_GROUP_ID            31\r
33
34 #define DIO_SW_MAJOR_VERSION    1
35 #define DIO_SW_MINOR_VERSION    0
36 #define DIO_SW_PATCH_VERSION    0
37
38 #define DIO_AR_MAJOR_VERSION     2
39 #define DIO_AR_MINOR_VERSION     2 
40 #define DIO_AR_PATCH_VERSION     1 
41 \r
42 #include "Dio_Cfg.h"\r
43
44 /** @req DIO124 */
45 #if ( DIO_VERSION_INFO_API == STD_ON)
46 /** @req DIO139 */\r
47 void Dio_GetVersionInfo( Std_VersionInfoType *versionInfo );\r
48 #endif\r
49
50 /** @req DIO133 */
51 /** @req DIO027 */\r
52 Dio_LevelType Dio_ReadChannel(Dio_ChannelType channelId);
53 /** @req DIO134 */\r
54 void Dio_WriteChannel(Dio_ChannelType channelId, Dio_LevelType level);
55
56 /** @req DIO135 */
57 /** @req DIO031 */\r
58 Dio_PortLevelType Dio_ReadPort(Dio_PortType portId);
59 /** @req DIO136 */\r
60 void Dio_WritePort(Dio_PortType portId, Dio_PortLevelType level);\r
61
62 /** @req DIO137 */
63 Dio_PortLevelType Dio_ReadChannelGroup( const Dio_ChannelGroupType *channelGroupIdPtr );
64 /** @req DIO138 */\r
65 void Dio_WriteChannelGroup(const Dio_ChannelGroupType *channelGroupIdPtr, Dio_PortLevelType level);\r
66 \r
67 #endif /*DIO_H_*/\r