]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc5516it/examples/led_rte/IoHwAb_ServiceComponent.c
Corrected the mpc5567 interrupt table.
[arc.git] / boards / mpc5516it / examples / led_rte / IoHwAb_ServiceComponent.c
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 #include "Rte_Type.h"\r
17 #include "IoHwAb.h"\r
18 \r
19 Std_ReturnType DigitalInput_Get(IoHwAb_SignalType signalId,\r
20                 DigitalLevel* value, SignalQuality* quality)\r
21 {\r
22         Std_ReturnType rv;\r
23         IoHwAb_StatusType s;\r
24 \r
25         rv = IoHwAb_Get_Digital( signalId, value, &s );\r
26         *quality= (SignalQuality)s.quality;\r
27     return rv;\r
28 }\r
29 \r
30 \r
31 Std_ReturnType DigitalOutput_Set(IoHwAb_SignalType signalId,\r
32                 const DigitalLevel value)\r
33 {\r
34         IoHwAb_StatusType status;\r
35         return IoHwAb_Set_Digital( signalId, value, &status );\r
36 }\r
37 \r
38 Std_ReturnType DigitalOutput_ReadBack(IoHwAb_SignalType signalId,\r
39                 DigitalLevel* value)\r
40 {\r
41         Std_ReturnType rv;\r
42         IoHwAb_StatusType s;\r
43 \r
44         rv = IoHwAb_Get_Digital( signalId, value, &s );\r
45    return rv;\r
46 }\r
47 \r