| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Serial_ISF_UART1.h
Go to the documentation of this file.
1 /* ###################################################################
2 ** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
3 ** Filename : Serial_ISF_UART1.h
4 ** Project : ISF_K64F_CW_PROJ
5 ** Processor : MK64FN1M0VLL12
6 ** Component : Serial_LDD
7 ** Version : Component 01.187, Driver 01.12, CPU db: 3.00.000
8 ** Compiler : GNU C Compiler
9 ** Date/Time : 2015-03-03, 11:01, # CodeGen: 0
10 ** Abstract :
11 ** This component "Serial_LDD" implements an asynchronous serial
12 ** communication. The component supports different settings of
13 ** parity, word width, stop-bit and communication speed,
14 ** user can select interrupt or polling handler.
15 ** Communication speed can be changed also in runtime.
16 ** The component requires one on-chip asynchronous serial communication channel.
17 ** Settings :
18 ** Component name : Serial_ISF_UART1
19 ** Device : UART0
20 ** Interrupt service/event : Enabled
21 ** Interrupt RxD : INT_UART0_RX_TX
22 ** Interrupt RxD priority : medium priority
23 ** Interrupt TxD : INT_UART0_RX_TX
24 ** Interrupt TxD priority : medium priority
25 ** Interrupt Error : INT_UART0_ERR
26 ** Interrupt Error priority : medium priority
27 ** Settings :
28 ** Data width : 8 bits
29 ** Parity : None
30 ** Stop bits : 1
31 ** Loop mode : Normal
32 ** Baud rate : 115200 baud
33 ** Wakeup condition : Idle line wakeup
34 ** Stop in wait mode : no
35 ** Idle line mode : Starts after start bit
36 ** Transmitter output : Not inverted
37 ** Receiver input : Not inverted
38 ** Break generation length : 10/11 bits
39 ** Receiver : Enabled
40 ** RxD : PTB16/SPI1_SOUT/UART0_RX/FTM_CLKIN0/FB_AD17/EWM_IN
41 ** RxD pin signal :
42 ** Transmitter : Enabled
43 ** TxD : PTB17/SPI1_SIN/UART0_TX/FTM_CLKIN1/FB_AD16/EWM_OUT_b
44 ** TxD pin signal :
45 ** Flow control : Hardware (RTS/CTS)
46 ** CTS : Disabled
47 ** RTS : Disabled
48 ** Initialization :
49 ** Enabled in init. code : yes
50 ** Auto initialization : no
51 ** Event mask :
52 ** OnBlockSent : Enabled
53 ** OnBlockReceived : Enabled
54 ** OnTxComplete : Disabled
55 ** OnError : Disabled
56 ** OnBreak : Disabled
57 ** CPU clock/configuration selection :
58 ** Clock configuration 0 : This component enabled
59 ** Clock configuration 1 : This component disabled
60 ** Clock configuration 2 : This component disabled
61 ** Clock configuration 3 : This component disabled
62 ** Clock configuration 4 : This component disabled
63 ** Clock configuration 5 : This component disabled
64 ** Clock configuration 6 : This component disabled
65 ** Clock configuration 7 : This component disabled
66 ** Contents :
67 ** Init - LDD_TDeviceData* Serial_ISF_UART1_Init(LDD_TUserData *UserDataPtr);
68 ** SendBlock - LDD_TError Serial_ISF_UART1_SendBlock(LDD_TDeviceData *DeviceDataPtr,...
69 ** ReceiveBlock - LDD_TError Serial_ISF_UART1_ReceiveBlock(LDD_TDeviceData *DeviceDataPtr,...
70 **
71 ** Copyright : 1997 - 2014 Freescale Semiconductor, Inc.
72 ** All Rights Reserved.
73 **
74 ** Redistribution and use in source and binary forms, with or without modification,
75 ** are permitted provided that the following conditions are met:
76 **
77 ** o Redistributions of source code must retain the above copyright notice, this list
78 ** of conditions and the following disclaimer.
79 **
80 ** o Redistributions in binary form must reproduce the above copyright notice, this
81 ** list of conditions and the following disclaimer in the documentation and/or
82 ** other materials provided with the distribution.
83 **
84 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
85 ** contributors may be used to endorse or promote products derived from this
86 ** software without specific prior written permission.
87 **
88 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
89 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
90 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
91 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
92 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
93 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
94 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
95 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
96 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
97 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
98 **
99 ** http: www.freescale.com
100 ** mail: support@freescale.com
101 ** ###################################################################*/
102 /*!
103 ** @file Serial_ISF_UART1.h
104 ** @version 01.12
105 ** @brief
106 ** This component "Serial_LDD" implements an asynchronous serial
107 ** communication. The component supports different settings of
108 ** parity, word width, stop-bit and communication speed,
109 ** user can select interrupt or polling handler.
110 ** Communication speed can be changed also in runtime.
111 ** The component requires one on-chip asynchronous serial communication channel.
112 */
113 /*!
114 ** @addtogroup Serial_ISF_UART1_module Serial_ISF_UART1 module documentation
115 ** @{
116 */
117
118 #ifndef __Serial_ISF_UART1_H
119 #define __Serial_ISF_UART1_H
120
121 /* MODULE Serial_ISF_UART1. */
122
123
124 #include "Cpu.h"
125
126 #ifdef __cplusplus
127 extern "C" {
128 #endif
129
130
131 /*! Peripheral base address of a device allocated by the component. This constant can be used directly in PDD macros. */
132 #define Serial_ISF_UART1_PRPH_BASE_ADDRESS 0x4006A000U
133
134 /* Methods configuration constants - generated for all enabled component's methods */
135 #define Serial_ISF_UART1_Init_METHOD_ENABLED /*!< Init method of the component Serial_ISF_UART1 is enabled (generated) */
136 #define Serial_ISF_UART1_SendBlock_METHOD_ENABLED /*!< SendBlock method of the component Serial_ISF_UART1 is enabled (generated) */
137 #define Serial_ISF_UART1_ReceiveBlock_METHOD_ENABLED /*!< ReceiveBlock method of the component Serial_ISF_UART1 is enabled (generated) */
138
139 /* Events configuration constants - generated for all enabled component's events */
140 #define Serial_ISF_UART1_OnBlockReceived_EVENT_ENABLED /*!< OnBlockReceived event of the component Serial_ISF_UART1 is enabled (generated) */
141 #define Serial_ISF_UART1_OnBlockSent_EVENT_ENABLED /*!< OnBlockSent event of the component Serial_ISF_UART1 is enabled (generated) */
142
143 #define ENABLED_TX_INT 0x01U /*!< TX interrupt enabled */
144 #define BREAK_DETECTED 0x02U /*!< Break detected */
145 #define TX_COMPLETED 0x04U /*!< Transmission completed */
146 #define ENABLE_TX_COMPLETE 0x10U /*!< Enable/Disable of TX complete detection. Used in the polling mode only */
147
148 /*! Device data structure type */
149 typedef struct {
150 uint16_t SerFlag; /*!< Flags for serial communication */
151 uint16_t InpRecvDataNum; /*!< The counter of received characters */
152 uint8_t *InpDataPtr; /*!< The buffer pointer for received characters */
153 uint16_t InpDataNumReq; /*!< The counter of characters to receive by ReceiveBlock() */
154 uint16_t OutSentDataNum; /*!< The counter of sent characters */
155 uint8_t *OutDataPtr; /*!< The buffer pointer for data to be transmitted */
156 uint16_t OutDataNumReq; /*!< The counter of characters to be send by SendBlock() */
157 LDD_RTOS_TISRVectorSettings SavedISRSettings; /* {MQXLite RTOS Adapter} Saved settings of allocated interrupt vector */
158 LDD_TUserData *UserDataPtr; /*!< Pointer to user data */
159 } Serial_ISF_UART1_TDeviceData;
160
161 typedef Serial_ISF_UART1_TDeviceData *Serial_ISF_UART1_TDeviceDataPtr ; /*!< Pointer to the device data structure. */
162
163 /*
164 ** ===================================================================
165 ** Method : Serial_ISF_UART1_Init (component Serial_LDD)
166 */
167 /*!
168 ** @brief
169 ** Initializes the device. Allocates memory for the device data
170 ** structure, allocates interrupt vectors and sets interrupt
171 ** priority, sets pin routing, sets timing, etc. If the "Enable
172 ** in init. code" is set to "yes" value then the device is also
173 ** enabled(see the description of the Enable() method). In this
174 ** case the Enable() method is not necessary and needn't to be
175 ** generated.
176 ** @param
177 ** UserDataPtr - Pointer to the user or
178 ** RTOS specific data. This pointer will be
179 ** passed as an event or callback parameter.
180 ** @return
181 ** - Device data structure pointer.
182 */
183 /* ===================================================================*/
184 LDD_TDeviceData* Serial_ISF_UART1_Init(LDD_TUserData *UserDataPtr);
185
186 /*
187 ** ===================================================================
188 ** Method : Serial_ISF_UART1_ReceiveBlock (component Serial_LDD)
189 */
190 /*!
191 ** @brief
192 ** Specifies the number of data to receive. The method returns
193 ** ERR_BUSY until the specified number of characters is
194 ** received. Method [CancelBlockReception] can be used to
195 ** cancel a running receive operation. If a receive operation
196 ** is not in progress (the method was not called or a previous
197 ** operation has already finished) all received characters will
198 ** be lost without any notification. To prevent the loss of
199 ** data call the method immediately after the last receive
200 ** operation has finished (e.g. from the [OnBlockReceived]
201 ** event). This method finishes immediately after calling it -
202 ** it doesn't wait the end of data reception. Use event
203 ** [OnBlockReceived] to check the end of data reception.
204 ** @param
205 ** DeviceDataPtr - Device data structure
206 ** pointer returned by [Init] method.
207 ** @param
208 ** BufferPtr - Pointer to a buffer where
209 ** received characters will be stored. In case
210 ** of 8bit character width each character in
211 ** buffer occupies 1 byte. In case of 9 and
212 ** more bit long character width each
213 ** character in buffer occupies 2 bytes.
214 ** @param
215 ** Size - Number of characters to receive
216 ** @return
217 ** - Error code, possible codes:
218 ** ERR_OK - OK
219 ** ERR_SPEED - The component does not work in
220 ** the active clock configuration.
221 ** ERR_PARAM_SIZE - Parameter Size is out of
222 ** expected range.
223 ** ERR_DISABLED - The component or device is
224 ** disabled.
225 ** ERR_BUSY - The previous receive request is
226 ** pending.
227 */
228 /* ===================================================================*/
229 LDD_TError Serial_ISF_UART1_ReceiveBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size);
230
231 /*
232 ** ===================================================================
233 ** Method : Serial_ISF_UART1_SendBlock (component Serial_LDD)
234 */
235 /*!
236 ** @brief
237 ** Sends a block of characters. The method returns ERR_BUSY
238 ** when the previous block transmission is not completed.
239 ** Method [CancelBlockTransmission] can be used to cancel a
240 ** transmit operation. This method is available only if the
241 ** transmitter property is enabled. This method finishes
242 ** immediately after calling it - it doesn't wait the end of
243 ** data transmission. Use event [OnBlockSent] to check the end
244 ** of data transmission.
245 ** @param
246 ** DeviceDataPtr - Device data structure
247 ** pointer returned by [Init] method.
248 ** @param
249 ** BufferPtr - Pointer to a buffer from where
250 ** data will be sent. In case of 8bit
251 ** character width each character in buffer
252 ** occupies 1 byte. In case of 9 and more bit
253 ** long character width each character in
254 ** buffer occupies 2 bytes.
255 ** @param
256 ** Size - Number of characters in the buffer.
257 ** @return
258 ** - Error code, possible codes:
259 ** ERR_OK - OK
260 ** ERR_SPEED - The component does not work in
261 ** the active clock configuration.
262 ** ERR_PARAM_SIZE - Parameter Size is out of
263 ** expected range.
264 ** ERR_DISABLED - The component or device is
265 ** disabled.
266 ** ERR_BUSY - The previous transmit request is
267 ** pending.
268 */
269 /* ===================================================================*/
270 LDD_TError Serial_ISF_UART1_SendBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size);
271
272 /*
273 ** ===================================================================
274 ** Method : Serial_ISF_UART1_Interrupt (component Serial_LDD)
275 **
276 ** Description :
277 ** The ISR function handling the device receive/transmit
278 ** interrupt. Calls InterruptTX/InterruptRX methods.
279 ** This method is internal. It is used by Processor Expert only.
280 ** ===================================================================
281 */
282 /* {MQXLite RTOS Adapter} ISR function prototype */
283 void Serial_ISF_UART1_Interrupt(LDD_RTOS_TISRParameter _isrParameter);
284
285 /* END Serial_ISF_UART1. */
286
287 #ifdef __cplusplus
288 } /* extern "C" */
289 #endif
290
291 #endif
292 /* ifndef __Serial_ISF_UART1_H */
293 /*!
294 ** @}
295 */
296 /*
297 ** ###################################################################
298 **
299 ** This file was created by Processor Expert 10.3 [05.09]
300 ** for the Freescale Kinetis series of microcontrollers.
301 **
302 ** ###################################################################
303 */
Serial_ISF_UART1_TDeviceData::InpDataPtr
uint8_t * InpDataPtr
Definition: Serial_ISF_UART1.h:152
Serial_ISF_UART1_TDeviceData::OutSentDataNum
uint16_t OutSentDataNum
Definition: Serial_ISF_UART1.h:154
Serial_ISF_UART1_SendBlock
LDD_TError Serial_ISF_UART1_SendBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size)
Sends a block of characters. The method returns ERR_BUSY when the previous block transmission is not ...
Definition: Serial_ISF_UART1.c:338
Serial_ISF_UART1_TDeviceData::OutDataNumReq
uint16_t OutDataNumReq
Definition: Serial_ISF_UART1.h:156
Serial_ISF_UART1_Init
LDD_TDeviceData * Serial_ISF_UART1_Init(LDD_TUserData *UserDataPtr)
Initializes the device. Allocates memory for the device data structure, allocates interrupt vectors a...
Definition: Serial_ISF_UART1.c:160
Serial_ISF_UART1_TDeviceDataPtr
Serial_ISF_UART1_TDeviceData * Serial_ISF_UART1_TDeviceDataPtr
Definition: Serial_ISF_UART1.h:161
Serial_ISF_UART1_ReceiveBlock
LDD_TError Serial_ISF_UART1_ReceiveBlock(LDD_TDeviceData *DeviceDataPtr, LDD_TData *BufferPtr, uint16_t Size)
Specifies the number of data to receive. The method returns ERR_BUSY until the specified number of ch...
Definition: Serial_ISF_UART1.c:279
Serial_ISF_UART1_TDeviceData::SavedISRSettings
LDD_RTOS_TISRVectorSettings SavedISRSettings
Definition: Serial_ISF_UART1.h:157
Serial_ISF_UART1_TDeviceData::OutDataPtr
uint8_t * OutDataPtr
Definition: Serial_ISF_UART1.h:155
Serial_ISF_UART1_TDeviceData::SerFlag
uint16_t SerFlag
Definition: Serial_ISF_UART1.h:150
Serial_ISF_UART1_TDeviceData
Definition: Serial_ISF_UART1.h:149
Serial_ISF_UART1_TDeviceData::InpDataNumReq
uint16_t InpDataNumReq
Definition: Serial_ISF_UART1.h:153
Serial_ISF_UART1_Interrupt
void Serial_ISF_UART1_Interrupt(LDD_RTOS_TISRParameter _isrParameter)
Definition: Serial_ISF_UART1.c:421
Serial_ISF_UART1_TDeviceData::InpRecvDataNum
uint16_t InpRecvDataNum
Definition: Serial_ISF_UART1.h:151
Serial_ISF_UART1_TDeviceData::UserDataPtr
LDD_TUserData * UserDataPtr
Definition: Serial_ISF_UART1.h:158
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.