MSP430 DriverLib for MSP430FR57xx Devices  2.10.00.09
 All Data Structures Functions Variables Modules Pages
eusci_a_uart.h
1 //*****************************************************************************
2 //
3 // eusci_a_uart.h - Driver for the EUSCI_A_UART Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_EUSCI_A_UART_H__
8 #define __MSP430WARE_EUSCI_A_UART_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_EUSCI_Ax__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include "inc/hw_memmap.h"
26 //*****************************************************************************
27 //
28 // The following values are the sync characters possible.
29 //
30 //*****************************************************************************
31 #define DEFAULT_SYNC 0x00
32 #define EUSCI_A_UART_AUTOMATICBAUDRATE_SYNC 0x55
33 
34 //*****************************************************************************
35 //
36 //! \brief Used in the EUSCI_A_UART_init() function as the param parameter.
37 //
38 //*****************************************************************************
39 typedef struct EUSCI_A_UART_initParam {
40  //! Selects Clock source.
41  //! \n Valid values are:
42  //! - \b EUSCI_A_UART_CLOCKSOURCE_SMCLK
43  //! - \b EUSCI_A_UART_CLOCKSOURCE_ACLK
45  //! Is the value to be written into UCBRx bits
46  uint16_t clockPrescalar;
47  //! Is First modulation stage register setting. This value is a pre-
48  //! calculated value which can be obtained from the Device Users Guide.
49  //! This value is written into UCBRFx bits of UCAxMCTLW.
50  uint8_t firstModReg;
51  //! Is Second modulation stage register setting. This value is a pre-
52  //! calculated value which can be obtained from the Device Users Guide.
53  //! This value is written into UCBRSx bits of UCAxMCTLW.
54  uint8_t secondModReg;
55  //! Is the desired parity.
56  //! \n Valid values are:
57  //! - \b EUSCI_A_UART_NO_PARITY [Default]
58  //! - \b EUSCI_A_UART_ODD_PARITY
59  //! - \b EUSCI_A_UART_EVEN_PARITY
60  uint8_t parity;
61  //! Controls direction of receive and transmit shift register.
62  //! \n Valid values are:
63  //! - \b EUSCI_A_UART_MSB_FIRST
64  //! - \b EUSCI_A_UART_LSB_FIRST [Default]
65  uint16_t msborLsbFirst;
66  //! Indicates one/two STOP bits
67  //! \n Valid values are:
68  //! - \b EUSCI_A_UART_ONE_STOP_BIT [Default]
69  //! - \b EUSCI_A_UART_TWO_STOP_BITS
70  uint16_t numberofStopBits;
71  //! Selects the mode of operation
72  //! \n Valid values are:
73  //! - \b EUSCI_A_UART_MODE [Default]
74  //! - \b EUSCI_A_UART_IDLE_LINE_MULTI_PROCESSOR_MODE
75  //! - \b EUSCI_A_UART_ADDRESS_BIT_MULTI_PROCESSOR_MODE
76  //! - \b EUSCI_A_UART_AUTOMATIC_BAUDRATE_DETECTION_MODE
77  uint16_t uartMode;
78  //! Indicates low frequency or oversampling baud generation
79  //! \n Valid values are:
80  //! - \b EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION
81  //! - \b EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION
82  uint8_t overSampling;
84 
85 
86 //*****************************************************************************
87 //
88 // The following are values that can be passed to the param parameter for
89 // functions: EUSCI_A_UART_init().
90 //
91 //*****************************************************************************
92 #define EUSCI_A_UART_NO_PARITY 0x00
93 #define EUSCI_A_UART_ODD_PARITY 0x01
94 #define EUSCI_A_UART_EVEN_PARITY 0x02
95 
96 //*****************************************************************************
97 //
98 // The following are values that can be passed to the param parameter for
99 // functions: EUSCI_A_UART_init().
100 //
101 //*****************************************************************************
102 #define EUSCI_A_UART_MSB_FIRST UCMSB
103 #define EUSCI_A_UART_LSB_FIRST 0x00
104 
105 //*****************************************************************************
106 //
107 // The following are values that can be passed to the param parameter for
108 // functions: EUSCI_A_UART_init().
109 //
110 //*****************************************************************************
111 #define EUSCI_A_UART_MODE UCMODE_0
112 #define EUSCI_A_UART_IDLE_LINE_MULTI_PROCESSOR_MODE UCMODE_1
113 #define EUSCI_A_UART_ADDRESS_BIT_MULTI_PROCESSOR_MODE UCMODE_2
114 #define EUSCI_A_UART_AUTOMATIC_BAUDRATE_DETECTION_MODE UCMODE_3
115 
116 //*****************************************************************************
117 //
118 // The following are values that can be passed to the param parameter for
119 // functions: EUSCI_A_UART_init().
120 //
121 //*****************************************************************************
122 #define EUSCI_A_UART_CLOCKSOURCE_SMCLK UCSSEL__SMCLK
123 #define EUSCI_A_UART_CLOCKSOURCE_ACLK UCSSEL__ACLK
124 
125 //*****************************************************************************
126 //
127 // The following are values that can be passed to the param parameter for
128 // functions: EUSCI_A_UART_init().
129 //
130 //*****************************************************************************
131 #define EUSCI_A_UART_ONE_STOP_BIT 0x00
132 #define EUSCI_A_UART_TWO_STOP_BITS UCSPB
133 
134 //*****************************************************************************
135 //
136 // The following are values that can be passed to the param parameter for
137 // functions: EUSCI_A_UART_init().
138 //
139 //*****************************************************************************
140 #define EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION 0x01
141 #define EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION 0x00
142 
143 //*****************************************************************************
144 //
145 // The following are values that can be passed to the mask parameter for
146 // functions: EUSCI_A_UART_enableInterrupt(), and
147 // EUSCI_A_UART_disableInterrupt().
148 //
149 //*****************************************************************************
150 #define EUSCI_A_UART_RECEIVE_INTERRUPT UCRXIE
151 #define EUSCI_A_UART_TRANSMIT_INTERRUPT UCTXIE
152 #define EUSCI_A_UART_RECEIVE_ERRONEOUSCHAR_INTERRUPT UCRXEIE
153 #define EUSCI_A_UART_BREAKCHAR_INTERRUPT UCBRKIE
154 #define EUSCI_A_UART_STARTBIT_INTERRUPT UCSTTIE
155 #define EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT UCTXCPTIE
156 
157 //*****************************************************************************
158 //
159 // The following are values that can be passed to the mask parameter for
160 // functions: EUSCI_A_UART_getInterruptStatus(), and
161 // EUSCI_A_UART_clearInterrupt() as well as returned by the
162 // EUSCI_A_UART_getInterruptStatus() function.
163 //
164 //*****************************************************************************
165 #define EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG UCRXIFG
166 #define EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG UCTXIFG
167 #define EUSCI_A_UART_STARTBIT_INTERRUPT_FLAG UCSTTIFG
168 #define EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG UCTXCPTIFG
169 
170 //*****************************************************************************
171 //
172 // The following are values that can be passed to the mask parameter for
173 // functions: EUSCI_A_UART_queryStatusFlags() as well as returned by the
174 // EUSCI_A_UART_queryStatusFlags() function.
175 //
176 //*****************************************************************************
177 #define EUSCI_A_UART_LISTEN_ENABLE UCLISTEN
178 #define EUSCI_A_UART_FRAMING_ERROR UCFE
179 #define EUSCI_A_UART_OVERRUN_ERROR UCOE
180 #define EUSCI_A_UART_PARITY_ERROR UCPE
181 #define EUSCI_A_UART_BREAK_DETECT UCBRK
182 #define EUSCI_A_UART_RECEIVE_ERROR UCRXERR
183 #define EUSCI_A_UART_ADDRESS_RECEIVED UCADDR
184 #define EUSCI_A_UART_IDLELINE UCIDLE
185 #define EUSCI_A_UART_BUSY UCBUSY
186 
187 //*****************************************************************************
188 //
189 // The following are values that can be passed to the deglitchTime parameter
190 // for functions: EUSCI_A_UART_selectDeglitchTime().
191 //
192 //*****************************************************************************
193 #define EUSCI_A_UART_DEGLITCH_TIME_2ns 0x00
194 #define EUSCI_A_UART_DEGLITCH_TIME_50ns UCGLIT0
195 #define EUSCI_A_UART_DEGLITCH_TIME_100ns UCGLIT1
196 #define EUSCI_A_UART_DEGLITCH_TIME_200ns (UCGLIT0 + UCGLIT1)
197 
198 //*****************************************************************************
199 //
200 // Prototypes for the APIs.
201 //
202 //*****************************************************************************
203 
204 //*****************************************************************************
205 //
206 //! \brief Advanced initialization routine for the UART block. The values to be
207 //! written into the clockPrescalar, firstModReg, secondModReg and overSampling
208 //! parameters should be pre-computed and passed into the initialization
209 //! function.
210 //!
211 //! Upon successful initialization of the UART block, this function will have
212 //! initialized the module, but the UART block still remains disabled and must
213 //! be enabled with EUSCI_A_UART_enable(). To calculate values for
214 //! clockPrescalar, firstModReg, secondModReg and overSampling please use the
215 //! link below.
216 //!
217 //! https://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430BaudRateConverter/index.html
218 //!
219 //! \param baseAddress is the base address of the EUSCI_A_UART module.
220 //! \param param is the pointer to struct for initialization.
221 //!
222 //! Modified bits are \b UCPEN, \b UCPAR, \b UCMSB, \b UC7BIT, \b UCSPB, \b
223 //! UCMODEx and \b UCSYNC of \b UCAxCTL0 register; bits \b UCSSELx and \b
224 //! UCSWRST of \b UCAxCTL1 register.
225 //!
226 //! \return STATUS_SUCCESS or STATUS_FAIL of the initialization process
227 //
228 //*****************************************************************************
229 extern bool EUSCI_A_UART_init(uint16_t baseAddress,
230  EUSCI_A_UART_initParam *param);
231 
232 //*****************************************************************************
233 //
234 //! \brief Transmits a byte from the UART Module.
235 //!
236 //! This function will place the supplied data into UART transmit data register
237 //! to start transmission
238 //!
239 //! \param baseAddress is the base address of the EUSCI_A_UART module.
240 //! \param transmitData data to be transmitted from the UART module
241 //!
242 //! Modified bits of \b UCAxTXBUF register.
243 //!
244 //! \return None
245 //
246 //*****************************************************************************
247 extern void EUSCI_A_UART_transmitData(uint16_t baseAddress,
248  uint8_t transmitData);
249 
250 //*****************************************************************************
251 //
252 //! \brief Receives a byte that has been sent to the UART Module.
253 //!
254 //! This function reads a byte of data from the UART receive data Register.
255 //!
256 //! \param baseAddress is the base address of the EUSCI_A_UART module.
257 //!
258 //! Modified bits of \b UCAxRXBUF register.
259 //!
260 //! \return Returns the byte received from by the UART module, cast as an
261 //! uint8_t.
262 //
263 //*****************************************************************************
264 extern uint8_t EUSCI_A_UART_receiveData(uint16_t baseAddress);
265 
266 //*****************************************************************************
267 //
268 //! \brief Enables individual UART interrupt sources.
269 //!
270 //! Enables the indicated UART interrupt sources. The interrupt flag is first
271 //! and then the corresponding interrupt is enabled. Only the sources that are
272 //! enabled can be reflected to the processor interrupt; disabled sources have
273 //! no effect on the processor. Does not clear interrupt flags.
274 //!
275 //! \param baseAddress is the base address of the EUSCI_A_UART module.
276 //! \param mask is the bit mask of the interrupt sources to be enabled.
277 //! Mask value is the logical OR of any of the following:
278 //! - \b EUSCI_A_UART_RECEIVE_INTERRUPT - Receive interrupt
279 //! - \b EUSCI_A_UART_TRANSMIT_INTERRUPT - Transmit interrupt
280 //! - \b EUSCI_A_UART_RECEIVE_ERRONEOUSCHAR_INTERRUPT - Receive
281 //! erroneous-character interrupt enable
282 //! - \b EUSCI_A_UART_BREAKCHAR_INTERRUPT - Receive break character
283 //! interrupt enable
284 //! - \b EUSCI_A_UART_STARTBIT_INTERRUPT - Start bit received interrupt
285 //! enable
286 //! - \b EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT - Transmit complete
287 //! interrupt enable
288 //!
289 //! Modified bits of \b UCAxCTL1 register and bits of \b UCAxIE register.
290 //!
291 //! \return None
292 //
293 //*****************************************************************************
294 extern void EUSCI_A_UART_enableInterrupt(uint16_t baseAddress,
295  uint8_t mask);
296 
297 //*****************************************************************************
298 //
299 //! \brief Disables individual UART interrupt sources.
300 //!
301 //! Disables the indicated UART interrupt sources. Only the sources that are
302 //! enabled can be reflected to the processor interrupt; disabled sources have
303 //! no effect on the processor.
304 //!
305 //! \param baseAddress is the base address of the EUSCI_A_UART module.
306 //! \param mask is the bit mask of the interrupt sources to be disabled.
307 //! Mask value is the logical OR of any of the following:
308 //! - \b EUSCI_A_UART_RECEIVE_INTERRUPT - Receive interrupt
309 //! - \b EUSCI_A_UART_TRANSMIT_INTERRUPT - Transmit interrupt
310 //! - \b EUSCI_A_UART_RECEIVE_ERRONEOUSCHAR_INTERRUPT - Receive
311 //! erroneous-character interrupt enable
312 //! - \b EUSCI_A_UART_BREAKCHAR_INTERRUPT - Receive break character
313 //! interrupt enable
314 //! - \b EUSCI_A_UART_STARTBIT_INTERRUPT - Start bit received interrupt
315 //! enable
316 //! - \b EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT - Transmit complete
317 //! interrupt enable
318 //!
319 //! Modified bits of \b UCAxCTL1 register and bits of \b UCAxIE register.
320 //!
321 //! \return None
322 //
323 //*****************************************************************************
324 extern void EUSCI_A_UART_disableInterrupt(uint16_t baseAddress,
325  uint8_t mask);
326 
327 //*****************************************************************************
328 //
329 //! \brief Gets the current UART interrupt status.
330 //!
331 //! This returns the interrupt status for the UART module based on which flag
332 //! is passed.
333 //!
334 //! \param baseAddress is the base address of the EUSCI_A_UART module.
335 //! \param mask is the masked interrupt flag status to be returned.
336 //! Mask value is the logical OR of any of the following:
337 //! - \b EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG
338 //! - \b EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG
339 //! - \b EUSCI_A_UART_STARTBIT_INTERRUPT_FLAG
340 //! - \b EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG
341 //!
342 //! Modified bits of \b UCAxIFG register.
343 //!
344 //! \return Logical OR of any of the following:
345 //! - \b EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG
346 //! - \b EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG
347 //! - \b EUSCI_A_UART_STARTBIT_INTERRUPT_FLAG
348 //! - \b EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG
349 //! \n indicating the status of the masked flags
350 //
351 //*****************************************************************************
352 extern uint8_t EUSCI_A_UART_getInterruptStatus(uint16_t baseAddress,
353  uint8_t mask);
354 
355 //*****************************************************************************
356 //
357 //! \brief Clears UART interrupt sources.
358 //!
359 //! The UART interrupt source is cleared, so that it no longer asserts. The
360 //! highest interrupt flag is automatically cleared when an interrupt vector
361 //! generator is used.
362 //!
363 //! \param baseAddress is the base address of the EUSCI_A_UART module.
364 //! \param mask is a bit mask of the interrupt sources to be cleared.
365 //! Mask value is the logical OR of any of the following:
366 //! - \b EUSCI_A_UART_RECEIVE_INTERRUPT_FLAG
367 //! - \b EUSCI_A_UART_TRANSMIT_INTERRUPT_FLAG
368 //! - \b EUSCI_A_UART_STARTBIT_INTERRUPT_FLAG
369 //! - \b EUSCI_A_UART_TRANSMIT_COMPLETE_INTERRUPT_FLAG
370 //!
371 //! Modified bits of \b UCAxIFG register.
372 //!
373 //! \return None
374 //
375 //*****************************************************************************
376 extern void EUSCI_A_UART_clearInterrupt(uint16_t baseAddress,
377  uint8_t mask);
378 
379 //*****************************************************************************
380 //
381 //! \brief Enables the UART block.
382 //!
383 //! This will enable operation of the UART block.
384 //!
385 //! \param baseAddress is the base address of the EUSCI_A_UART module.
386 //!
387 //! Modified bits are \b UCSWRST of \b UCAxCTL1 register.
388 //!
389 //! \return None
390 //
391 //*****************************************************************************
392 extern void EUSCI_A_UART_enable(uint16_t baseAddress);
393 
394 //*****************************************************************************
395 //
396 //! \brief Disables the UART block.
397 //!
398 //! This will disable operation of the UART block.
399 //!
400 //! \param baseAddress is the base address of the EUSCI_A_UART module.
401 //!
402 //! Modified bits are \b UCSWRST of \b UCAxCTL1 register.
403 //!
404 //! \return None
405 //
406 //*****************************************************************************
407 extern void EUSCI_A_UART_disable(uint16_t baseAddress);
408 
409 //*****************************************************************************
410 //
411 //! \brief Gets the current UART status flags.
412 //!
413 //! This returns the status for the UART module based on which flag is passed.
414 //!
415 //! \param baseAddress is the base address of the EUSCI_A_UART module.
416 //! \param mask is the masked interrupt flag status to be returned.
417 //! Mask value is the logical OR of any of the following:
418 //! - \b EUSCI_A_UART_LISTEN_ENABLE
419 //! - \b EUSCI_A_UART_FRAMING_ERROR
420 //! - \b EUSCI_A_UART_OVERRUN_ERROR
421 //! - \b EUSCI_A_UART_PARITY_ERROR
422 //! - \b EUSCI_A_UART_BREAK_DETECT
423 //! - \b EUSCI_A_UART_RECEIVE_ERROR
424 //! - \b EUSCI_A_UART_ADDRESS_RECEIVED
425 //! - \b EUSCI_A_UART_IDLELINE
426 //! - \b EUSCI_A_UART_BUSY
427 //!
428 //! Modified bits of \b UCAxSTAT register.
429 //!
430 //! \return Logical OR of any of the following:
431 //! - \b EUSCI_A_UART_LISTEN_ENABLE
432 //! - \b EUSCI_A_UART_FRAMING_ERROR
433 //! - \b EUSCI_A_UART_OVERRUN_ERROR
434 //! - \b EUSCI_A_UART_PARITY_ERROR
435 //! - \b EUSCI_A_UART_BREAK_DETECT
436 //! - \b EUSCI_A_UART_RECEIVE_ERROR
437 //! - \b EUSCI_A_UART_ADDRESS_RECEIVED
438 //! - \b EUSCI_A_UART_IDLELINE
439 //! - \b EUSCI_A_UART_BUSY
440 //! \n indicating the status of the masked interrupt flags
441 //
442 //*****************************************************************************
443 extern uint8_t EUSCI_A_UART_queryStatusFlags(uint16_t baseAddress,
444  uint8_t mask);
445 
446 //*****************************************************************************
447 //
448 //! \brief Sets the UART module in dormant mode
449 //!
450 //! Puts USCI in sleep mode Only characters that are preceded by an idle-line
451 //! or with address bit set UCRXIFG. In UART mode with automatic baud-rate
452 //! detection, only the combination of a break and sync field sets UCRXIFG.
453 //!
454 //! \param baseAddress is the base address of the EUSCI_A_UART module.
455 //!
456 //! Modified bits of \b UCAxCTL1 register.
457 //!
458 //! \return None
459 //
460 //*****************************************************************************
461 extern void EUSCI_A_UART_setDormant(uint16_t baseAddress);
462 
463 //*****************************************************************************
464 //
465 //! \brief Re-enables UART module from dormant mode
466 //!
467 //! Not dormant. All received characters set UCRXIFG.
468 //!
469 //! \param baseAddress is the base address of the EUSCI_A_UART module.
470 //!
471 //! Modified bits are \b UCDORM of \b UCAxCTL1 register.
472 //!
473 //! \return None
474 //
475 //*****************************************************************************
476 extern void EUSCI_A_UART_resetDormant(uint16_t baseAddress);
477 
478 //*****************************************************************************
479 //
480 //! \brief Transmits the next byte to be transmitted marked as address
481 //! depending on selected multiprocessor mode
482 //!
483 //! \param baseAddress is the base address of the EUSCI_A_UART module.
484 //! \param transmitAddress is the next byte to be transmitted
485 //!
486 //! Modified bits of \b UCAxTXBUF register and bits of \b UCAxCTL1 register.
487 //!
488 //! \return None
489 //
490 //*****************************************************************************
491 extern void EUSCI_A_UART_transmitAddress(uint16_t baseAddress,
492  uint8_t transmitAddress);
493 
494 //*****************************************************************************
495 //
496 //! \brief Transmit break.
497 //!
498 //! Transmits a break with the next write to the transmit buffer. In UART mode
499 //! with automatic baud-rate detection,
500 //! EUSCI_A_UART_AUTOMATICBAUDRATE_SYNC(0x55) must be written into UCAxTXBUF to
501 //! generate the required break/sync fields. Otherwise, DEFAULT_SYNC(0x00) must
502 //! be written into the transmit buffer. Also ensures module is ready for
503 //! transmitting the next data.
504 //!
505 //! \param baseAddress is the base address of the EUSCI_A_UART module.
506 //!
507 //! Modified bits of \b UCAxTXBUF register and bits of \b UCAxCTL1 register.
508 //!
509 //! \return None
510 //
511 //*****************************************************************************
512 extern void EUSCI_A_UART_transmitBreak(uint16_t baseAddress);
513 
514 //*****************************************************************************
515 //
516 //! \brief Returns the address of the RX Buffer of the UART for the DMA module.
517 //!
518 //! Returns the address of the UART RX Buffer. This can be used in conjunction
519 //! with the DMA to store the received data directly to memory.
520 //!
521 //! \param baseAddress is the base address of the EUSCI_A_UART module.
522 //!
523 //! \return Address of RX Buffer
524 //
525 //*****************************************************************************
526 extern uint32_t EUSCI_A_UART_getReceiveBufferAddress(uint16_t baseAddress);
527 
528 //*****************************************************************************
529 //
530 //! \brief Returns the address of the TX Buffer of the UART for the DMA module.
531 //!
532 //! Returns the address of the UART TX Buffer. This can be used in conjunction
533 //! with the DMA to obtain transmitted data directly from memory.
534 //!
535 //! \param baseAddress is the base address of the EUSCI_A_UART module.
536 //!
537 //! \return Address of TX Buffer
538 //
539 //*****************************************************************************
540 extern uint32_t EUSCI_A_UART_getTransmitBufferAddress(uint16_t baseAddress);
541 
542 //*****************************************************************************
543 //
544 //! \brief Sets the deglitch time
545 //!
546 //! \param baseAddress is the base address of the EUSCI_A_UART module.
547 //! \param deglitchTime is the selected deglitch time
548 //! Valid values are:
549 //! - \b EUSCI_A_UART_DEGLITCH_TIME_2ns
550 //! - \b EUSCI_A_UART_DEGLITCH_TIME_50ns
551 //! - \b EUSCI_A_UART_DEGLITCH_TIME_100ns
552 //! - \b EUSCI_A_UART_DEGLITCH_TIME_200ns
553 //!
554 //! \return None
555 //
556 //*****************************************************************************
557 extern void EUSCI_A_UART_selectDeglitchTime(uint16_t baseAddress,
558  uint16_t deglitchTime);
559 
560 //*****************************************************************************
561 //
562 // Mark the end of the C bindings section for C++ compilers.
563 //
564 //*****************************************************************************
565 #ifdef __cplusplus
566 }
567 #endif
568 
569 #endif
570 #endif // __MSP430WARE_EUSCI_A_UART_H__
uint8_t overSampling
Definition: eusci_a_uart.h:82
uint8_t EUSCI_A_UART_receiveData(uint16_t baseAddress)
Receives a byte that has been sent to the UART Module.
Definition: eusci_a_uart.c:92
uint32_t EUSCI_A_UART_getReceiveBufferAddress(uint16_t baseAddress)
Returns the address of the RX Buffer of the UART for the DMA module.
Definition: eusci_a_uart.c:209
uint8_t firstModReg
Definition: eusci_a_uart.h:50
void EUSCI_A_UART_transmitAddress(uint16_t baseAddress, uint8_t transmitAddress)
Transmits the next byte to be transmitted marked as address depending on selected multiprocessor mode...
Definition: eusci_a_uart.c:178
void EUSCI_A_UART_transmitBreak(uint16_t baseAddress)
Transmit break.
Definition: eusci_a_uart.c:188
uint8_t parity
Definition: eusci_a_uart.h:60
uint8_t secondModReg
Definition: eusci_a_uart.h:54
uint16_t clockPrescalar
Is the value to be written into UCBRx bits.
Definition: eusci_a_uart.h:46
bool EUSCI_A_UART_init(uint16_t baseAddress, EUSCI_A_UART_initParam *param)
Advanced initialization routine for the UART block. The values to be written into the clockPrescalar...
Definition: eusci_a_uart.c:21
uint16_t numberofStopBits
Definition: eusci_a_uart.h:70
void EUSCI_A_UART_setDormant(uint16_t baseAddress)
Sets the UART module in dormant mode.
Definition: eusci_a_uart.c:168
void EUSCI_A_UART_transmitData(uint16_t baseAddress, uint8_t transmitData)
Transmits a byte from the UART Module.
Definition: eusci_a_uart.c:79
void EUSCI_A_UART_disableInterrupt(uint16_t baseAddress, uint8_t mask)
Disables individual UART interrupt sources.
Definition: eusci_a_uart.c:121
uint16_t msborLsbFirst
Definition: eusci_a_uart.h:65
uint8_t EUSCI_A_UART_getInterruptStatus(uint16_t baseAddress, uint8_t mask)
Gets the current UART interrupt status.
Definition: eusci_a_uart.c:138
void EUSCI_A_UART_clearInterrupt(uint16_t baseAddress, uint8_t mask)
Clears UART interrupt sources.
Definition: eusci_a_uart.c:144
uint32_t EUSCI_A_UART_getTransmitBufferAddress(uint16_t baseAddress)
Returns the address of the TX Buffer of the UART for the DMA module.
Definition: eusci_a_uart.c:214
void EUSCI_A_UART_resetDormant(uint16_t baseAddress)
Re-enables UART module from dormant mode.
Definition: eusci_a_uart.c:173
void EUSCI_A_UART_selectDeglitchTime(uint16_t baseAddress, uint16_t deglitchTime)
Sets the deglitch time.
Definition: eusci_a_uart.c:219
void EUSCI_A_UART_disable(uint16_t baseAddress)
Disables the UART block.
Definition: eusci_a_uart.c:156
void EUSCI_A_UART_enableInterrupt(uint16_t baseAddress, uint8_t mask)
Enables individual UART interrupt sources.
Definition: eusci_a_uart.c:103
uint16_t uartMode
Definition: eusci_a_uart.h:77
Used in the EUSCI_A_UART_init() function as the param parameter.
Definition: eusci_a_uart.h:39
uint8_t selectClockSource
Definition: eusci_a_uart.h:44
uint8_t EUSCI_A_UART_queryStatusFlags(uint16_t baseAddress, uint8_t mask)
Gets the current UART status flags.
Definition: eusci_a_uart.c:162
void EUSCI_A_UART_enable(uint16_t baseAddress)
Enables the UART block.
Definition: eusci_a_uart.c:150

Copyright 2015, Texas Instruments Incorporated