FreeHIL
Loading...
Searching...
No Matches
FH_UART_Configs.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief
4 * <b>File Map:</b>\n
5 * <b>FH_Root</b>, Section <b>FH_Perif</b>, <b>FH_UART</b>, <b>FH_UART_Configs</b>\n
6 * In this file, different configurations of <b>FH_UART</b> could be set
7 *
8 * @attention <b>FH</b> user could left this file intact
9 *
10 *******************************************************************************
11 * SPDX-License-Identifier: Apache-2.0
12 *
13 * Copyright 2026 Vahid Hasirchi
14 *
15 * Licensed under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at
18 *
19 * http://www.apache.org/licenses/LICENSE-2.0
20 *
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
26 ********************************************************************************
27
28 *
29 * <b>For more information refer to FreeHIL.com</b>
30 *
31*/
32/* Define to prevent recursive inclusion -------------------------------------*/
33#ifndef FH_UART_Configs_H
34#define FH_UART_Configs_H
35
36/* Includes ------------------------------------------------------------------*/
39#include "../../../../../FH_Embedded/FH_Setup/FH_RFCommunication/FH_RFCommunication_GlobalVariables.h"
40
41/*!
42 <b>FH_UART01 - FH_UART08</b> shall be defined here to be utilized in different parts of the <b>FH</b> source code\n
43 <b>FH_UART_MaxPeripheralNumber</b> is the maximum number of the <b>FH_UART</b>
44*/
45//#define FH_UART_MaxPeripheralNumber 8
46
47#if FH_UART_MaxPeripheralNumber > 0
48#define FH_UART01
49#endif
50#if FH_UART_MaxPeripheralNumber > 1
51#define FH_UART02
52#endif
53#if FH_UART_MaxPeripheralNumber > 2
54#define FH_UART03
55#endif
56#if FH_UART_MaxPeripheralNumber > 3
57#define FH_UART04
58#endif
59#if FH_UART_MaxPeripheralNumber > 4
60#define FH_UART05
61#endif
62#if FH_UART_MaxPeripheralNumber > 5
63#define FH_UART06
64#endif
65#if FH_UART_MaxPeripheralNumber > 6
66#define FH_UART07
67#endif
68#if FH_UART_MaxPeripheralNumber > 7
69#define FH_UART08
70#endif
71
72#if FH_UART_MaxPeripheralNumber > 0 // If at least one <b>FH_UART</b> is defined
73
74/*!
75 <b>FH_UART_Init_FuncPtrModel</b> Function pointer definition
76*/
78
79/*!
80 <b>FH_UART_Send_FuncPtrModel</b> Function pointer definition
81*/
83
84/*!
85 <b>FH_UART_Receive_FuncPtrModel</b> Function pointer definition
86*/
87typedef FH_ErrorInfo (*FH_UART_Receive_FuncPtrModel) (FH_RFCommunication_Message* fh_RFCommunication_Message, uint8_t* FH_UART_DataSize, uint8_t* FH_UART_Data);
88
89/*!
90 <b>FH_UART_ReceiveW_FuncPtrModel</b> Function pointer definition
91*/
92typedef FH_ErrorInfo (*FH_UART_ReceiveW_FuncPtrModel) (FH_RFCommunication_Message* fh_RFCommunication_Message, uint8_t* FH_UART_DataSize, uint8_t* FH_UART_Data);
93
94/*!
95 <b>FH_UART_ResetRB_FuncPtrModel</b> Function pointer definition
96*/
98
99/*!
100 <b>FH_UART_SSD8_FuncPtrModel</b> Function pointer definition
101*/
103
104/*!
105 <b>FH_UART_SSD16_FuncPtrModel</b> Function pointer definition
106*/
108
109/*!
110 <b>FH_UART_SSD32_FuncPtrModel</b> Function pointer definition
111*/
113
114/*!
115 <b>FH_UART_GSD8_FuncPtrModel</b> Function pointer definition
116*/
117typedef FH_ErrorInfo (*FH_UART_GSD8_FuncPtrModel) (FH_RFCommunication_Message* fh_RFCommunication_Message, uint8_t* FH_UART_DataLength, uint8_t* FH_UART_FH_UART_Data);
118
119/*!
120 <b>FH_UART_GSD16_FuncPtrModel</b> Function pointer definition
121*/
122typedef FH_ErrorInfo (*FH_UART_GSD16_FuncPtrModel) (FH_RFCommunication_Message* fh_RFCommunication_Message, uint8_t* FH_UART_DataLength, uint8_t* FH_UART_FH_UART_Data);
123
124/*!
125 <b>FH_UART_GSD32_FuncPtrModel</b> Function pointer definition
126*/
127typedef FH_ErrorInfo (*FH_UART_GSD32_FuncPtrModel) (FH_RFCommunication_Message* fh_RFCommunication_Message, uint8_t* FH_UART_DataLength, uint8_t* FH_UART_FH_UART_Data);
128
129/*!
130 Different commands for <b>UART</b> Function
131*/
146
147/*!
148 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>Init</b> command of <b>UART</b> Function, are defined here
149*/
150#define FH_UART_MinCommandSize_Init 1
151
152/*!
153 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>Send</b> command of <b>UART</b> Function, are defined here
154*/
155#define FH_UART_MinCommandSize_Send 3
156
157/*!
158 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>Receive</b> command of <b>UART</b> Function, are defined here
159*/
160#define FH_UART_MinCommandSize_Receive 1
161
162/*!
163 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>ReceiveW</b> command of <b>UART</b> Function, are defined here
164*/
165#define FH_UART_MinCommandSize_ReceiveW 6
166
167/*!
168 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>ResetRB</b> command of <b>UART</b> Function, are defined here
169*/
170#define FH_UART_MinCommandSize_ResetRB 1
171
172/*!
173 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>SSD8</b> command of <b>UART</b> Function, are defined here
174*/
175#define FH_UART_MinCommandSize_SSD8 3
176
177/*!
178 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>SSD16</b> command of <b>UART</b> Function, are defined here
179*/
180#define FH_UART_MinCommandSize_SSD16 4
181
182/*!
183 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>SSD32</b> command of <b>UART</b> Function, are defined here
184*/
185#define FH_UART_MinCommandSize_SSD32 6
186
187/*!
188 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>GSD8</b> command of <b>UART</b> Function, are defined here
189*/
190#define FH_UART_MinCommandSize_GSD8 1
191
192/*!
193 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>GSD16</b> command of <b>UART</b> Function, are defined here
194*/
195#define FH_UART_MinCommandSize_GSD16 1
196
197/*!
198 Minimum size of the <b>Data</b> part in the message frame (<b>FH_RFCommunication_Message</b>) for the <b>GSD32</b> command of <b>UART</b> Function, are defined here
199*/
200#define FH_UART_MinCommandSize_GSD32 1
201
202/*!
203 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the Init command of <b>UART</b> Function, are defined here
204*/
209
210/*!
211 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the Send command of <b>UART</b> Function, are defined here
212*/
219
220/*!
221 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the Receive command of <b>UART</b> Function, are defined here
222*/
227
228/*!
229 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the ReceiveW command of <b>UART</b> Function, are defined here
230*/
237
238/*!
239 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the ResetRB command of <b>UART</b> Function, are defined here
240*/
245
246/*!
247 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the SSD8 command of <b>UART</b> Function, are defined here
248*/
255
256/*!
257 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the SSD16 command of <b>UART</b> Function, are defined here
258*/
265
266/*!
267 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the SSD32 command of <b>UART</b> Function, are defined here
268*/
275
276/*!
277 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the GSD8 command of <b>UART</b> Function, are defined here
278*/
283
284/*!
285 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the GSD16 command of <b>UART</b> Function, are defined here
286*/
291
292/*!
293 Different elements of the Data part in the message frame (<b>FH_RFCommunication_Message</b>) for the GSD32 command of <b>UART</b> Function, are defined here
294*/
299
300#endif
301
302#endif