libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
usart_common_v2.h
Go to the documentation of this file.
1/** @addtogroup usart_defines
2
3 @author @htmlonly &copy; @endhtmlonly 2016 Cem Basoglu <cem.basoglu@web.de>
4
5 */
6
7/*
8 * This file is part of the libopencm3 project.
9 *
10 * Copyright (C) 2016 Cem Basoglu <cem.basoglu@web.de>
11 *
12 * This library is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26#pragma once
27
28/** @defgroup usart_registers USART Registers
29@ingroup usart_defines
30@{*/
31
32/** Control register 1 (USARTx_CR1) */
33#define USART_CR1(usart_base) MMIO32((usart_base) + 0x00)
34#define USART1_CR1 USART_CR1(USART1_BASE)
35#define USART2_CR1 USART_CR1(USART2_BASE)
36#define USART3_CR1 USART_CR1(USART3_BASE)
37#if defined(USART4_BASE)
38#define USART4_CR1 USART_CR1(USART4_BASE)
39#endif
40#if defined(UART4_BASE)
41#define UART4_CR1 USART_CR1(UART4_BASE)
42#endif
43#if defined(UART5_BASE)
44#define UART5_CR1 USART_CR1(UART5_BASE)
45#endif
46
47/** Control register 2 (USARTx_CR2) */
48#define USART_CR2(usart_base) MMIO32((usart_base) + 0x04)
49#define USART1_CR2 USART_CR2(USART1_BASE)
50#define USART2_CR2 USART_CR2(USART2_BASE)
51#define USART3_CR2 USART_CR2(USART3_BASE)
52#if defined(USART4_BASE)
53#define USART4_CR2 USART_CR2(USART4_BASE)
54#endif
55#if defined(UART4_BASE)
56#define UART4_CR2 USART_CR2(UART4_BASE)
57#endif
58#if defined(UART5_BASE)
59#define UART5_CR2 USART_CR2(UART5_BASE)
60#endif
61
62/** Control register 3 (USARTx_CR3) */
63#define USART_CR3(usart_base) MMIO32((usart_base) + 0x08)
64#define USART1_CR3 USART_CR3(USART1_BASE)
65#define USART2_CR3 USART_CR3(USART2_BASE)
66#define USART3_CR3 USART_CR3(USART3_BASE)
67#if defined(USART4_BASE)
68#define USART4_CR3 USART_CR3(USART4_BASE)
69#endif
70#if defined(UART4_BASE)
71#define UART4_CR3 USART_CR3(UART4_BASE)
72#endif
73#if defined(UART5_BASE)
74#define UART5_CR3 USART_CR3(UART5_BASE)
75#endif
76
77/** Baud rate register (USARTx_BRR) */
78#define USART_BRR(usart_base) MMIO32((usart_base) + 0x0C)
79#define USART1_BRR USART_BRR(USART1_BASE)
80#define USART2_BRR USART_BRR(USART2_BASE)
81#define USART3_BRR USART_BRR(USART3_BASE)
82#if defined(USART4_BASE)
83#define USART4_BRR USART_BRR(USART4_BASE)
84#endif
85#if defined(UART4_BASE)
86#define UART4_BRR USART_BRR(UART4_BASE)
87#endif
88#if defined(UART5_BASE)
89#define UART5_BRR USART_BRR(UART5_BASE)
90#endif
91
92/** Guard time and prescaler register (USARTx_GTPR) */
93#define USART_GTPR(usart_base) MMIO32((usart_base) + 0x10)
94#define USART1_GTPR USART_GTPR(USART1_BASE)
95#define USART2_GTPR USART_GTPR(USART2_BASE)
96#define USART3_GTPR USART_GTPR(USART3_BASE)
97#if defined(USART4_BASE)
98#define USART4_GTPR USART_GTPR(USART4_BASE)
99#endif
100#if defined(UART4_BASE)
101#define UART4_GTPR USART_GTPR(UART4_BASE)
102#endif
103#if defined(UART5_BASE)
104#define UART5_GTPR USART_GTPR(UART5_BASE)
105#endif
106
107/** Receiver timeout register (USART_RTOR) */
108#define USART_RTOR(usart_base) MMIO32((usart_base) + 0x14)
109#define USART1_RTOR USART_RTOR(USART1_BASE)
110#define USART2_RTOR USART_RTOR(USART2_BASE)
111#define USART3_RTOR USART_RTOR(USART3_BASE)
112#if defined(USART4_BASE)
113#define USART4_RTOR USART_RTOR(USART4_BASE)
114#endif
115#if defined(UART4_BASE)
116#define UART4_RTOR USART_RTOR(UART4_BASE)
117#endif
118#if defined(UART5_BASE)
119#define UART5_RTOR USART_RTOR(UART5_BASE)
120#endif
121
122/** Request register (USART_RQR) */
123#define USART_RQR(usart_base) MMIO32((usart_base) + 0x18)
124#define USART1_RQR USART_RQR(USART1_BASE)
125#define USART2_RQR USART_RQR(USART2_BASE)
126#define USART3_RQR USART_RQR(USART3_BASE)
127#if defined(USART4_BASE)
128#define USART4_RQR USART_RQR(USART4_BASE)
129#endif
130#if defined(UART4_BASE)
131#define UART4_RQR USART_RQR(UART4_BASE)
132#endif
133#if defined(UART5_BASE)
134#define UART5_RQR USART_RQR(UART5_BASE)
135#endif
136
137/** Interrupt & status register (USART_ISR) */
138#define USART_ISR(usart_base) MMIO32((usart_base) + 0x1C)
139#define USART1_ISR USART_ISR(USART1_BASE)
140#define USART2_ISR USART_ISR(USART2_BASE)
141#define USART3_ISR USART_ISR(USART3_BASE)
142#if defined(USART4_BASE)
143#define USART4_ISR USART_ISR(USART4_BASE)
144#endif
145#if defined(UART4_BASE)
146#define UART4_ISR USART_ISR(UART4_BASE)
147#endif
148#if defined(UART5_BASE)
149#define UART5_ISR USART_ISR(UART5_BASE)
150#endif
151
152/** Interrupt flag clear register (USART_ICR) */
153#define USART_ICR(usart_base) MMIO32((usart_base) + 0x20)
154#define USART1_ICR USART_ICR(USART1_BASE)
155#define USART2_ICR USART_ICR(USART2_BASE)
156#define USART3_ICR USART_ICR(USART3_BASE)
157#if defined(USART4_BASE)
158#define USART4_ICR USART_ICR(USART4_BASE)
159#endif
160#if defined(UART4_BASE)
161#define UART4_ICR USART_ICR(UART4_BASE)
162#endif
163#if defined(UART5_BASE)
164#define UART5_ICR USART_ICR(UART5_BASE)
165#endif
166
167/** Receive data register (USART_RDR) */
168#define USART_RDR(usart_base) MMIO32((usart_base) + 0x24)
169#define USART1_RDR USART_RDR(USART1_BASE)
170#define USART2_RDR USART_RDR(USART2_BASE)
171#define USART3_RDR USART_RDR(USART3_BASE)
172#if defined(USART4_BASE)
173#define USART4_RDR USART_RDR(USART4_BASE)
174#endif
175#if defined(UART4_BASE)
176#define UART4_RDR USART_RDR(UART4_BASE)
177#endif
178#if defined(UART5_BASE)
179#define UART5_RDR USART_RDR(UART5_BASE)
180#endif
181
182/** Transmit data register (USART_TDR) */
183#define USART_TDR(usart_base) MMIO32((usart_base) + 0x28)
184#define USART1_TDR USART_TDR(USART1_BASE)
185#define USART2_TDR USART_TDR(USART2_BASE)
186#define USART3_TDR USART_TDR(USART3_BASE)
187#if defined(USART4_BASE)
188#define USART4_TDR USART_TDR(USART4_BASE)
189#endif
190#if defined(UART4_BASE)
191#define UART4_TDR USART_TDR(UART4_BASE)
192#endif
193#if defined(UART5_BASE)
194#define UART5_TDR USART_TDR(UART5_BASE)
195#endif
196
197/**@}*/
198
199/** @defgroup usart_convenience_flags U(S)ART convenience Flags
200 * @ingroup usart_defines
201 * We define the "common" lower flag bits using a standard name,
202 * allowing them to be used regardless of which usart peripheral
203 * version you have.
204 * @{
205 */
206#define USART_FLAG_PE USART_ISR_PE
207#define USART_FLAG_FE USART_ISR_FE
208#define USART_FLAG_NF USART_ISR_NF
209#define USART_FLAG_ORE USART_ISR_ORE
210#define USART_FLAG_IDLE USART_ISR_IDLE
211#define USART_FLAG_RXNE USART_ISR_RXNE
212#define USART_FLAG_TC USART_ISR_TC
213#define USART_FLAG_TXE USART_ISR_TXE
214/**@}*/
215
216
217/*****************************************************************************/
218/* Register values */
219/*****************************************************************************/
220
221/** @defgroup usart_cr1_values USART_CR1 Values
222@ingroup usart_defines
223@{*/
224
225/** M1: Wordlength. @sa M0 */
226#define USART_CR1_M1 (1 << 28) /* F07x */
227
228/** EOBIE: End of Block interrupt enable */
229#define USART_CR1_EOBIE (1 << 27)
230
231/** RTOIE: Receiver timeout interrupt enable */
232#define USART_CR1_RTOIE (1 << 26)
233
234#define USART_CR1_DEAT_SHIFT 21
235#define USART_CR1_DEAT (0x1F << USART_CR1_DEAT_SHIFT)
236/** DEAT[4:0]: Driver Enable assertion time */
237#define USART_CR1_DEAT_VAL(x) ((x) << USART_CR1_DEAT_SHIFT)
238
239#define USART_CR1_DEDT_SHIFT 16
240#define USART_CR1_DEDT (0x1F << USART_CR1_DEDT_SHIFT)
241/** DEDT[4:0]: Driver Enable deassertion time */
242#define USART_CR1_DEDT_VAL(x) ((x) << USART_CR1_DEDT_SHIFT)
243
244/** OVER8: Oversampling mode */
245#define USART_CR1_OVER8 (1 << 15)
246
247/** CMIE: Character match interrupt enable */
248#define USART_CR1_CMIE (1 << 14)
249
250/** MME: Mute mode enable */
251#define USART_CR1_MME (1 << 13)
252
253/** M0: Word length */
254#define USART_CR1_M0 (1 << 12)
255/** @deprecated alias for M0.*/
256#define USART_CR1_M USART_CR1_M0
257
258/** WAKE: Receiver wakeup method */
259#define USART_CR1_WAKE (1 << 11)
260
261/** PCE: Parity control enable */
262#define USART_CR1_PCE (1 << 10)
263
264/** PS: Parity selection */
265#define USART_CR1_PS (1 << 9)
266
267/** PEIE: PE interrupt enable */
268#define USART_CR1_PEIE (1 << 8)
269
270/** TXEIE: Interrupt enable */
271#define USART_CR1_TXEIE (1 << 7)
272
273/** TCIE: Transmission complete interrupt enable */
274#define USART_CR1_TCIE (1 << 6)
275
276/** RXNEIE: RXNE interrupt enable */
277#define USART_CR1_RXNEIE (1 << 5)
278
279/** IDLEIE: IDLE interrupt enable */
280#define USART_CR1_IDLEIE (1 << 4)
281
282/** TE: Transmitter enable */
283#define USART_CR1_TE (1 << 3)
284
285/** RE: Receiver enable */
286#define USART_CR1_RE (1 << 2)
287
288/** UESM: USART enable in Stop mode */
289#define USART_CR1_UESM (1 << 1)
290
291/** UE: USART enable */
292#define USART_CR1_UE (1 << 0)
293/**@}*/
294
295/*------------------------------------------------*/
296/** @defgroup usart_cr2_values USART_CR2 Values
297@ingroup usart_defines
298@{*/
299
300/** ADD[7:0]: Address of the USART node. */
301#define USART_CR2_ADD_SHIFT 24
302#define USART_CR2_ADD (0xFF << USART_CR2_ADD_SHIFT)
303#define USART_CR2_ADD_VAL(x) ((x) << USART_CR2_ADD_SHIFT)
304
305#define USART_CR2_ABRMOD_MASK 3
306#define USART_CR2_ABRMOD_SHIFT 21
307/** ABRMOD[1:0]: Auto baud rate mode
308 * @defgroup usart_cr2_abrmod Auto baud rate mode
309 * @ingroup usart_defines
310 * @{
311 */
312#define USART_CR2_ABRMOD_STARTBIT (0x0 << USART_CR2_ABRMOD_SHIFT)
313#define USART_CR2_ABRMOD_FALL_EDGE (0x1 << USART_CR2_ABRMOD_SHIFT)
314#define USART_CR2_ABRMOD_FRAME_0x7F (0x2 << USART_CR2_ABRMOD_SHIFT)
315#define USART_CR2_ABRMOD_FRAME_0x55 (0x3 << USART_CR2_ABRMOD_SHIFT)
316/**@}*/
317
318/** RTOEN: Receiver timeout enable */
319#define USART_CR2_RTOEN (1 << 23)
320
321/** ABREN: Auto baud rate enable */
322#define USART_CR2_ABREN (1 << 20)
323
324/** MSBFIRST: Most significant bit first */
325#define USART_CR2_MSBFIRST (1 << 19)
326
327/** DATAINV: Binary data inversion */
328#define USART_CR2_DATAINV (1 << 18)
329
330/** TXINV: TX pin active level inversion */
331#define USART_CR2_TXINV (1 << 17)
332
333/** RXINV: RX pin active level inversion */
334#define USART_CR2_RXINV (1 << 16)
335
336/** SWAP: Swap TX/RX pins */
337#define USART_CR2_SWAP (1 << 15)
338
339/** LINEN: LIN mode enable */
340#define USART_CR2_LINEN (1 << 14)
341
342/** CLKEN: Clock enable */
343#define USART_CR2_CLKEN (1 << 11)
344
345/** CPOL: Clock polarity */
346#define USART_CR2_CPOL (1 << 10)
347
348/** CPHA: Clock phase */
349#define USART_CR2_CPHA (1 << 9)
350
351/** LBCL: Last bit clock pulse */
352#define USART_CR2_LBCL (1 << 8)
353
354/** LBDIE: LIN break detection interrupt enable */
355#define USART_CR2_LBDIE (1 << 6)
356
357/** LBDL: LIN break detection length */
358#define USART_CR2_LBDL (1 << 5)
359
360/** ADDM7:7-bit Address Detection/4-bit Address Detection */
361#define USART_CR2_ADDM7 (1 << 4)
362
363/**@}*/
364
365/*------------------------------------------------*/
366/** @defgroup usart_cr3_values USART_CR3 Values
367@ingroup usart_defines
368@{*/
369/** WUFIE: Wakeup from Stop mode interrupt enable */
370#define USART_CR3_WUFIE (1 << 22)
371
372/** WUS[1:0]: Wakeup from Stop mode interrupt flag selection */
373#define USART_CR3_WUS_ADDRMATCH (0x0 << 20)
374#define USART_CR3_WUS_START_BIT (0x2 << 20)
375#define USART_CR3_WUS_RXNE (0x3 << 20)
376
377#define USART_CR3_SCARCNT_SHIFT 17
378#define USART_CR3_SCARCNT_MASK 0x7
379/** SCARCNT[2:0]: Smartcard auto retry count */
380#define USART_CR3_SCARCNT_DISABLE (0 << USART_CR3_SCARCNT_SHIFT)
381#define USART_CR3_SCARCNT_VAL(x) ((x) << USART_CR3_SCARCNT_SHIFT)
382
383/** DEP: Driver enable polarity selection */
384#define USART_CR3_DEP (1 << 15)
385
386/** DEM: Driver enable mode */
387#define USART_CR3_DEM (1 << 14)
388
389/** DDRE: DMA Disable on Reception Error */
390#define USART_CR3_DDRE (1 << 13)
391
392/** OVRDIS: Overrun Disable */
393#define USART_CR3_OVRDIS (1 << 12)
394
395/** ONEBIT: One sample bit method enable */
396#define USART_CR3_ONEBIT (1 << 11)
397
398/** CTSIE: CTS interrupt enable. Not on UARTs */
399#define USART_CR3_CTSIE (1 << 10)
400
401/** CTSE: CTS enable. Not on UARTS */
402#define USART_CR3_CTSE (1 << 9)
403
404/** RTSE: RTS enable. Not on UARTs */
405#define USART_CR3_RTSE (1 << 8)
406
407/** DMAT: DMA enable transmitter. Not on UARTs */
408#define USART_CR3_DMAT (1 << 7)
409
410/** DMAR: DMA enable receiver. Not on UARTS */
411#define USART_CR3_DMAR (1 << 6)
412
413/** SCEN: Smartcard mode enable. Not on UARTs */
414#define USART_CR3_SCEN (1 << 5)
415
416/** NACK: Smartcard NACK enable. Not UARTs */
417#define USART_CR3_NACK (1 << 4)
418
419/** HDSEL: Half-duplex selection */
420#define USART_CR3_HDSEL (1 << 3)
421
422/** IRLP: IrDA low-power */
423#define USART_CR3_IRLP (1 << 2)
424
425/** IREN: IrDA mode enable */
426#define USART_CR3_IREN (1 << 1)
427
428/** EIE: Error interrupt enable */
429#define USART_CR3_EIE (1 << 0)
430
431/**@}*/
432
433/** @defgroup usart_gtpr_values USART_GTPR Values
434 * @ingroup usart_defines
435 * @{
436 */
437#define USART_GTPR_GT_SHIFT 8
438#define USART_GTPR_GT (0xFF << USART_GTPR_GT_SHIFT)
439#define USART_GTPR_GT_VAL(x) ((x) << USART_GTPR_GT_SHIFT)
440
441#define USART_GTPR_PSC_SHIFT 0
442#define USART_GTPR_PSC (0xFF << USART_GTPR_PSC_SHIFT)
443#define USART_GTPR_PSC_VAL(x) ((x) << USART_GTPR_PSC_SHIFT)
444/**@}*/
445
446/* ------------------------------------------------------ */
447/** @defgroup usart_rtor_values USART_RTOR Values
448 * @ingroup usart_defines
449 * @{
450 */
451/** BLEN[7:0]: Block Length */
452#define USART_RTOR_BLEN_SHIFT 24
453#define USART_RTOR_BLEN_MASK (0xFF << USART_RTOR_BLEN_SHIFT)
454#define USART_RTOR_BLEN_VAL(x) ((x) << USART_RTOR_BLEN_SHIFT)
455
456/** RTO[23:0]: Receiver timeout value */
457#define USART_RTOR_RTO_SHIFT 0
458#define USART_RTOR_RTO_MASK (0xFFFFF << USART_RTOR_RTO_SHIFT)
459#define USART_RTOR_RTO_VAL(x) ((x) << USART_RTOR_RTO_SHIFT)
460
461/**@}*/
462
463/* ------------------------------------------------------ */
464/** @defgroup usart_rqr_values USART_RQR Values
465 * @ingroup usart_defines
466 * @{
467 */
468/** TXFRQ: Transmit data flush request */
469#define USART_RQR_TXFRQ (1 << 4)
470
471/** RXFRQ: Receive data flush request */
472#define USART_RQR_RXFRQ (1 << 3)
473
474/** MMRQ: Mute mode request */
475#define USART_RQR_MMRQ (1 << 2)
476
477/** SBKRQ: Send break request */
478#define USART_RQR_SBKRQ (1 << 1)
479
480/** ABRRQ: Auto baud rate request */
481#define USART_RQR_ABRRQ (1 << 0)
482
483/**@}*/
484
485/* ------------------------------------------------------ */
486/** @defgroup usart_isr_values USART_ISR Values
487 * @ingroup usart_defines
488 * @{
489 */
490
491/** REACK: Receive enable acknowledge flag */
492#define USART_ISR_REACK (1 << 22)
493
494/** TEACK: Transmit enable acknowledge flag */
495#define USART_ISR_TEACK (1 << 21)
496
497/** WUF: Wakeup from Stop mode flag */
498#define USART_ISR_WUF (1 << 20)
499
500/** RWU: Receiver wakeup from Mute mode */
501#define USART_ISR_RWU (1 << 19)
502
503/** SBKF: Send break flag */
504#define USART_ISR_SBKF (1 << 18)
505
506/** CMF: Character match flag */
507#define USART_ISR_CMF (1 << 17)
508
509/** BUSY: Busy flag */
510#define USART_ISR_BUSY (1 << 16)
511
512/** ABRF: Auto baud rate flag */
513#define USART_ISR_ABRF (1 << 15)
514
515/** ABRE: Auto baud rate error */
516#define USART_ISR_ABRE (1 << 14)
517
518/** EOBF: End of block flag */
519#define USART_ISR_EOBF (1 << 12)
520
521/** RTOF: Receiver timeout */
522#define USART_ISR_RTOF (1 << 11)
523
524/** CTS: CTS flag */
525#define USART_ISR_CTS (1 << 10)
526
527/** CTSIF: CTS interrupt flag */
528#define USART_ISR_CTSIF (1 << 9)
529
530/** LBDF: LIN break detection flag */
531#define USART_ISR_LBDF (1 << 8)
532
533/** TXE: Transmit data register empty */
534#define USART_ISR_TXE (1 << 7)
535
536/** TC: Transmission complete */
537#define USART_ISR_TC (1 << 6)
538
539/** RXNE: Read data register not empty */
540#define USART_ISR_RXNE (1 << 5)
541
542/** IDLE: Idle line detected */
543#define USART_ISR_IDLE (1 << 4)
544
545/** ORE: Overrun error */
546#define USART_ISR_ORE (1 << 3)
547
548/** NF: Noise detected flag */
549#define USART_ISR_NF (1 << 2)
550
551/** FE: Framing error */
552#define USART_ISR_FE (1 << 1)
553
554/** PE: Parity error */
555#define USART_ISR_PE (1 << 0)
556
557/**@}*/
558
559/* ------------------------------------------------------ */
560/** @defgroup usart_icr_values USART_ICR Values
561 * @ingroup usart_defines
562 * @{
563 */
564
565/** WUCF: Wakeup from Stop mode clear flag */
566#define USART_ICR_WUCF (1 << 20)
567
568/** CMCF: Character match clear flag */
569#define USART_ICR_CMCF (1 << 17)
570
571/** EOBCF: End of timeout clear flag */
572#define USART_ICR_EOBCF (1 << 12)
573
574/** RTOCF: Receiver timeout clear flag */
575#define USART_ICR_RTOCF (1 << 11)
576
577/** CTSCF: CTS clear flag */
578#define USART_ICR_CTSCF (1 << 9)
579
580/** LBDCF: LIN break detection clear flag */
581#define USART_ICR_LBDCF (1 << 8)
582
583/** TCCF: Transmission complete clear flag */
584#define USART_ICR_TCCF (1 << 6)
585
586/** IDLECF: Idle line detected clear flag */
587#define USART_ICR_IDLECF (1 << 4)
588
589/** ORECF: Overrun error clear flag */
590#define USART_ICR_ORECF (1 << 3)
591
592/** NCF: Noise detected clear flag */
593#define USART_ICR_NCF (1 << 2)
594
595/** FECF: Framing error clear flag */
596#define USART_ICR_FECF (1 << 1)
597
598/** PECF: Parity error clear flag */
599#define USART_ICR_PECF (1 << 0)
600
601/**@}*/
602
603/** @defgroup usart_dr_values USART_RDR/TDR Values
604 * @ingroup usart_defines
605 * @{
606 */
607/** RDR[8:0]: Receive data value */
608#define USART_RDR_MASK (0x1FF << 0)
609/** TDR[8:0]: Transmit data value */
610#define USART_TDR_MASK (0x1FF << 0)
611/**@}*/
612
613
614/* --- Function prototypes ------------------------------------------------- */
615
617
618void usart_enable_data_inversion(uint32_t usart);
619void usart_disable_data_inversion(uint32_t usart);
620void usart_enable_tx_inversion(uint32_t usart);
621void usart_disable_tx_inversion(uint32_t usart);
622void usart_enable_rx_inversion(uint32_t usart);
623void usart_disable_rx_inversion(uint32_t usart);
624void usart_enable_halfduplex(uint32_t usart);
625void usart_disable_halfduplex(uint32_t usart);
626
627void usart_set_rx_timeout_value(uint32_t usart, uint32_t value);
628void usart_enable_rx_timeout(uint32_t usart);
629void usart_disable_rx_timeout(uint32_t usart);
630void usart_enable_rx_timeout_interrupt(uint32_t usart);
631void usart_disable_rx_timeout_interrupt(uint32_t usart);
632
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
void usart_enable_data_inversion(uint32_t usart)
USART enable data inversion.
void usart_disable_halfduplex(uint32_t usart)
USART Disable Half-duplex.
void usart_enable_rx_timeout(uint32_t usart)
USART enable receive timeout function.
void usart_set_rx_timeout_value(uint32_t usart, uint32_t value)
USART Set receiver timeout value.
void usart_enable_halfduplex(uint32_t usart)
USART Enable Half-duplex.
void usart_disable_rx_timeout_interrupt(uint32_t usart)
USART disable receive timeout interrupt.
void usart_disable_tx_inversion(uint32_t usart)
USART Disable TX pin active level inversion.
void usart_disable_rx_timeout(uint32_t usart)
USART disable receive timeout function.
void usart_disable_rx_inversion(uint32_t usart)
USART Disable RX pin active level inversion.
void usart_enable_rx_timeout_interrupt(uint32_t usart)
USART enable receive timeout interrupt.
void usart_enable_rx_inversion(uint32_t usart)
USART Enable RX pin active level inversion.
void usart_disable_data_inversion(uint32_t usart)
USART disable data inversion.
void usart_enable_tx_inversion(uint32_t usart)
USART Enable TX pin active level inversion.