]> rtime.felk.cvut.cz Git - arc.git/blob - communication/PduR/PduR_J1939Tp.c
Added J1939 to PduR. Warning: totally untested so far.
[arc.git] / communication / PduR / PduR_J1939Tp.c
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
17 #include "PduR.h"
18 #include "Det.h"
19 #include "debug.h"
20
21 #if (PDUR_ZERO_COST_OPERATION == STD_OFF) && (PDUR_J1939TP_SUPPORT == STD_ON)
22
23 BufReq_ReturnType PduR_J1939TpProvideRxBuffer(PduIdType J1939TpTxId, PduLengthType sduLength, PduInfoType **pduInfoPtr) {
24         return PduR_ARC_ProvideRxBuffer(J1939TpTxId, sduLength, pduInfoPtr, 0x03);
25 }
26
27
28 void PduR_J1939TpRxIndication(PduIdType id, NotifResultType Result) {
29         PduInfoType PduInfo = {
30                 .SduDataPtr = &Result,
31                 .SduLength = 0 // To fix PC-Lint 785
32         };
33         PduR_ARC_RxIndication(id, &PduInfo, 0x04);
34 }
35
36 BufReq_ReturnType PduR_J1939TpProvideTxBuffer(PduIdType J1939TpTxId,PduInfoType** PduInfoPtr, uint16 Length) {
37         return PduR_ARC_ProvideTxBuffer(J1939TpTxId, PduInfoPtr, Length, 0x03);
38 }
39
40
41 void PduR_J1939TpTxConfirmation(PduIdType J1939TpTxId, NotifResultType Result) {
42         PduR_ARC_TxConfirmation(J1939TpTxId, Result, 0x0f);
43 }
44
45
46 #endif