]> rtime.felk.cvut.cz Git - arc.git/blob - include/IoHwAb_Types.h
Merge with Ticket1129-nvm
[arc.git] / include / IoHwAb_Types.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\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
9  *\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
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 \r
17 \r
18 #ifndef IOHWAB_TYPES_H_\r
19 #define IOHWAB_TYPES_H_\r
20 \r
21 #include <Std_Types.h>\r
22 #include "IoHwAb_Types.h"\r
23 \r
24 /* Digital levels */\r
25 typedef uint8  IoHwAb_LevelType;\r
26 \r
27 /* Analog values base type */\r
28 typedef sint32 IoHwAb_AnalogValueType;\r
29 \r
30 //typedef sint32 IoHwAb_ChannelType;\r
31 \r
32 #if !defined(IOHWAB_USE_RTE)\r
33 typedef sint32 IoHwAb_SignalType;\r
34 #endif\r
35 \r
36 /* Duty cycle type (per mille) */\r
37 typedef uint32 IoHwAb_DutyType;\r
38 #define IOHWAB_DUTY_MIN            0u           /*   0% */\r
39 #define IOHWAB_DUTY_MAX         1000u           /* 100% */\r
40 \r
41 /* Frequency type (Hz) */\r
42 typedef uint32 IoHwAb_FrequencyType;\r
43 \r
44 /* ISO14229, IoControl */\r
45 #define IOHWAB_RETURNCONTROLTOECU       0\r
46 #define IOHWAB_RESETTODEFAULT           1\r
47 #define IOHWAB_FREEZECURRENTSTATE       2\r
48 #define IOHWAB_SHORTTERMADJUST          3\r
49 \r
50 /* Freescale qADC have 12-bit ADC resolution bit 14-bit result */\r
51 #define ADC_MAX_VALUE                           16384\r
52 \r
53 #define IOHWAB_LOW                      STD_HIGH\r
54 #define IOHWAB_HIGH                     STD_LOW\r
55 \r
56 /* Quality */\r
57 typedef enum {\r
58         IOHWAB_INIVAL,  /* Value not available */\r
59         IOHWAB_ERR,             /* Electrical diagnosic set */\r
60         IOHWAB_BAD,\r
61         IOHWAB_GOOD,\r
62 } IoHwAb_QualityType;\r
63 \r
64 typedef struct {\r
65         IoHwAb_QualityType quality;\r
66 } IoHwAb_StatusType;\r
67 \r
68 #endif /* IOHWAB_TYPES_H_ */\r