lin_common_proto.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
18 
19 
20 #ifndef LIN_COMMON_PROTO_H
21 #define LIN_COMMON_PROTO_H
22 
23 #include "lin_types.h"
24 #include "lin_cfg.h"
25 
26 /*******************************************************************************
27  * Definitions
28  ******************************************************************************/
29 #define MAKE_UNCONDITIONAL_FRAME 0U
30 #define UPDATE_UNCONDITIONAL_FRAME 1U
32 /*******************************************************************************
33  * API
34  ******************************************************************************/
35 
36 #if (SUPPORT_MASTER_MODE == 1U)
37 /*
38  * @brief Check to see if the current schedule table is needed to change
39  * or not. Used in tick callback function.
40  *
41  * @param[in] iii Interface name
42  * @return void
43  */
44 void lin_switch_sch_table(l_ifc_handle iii);
45 
46 /*
47  * @brief Checks if the associated flags to a sporadic frame have been updated
48  * and a transmission is needed
49  *
50  * @param[in] iii Interface name
51  * @param[in] frm_id Index of frame
52  * @return l_u8
53  */
54 l_u8 lin_check_sporadic_update(l_ifc_handle iii,
55  l_u8 frm_id);
56 
57 #endif /* End (SUPPORT_MASTER_MODE == 1U) */
58 
59 /*
60  * @brief This function packs signals associated with unconditional frame
61  * into buffer.
62  *
63  * @param[in] iii Interface name
64  * @param[in] id ID to process
65  * @param[in] type Make or update
66  * @return void
67  */
68 void lin_process_uncd_frame(l_ifc_handle iii,
69  l_u8 id,
70  l_u8 type);
71 
72 /*
73  * @brief This function returns the index of a frame in frame list
74  * or 0xFF if not found.
75  *
76  * @param[in] iii Interface name
77  * @param[in] id ID to process
78  * @return l_u8
79  */
80 l_u8 lin_get_frame_index(l_ifc_handle iii,
81  l_u8 id);
82 
83 #endif /* LIN_COMMON_PROTO_H */
84 
85 /******************************************************************************/
86 /* EOF */
87 /******************************************************************************/
l_u8 lin_check_sporadic_update(l_ifc_handle iii, l_u8 frm_id)
void lin_switch_sch_table(l_ifc_handle iii)
unsigned char l_u8
Unsigned 8 bit integer Implements : l_u8_Class.
Definition: lin_types.h:30
void lin_process_uncd_frame(l_ifc_handle iii, l_u8 id, l_u8 type)
l_u8 lin_get_frame_index(l_ifc_handle iii, l_u8 id)