]> rtime.felk.cvut.cz Git - arc.git/blob - include/IoHwAb_Types.h
Merge branch 'mikulka' of git@rtime.felk.cvut.cz:arc into mikulka
[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 \r
23 /* Digital levels */\r
24 typedef uint8  IoHwAb_LevelType;\r
25 \r
26 /* Analog values base type */\r
27 typedef sint32 IoHwAb_AnalogValueType;\r
28 \r
29 //typedef sint32 IoHwAb_ChannelType;\r
30 \r
31 #if !defined(CFG_IOHWAB_USE_SERVICE_COMPONENT)\r
32 typedef sint32 IoHwAb_SignalType;\r
33 #endif\r
34 \r
35 /* Duty cycle type (per mille) */\r
36 typedef uint32 IoHwAb_DutyType;\r
37 #define IOHWAB_DUTY_MIN            0u           /*   0% */\r
38 #define IOHWAB_DUTY_MAX         1000u           /* 100% */\r
39 \r
40 /* Frequency type (Hz) */\r
41 typedef uint32 IoHwAb_FrequencyType;\r
42 \r
43 /* ISO14229, IoControl */\r
44 #define IOHWAB_RETURNCONTROLTOECU       0\r
45 #define IOHWAB_RESETTODEFAULT           1\r
46 #define IOHWAB_FREEZECURRENTSTATE       2\r
47 #define IOHWAB_SHORTTERMADJUST          3\r
48 \r
49 /* Freescale qADC have 12-bit ADC resolution bit 14-bit result */\r
50 #define ADC_MAX_VALUE                           16384\r
51 \r
52 #define IOHWAB_LOW                      STD_LOW\r
53 #define IOHWAB_HIGH                     STD_HIGH\r
54 \r
55 /* Quality */\r
56 typedef enum {\r
57         IOHWAB_INIVAL,  /* Value not available */\r
58         IOHWAB_ERR,             /* Electrical diagnosic set */\r
59         IOHWAB_BAD,\r
60         IOHWAB_GOOD,\r
61 } IoHwAb_QualityType;\r
62 \r
63 typedef struct {\r
64         IoHwAb_QualityType quality;\r
65 } IoHwAb_StatusType;\r
66 \r
67 #endif /* IOHWAB_TYPES_H_ */\r