MotorWare f2806x Driver API Documentation
sci.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2  * Copyright (c) 2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * --/COPYRIGHT--*/
32 #ifndef _SCI_H_
33 #define _SCI_H_
34 
40 
41 
42 // **************************************************************************
43 // the includes
44 
45 // drivers
47 
48 
49 // modules
50 #include "sw/modules/types/src/types.h"
51 
52 
57 
58 
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 
65 // **************************************************************************
66 // the defines
67 
68 
71 #define SCIA_BASE_ADDR (0x00007050)
72 
75 #define SCIB_BASE_ADDR (0x00007750)
76 
77 
80 #define SCI_SCICCR_CHAR_LENGTH_BITS (7 << 0)
81 
84 #define SCI_SCICCR_MODE_BITS (1 << 3)
85 
88 #define SCI_SCICCR_LB_ENA_BITS (1 << 4)
89 
92 #define SCI_SCICCR_PARITY_ENA_BITS (1 << 5)
93 
96 #define SCI_SCICCR_PARITY_BITS (1 << 6)
97 
100 #define SCI_SCICCR_STOP_BITS (1 << 7)
101 
102 
105 #define SCI_SCICTL1_RXENA_BITS (1 << 0)
106 
109 #define SCI_SCICTL1_TXENA_BITS (1 << 1)
110 
113 #define SCI_SCICTL1_SLEEP_BITS (1 << 2)
114 
117 #define SCI_SCICTL1_TXWAKE_BITS (1 << 3)
118 
121 #define SCI_SCICTL1_RESET_BITS (1 << 5)
122 
125 #define SCI_SCICTL1_RX_ERR_INT_ENA_BITS (1 << 6)
126 
127 
130 #define SCI_SCICTL2_TX_INT_ENA_BITS (1 << 0)
131 
134 #define SCI_SCICTL2_RX_INT_ENA_BITS (1 << 1)
135 
138 #define SCI_SCICTL2_TXEMPTY_BITS (1 << 6)
139 
142 #define SCI_SCICTL2_TXRDY_BITS (1 << 7)
143 
144 
147 #define SCI_SCIRXST_RXWAKE_BITS (1 << 1)
148 
151 #define SCI_SCIRXST_PE_BITS (1 << 2)
152 
155 #define SCI_SCIRXST_OE_BITS (1 << 3)
156 
159 #define SCI_SCIRXST_FE_BITS (1 << 4)
160 
163 #define SCI_SCIRXST_BRKDT_BITS (1 << 5)
164 
167 #define SCI_SCIRXST_RXRDY_BITS (1 << 6)
168 
171 #define SCI_SCIRXST_RXERROR_BITS (1 << 7)
172 
173 
176 #define SCI_SCIFFRX_IL_BITS (31 << 0)
177 
180 #define SCI_SCIFFRX_IENA_BITS ( 1 << 5)
181 
184 #define SCI_SCIFFRX_INTCLR_BITS ( 1 << 6)
185 
188 #define SCI_SCIFFRX_INT_BITS ( 1 << 7)
189 
192 #define SCI_SCIFFRX_FIFO_ST_BITS (31 << 8)
193 
196 #define SCI_SCIFFRX_FIFO_RESET_BITS ( 1 << 13)
197 
200 #define SCI_SCIFFRX_FIFO_OVFCLR_BITS ( 1 << 14)
201 
204 #define SCI_SCIFFRX_FIFO_OVF_BITS ( 1 << 15)
205 
206 
209 #define SCI_SCIFFTX_IL_BITS (31 << 0)
210 
213 #define SCI_SCIFFTX_IENA_BITS ( 1 << 5)
214 
217 #define SCI_SCIFFTX_INTCLR_BITS ( 1 << 6)
218 
221 #define SCI_SCIFFTX_INT_BITS ( 1 << 7)
222 
225 #define SCI_SCIFFTX_FIFO_ST_BITS (31 << 8)
226 
229 #define SCI_SCIFFTX_FIFO_RESET_BITS ( 1 << 13)
230 
233 #define SCI_SCIFFTX_FIFO_ENA_BITS ( 1 << 14)
234 
237 #define SCI_SCIFFTX_CHAN_RESET_BITS ( 1 << 15)
238 
239 
242 #define SCI_SCIFFCT_DELAY_BITS (255 << 0)
243 
246 #define SCI_SCIFFCT_CDC_BITS ( 1 << 13)
247 
250 #define SCI_SCIFFCT_ABDCLR_BITS ( 1 << 14)
251 
254 #define SCI_SCIFFCT_ABD_BITS ( 1 << 15)
255 
256 
257 // **************************************************************************
258 // the typedefs
259 
262 typedef enum
263 {
269 
270 
273 typedef enum
274 {
284 
285 
288 typedef enum
289 {
290  SCI_Mode_IdleLine=(0 << 3),
292 } SCI_Mode_e;
293 
294 
297 typedef enum
298 {
302 
303 
306 typedef enum
307 {
308  SCI_Parity_Odd=(0 << 6),
309  SCI_Parity_Even=(1 << 6)
310 } SCI_Parity_e;
311 
312 
315 typedef enum
316 {
321 
322 
325 typedef enum
326 {
333 
334 
337 typedef enum
338 {
345 
346 
349 typedef struct _SCI_Obj_
350 {
351  volatile uint16_t SCICCR;
352  volatile uint16_t SCICTL1;
353  volatile uint16_t SCIHBAUD;
354  volatile uint16_t SCILBAUD;
355  volatile uint16_t SCICTL2;
356  volatile uint16_t SCIRXST;
357  volatile uint16_t SCIRXEMU;
358  volatile uint16_t SCIRXBUF;
359  volatile uint16_t rsvd_1;
360  volatile uint16_t SCITXBUF;
361  volatile uint16_t SCIFFTX;
362  volatile uint16_t SCIFFRX;
363  volatile uint16_t SCIFFCT;
364  volatile uint16_t rsvd_2[2];
365  volatile uint16_t SCIPRI;
366 } SCI_Obj;
367 
368 
371 typedef struct _SCI_Obj_ *SCI_Handle;
372 
373 
374 // **************************************************************************
375 // the globals
376 
377 
378 // **************************************************************************
379 // the function prototypes
380 
383 extern void SCI_clearAutoBaudDetect(SCI_Handle sciHandle);
384 
385 
388 extern void SCI_clearRxFifoOvf(SCI_Handle sciHandle);
389 
390 
393 extern void SCI_clearRxFifoInt(SCI_Handle sciHandle);
394 
395 
398 extern void SCI_clearTxFifoInt(SCI_Handle sciHandle);
399 
400 
403 extern void SCI_disable(SCI_Handle sciHandle);
404 
405 
408 extern void SCI_disableAutoBaudAlign(SCI_Handle sciHandle);
409 
410 
413 extern void SCI_disableLoopBack(SCI_Handle sciHandle);
414 
415 
418 extern void SCI_disableParity(SCI_Handle sciHandle);
419 
420 
423 extern void SCI_disableRx(SCI_Handle sciHandle);
424 
425 
428 extern void SCI_disableRxErrorInt(SCI_Handle sciHandle);
429 
430 
433 extern void SCI_disableRxFifoInt(SCI_Handle sciHandle);
434 
435 
438 extern void SCI_disableRxInt(SCI_Handle sciHandle);
439 
440 
443 extern void SCI_disableSleep(SCI_Handle sciHandle);
444 
445 
448 extern void SCI_disableTx(SCI_Handle sciHandle);
449 
450 
453 extern void SCI_disableTxFifoEnh(SCI_Handle sciHandle);
454 
455 
458 extern void SCI_disableTxFifoInt(SCI_Handle sciHandle);
459 
460 
463 extern void SCI_disableTxInt(SCI_Handle sciHandle);
464 
465 
468 extern void SCI_disableTxWake(SCI_Handle sciHandle);
469 
470 
473 extern void SCI_enable(SCI_Handle sciHandle);
474 
475 
478 extern void SCI_enableAutoBaudAlign(SCI_Handle sciHandle);
479 
480 
483 extern void SCI_enableChannels(SCI_Handle sciHandle);
484 
485 
488 extern void SCI_enableLoopBack(SCI_Handle sciHandle);
489 
490 
493 extern void SCI_enableParity(SCI_Handle sciHandle);
494 
495 
498 extern void SCI_enableRx(SCI_Handle sciHandle);
499 
500 
503 extern void SCI_enableRxErrorInt(SCI_Handle sciHandle);
504 
505 
508 extern void SCI_enableRxInt(SCI_Handle sciHandle);
509 
510 
513 extern void SCI_enableSleep(SCI_Handle sciHandle);
514 
515 
518 extern void SCI_enableRxFifo(SCI_Handle sciHandle);
519 
520 
523 extern void SCI_enableRxFifoInt(SCI_Handle sciHandle);
524 
525 
528 extern void SCI_enableTx(SCI_Handle sciHandle);
529 
530 
533 extern void SCI_enableTxFifo(SCI_Handle sciHandle);
534 
535 
538 extern void SCI_enableTxFifoEnh(SCI_Handle sciHandle);
539 
540 
543 extern void SCI_enableTxFifoInt(SCI_Handle sciHandle);
544 
545 
548 extern void SCI_enableTxInt(SCI_Handle sciHandle);
549 
550 
553 extern void SCI_enableTxWake(SCI_Handle sciHandle);
554 
555 
559 extern uint16_t SCI_getDataBlocking(SCI_Handle sciHandle);
560 
561 
566 extern uint16_t SCI_getDataNonBlocking(SCI_Handle sciHandle, uint16_t * success);
567 
568 
572 extern SCI_FifoStatus_e SCI_getRxFifoStatus(SCI_Handle sciHandle);
573 
574 
578 extern SCI_FifoStatus_e SCI_getTxFifoStatus(SCI_Handle sciHandle);
579 
580 
585 extern SCI_Handle SCI_init(void *pMemory,const size_t numBytes);
586 
587 
591 extern void SCI_putDataBlocking(SCI_Handle sciHandle, uint16_t data);
592 
593 
598 extern uint16_t SCI_putDataNonBlocking(SCI_Handle sciHandle, uint16_t data);
599 
600 
604 static inline uint16_t SCI_read(SCI_Handle sciHandle)
605 {
606  SCI_Obj *sci = (SCI_Obj *)sciHandle;
607 
608 
609  // get the data
610  uint16_t data = sci->SCIRXBUF;
611 
612  return(data);
613 } // end of SCI_read() function
614 
615 
618 extern void SCI_reset(SCI_Handle sciHandle);
619 
620 
623 extern void SCI_resetChannels(SCI_Handle sciHandle);
624 
625 
628 extern void SCI_resetRxFifo(SCI_Handle sciHandle);
629 
630 
633 extern void SCI_resetTxFifo(SCI_Handle sciHandle);
634 
635 
639 static inline bool SCI_rxDataReady(SCI_Handle sciHandle)
640 {
641  SCI_Obj *sci = (SCI_Obj *)sciHandle;
642  bool status;
643 
644  status = (sci->SCIRXST & SCI_SCIRXST_RXRDY_BITS) >> 6;
645 
646  return((bool)status);
647 } // end of SCI_rxDataReady() function
648 
649 
653 extern void SCI_setBaudRate(SCI_Handle sciHandle,const SCI_BaudRate_e baudRate);
654 
655 
659 extern void SCI_setCharLength(SCI_Handle sciHandle,const SCI_CharLength_e charLength);
660 
661 
665 extern void SCI_setMode(SCI_Handle sciHandle,const SCI_Mode_e mode);
666 
667 
671 extern void SCI_setNumStopBits(SCI_Handle sciHandle,const SCI_NumStopBits_e numBits);
672 
673 
677 extern void SCI_setPriority(SCI_Handle sciHandle,const SCI_Priority_e priority);
678 
679 
683 extern void SCI_setParity(SCI_Handle sciHandle,const SCI_Parity_e parity);
684 
685 
689 extern void SCI_setTxDelay(SCI_Handle sciHandle,const uint_least8_t delay);
690 
691 
695 extern void SCI_setTxFifoIntLevel(SCI_Handle sciHandle,const SCI_FifoLevel_e fifoLevel);
696 
697 
701 extern void SCI_setRxFifoIntLevel(SCI_Handle sciHandle,const SCI_FifoLevel_e fifoLevel);
702 
703 
707 static inline bool SCI_txReady(SCI_Handle sciHandle)
708 {
709  SCI_Obj *sci = (SCI_Obj *)sciHandle;
710  bool status;
711 
712  status = (sci->SCICTL2 & SCI_SCICTL2_TXRDY_BITS) >> 7;
713 
714  return((bool)status);
715 } // end of SCI_txReady() function
716 
717 
721 static inline void SCI_write(SCI_Handle sciHandle,const uint16_t data)
722 {
723  SCI_Obj *sci = (SCI_Obj *)sciHandle;
724 
725 
726  // write the data
727  sci->SCITXBUF = data;
728 
729  return;
730 } // end of SCI_write() function
731 
732 
733 #ifdef __cplusplus
734 }
735 #endif // extern "C"
736 
738 #endif // end of _SCI_H_ definition
739 
struct _SCI_Obj_ * SCI_Handle
Defines the serial communications interface (SCI) handle.
Definition: sci.h:371
void SCI_clearAutoBaudDetect(SCI_Handle sciHandle)
Clears the auto baud detect mode.
Definition: sci.c:57
uint16_t SCI_getDataBlocking(SCI_Handle sciHandle)
Gets data from the serial communications interface (Blocking)
Definition: sci.c:477
void SCI_setPriority(SCI_Handle sciHandle, const SCI_Priority_e priority)
Sets the serial communications interface (SCI) priority.
Definition: sci.c:686
void SCI_reset(SCI_Handle sciHandle)
Resets the serial communications interface (SCI)
Definition: sci.c:574
Denotes the fifo contains 2 words.
Definition: sci.h:341
struct _SCI_Obj_ SCI_Obj
Defines the serial communications interface (SCI) object.
void SCI_enableTxWake(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) wakeup method.
Definition: sci.c:465
SCI_FifoLevel_e
Enumeration to define the serial communications interface (SCI) FIFO level.
Definition: sci.h:325
Denotes even parity.
Definition: sci.h:309
void SCI_enable(SCI_Handle sciHandle)
Enables the serial communications interface (SCI)
Definition: sci.c:273
void SCI_enableTx(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) masater/slave transmit mode.
Definition: sci.c:405
void SCI_enableRxInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive interrupt.
Definition: sci.c:357
volatile uint16_t SCIFFTX
SCI FIFO Transmit Register.
Definition: sci.h:361
void SCI_disable(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) interrupt.
Definition: sci.c:105
Denotes the fifo is empty.
Definition: sci.h:339
Denotes a character length of 6 bits.
Definition: sci.h:280
void SCI_disableTx(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) master/slave transmit mode.
Definition: sci.c:213
Denotes idle-line mode protocol.
Definition: sci.h:290
void SCI_enableAutoBaudAlign(SCI_Handle sciHandle)
Enable the serial communications interface (SCI) auto baud alignment.
Definition: sci.c:285
void SCI_setMode(SCI_Handle sciHandle, const SCI_Mode_e mode)
Sets the serial communications interface (SCI) miltprocessor mode.
Definition: sci.c:656
Denotes free running.
Definition: sci.h:318
volatile uint16_t SCIPRI
SCI Priority Register.
Definition: sci.h:365
Denotes 2 stop bits.
Definition: sci.h:300
Denotes address-bit mode protocol.
Definition: sci.h:291
void SCI_enableTxFifoInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO interrupt.
Definition: sci.c:441
void SCI_setRxFifoIntLevel(SCI_Handle sciHandle, const SCI_FifoLevel_e fifoLevel)
Sets the serial communications interface (SCI) receive FIFO level for generating an interrupt...
Definition: sci.c:727
Denotes 115.2 kBaud.
Definition: sci.h:267
Denotes 57.6 kBaud.
Definition: sci.h:266
#define SCI_SCICTL2_TXRDY_BITS
Defines the location of the RX EMPTY bits in the SCICTL2 register.
Definition: sci.h:142
Denotes an immediate stop.
Definition: sci.h:317
volatile uint16_t rsvd_2[2]
Reserved.
Definition: sci.h:364
void SCI_enableParity(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) parity.
Definition: sci.c:321
volatile uint16_t SCICTL1
SCI Control Register 1.
Definition: sci.h:352
void SCI_enableTxFifo(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO.
Definition: sci.c:417
void SCI_enableRxFifoInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive FIFO interrupt.
Definition: sci.c:393
Denotes the fifo contains 1 word.
Definition: sci.h:340
Denotes the fifo contains 4 words.
Definition: sci.h:331
void SCI_disableLoopBack(SCI_Handle sciHandle)
Disables the serial peripheral interface (SCI) loop back mode.
Definition: sci.c:129
static bool SCI_rxDataReady(SCI_Handle sciHandle)
Determines if the serial communications interface (SCI) has receive data ready.
Definition: sci.h:639
SCI_FifoStatus_e
Enumeration to define the serial communications interface (SCI) FIFO status.
Definition: sci.h:337
void SCI_setCharLength(SCI_Handle sciHandle, const SCI_CharLength_e charLength)
Sets the serial communications interface (SCI) character length.
Definition: sci.c:641
Denotes a character length of 1 bit.
Definition: sci.h:275
void SCI_enableSleep(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) sleep mode.
Definition: sci.c:369
void SCI_setBaudRate(SCI_Handle sciHandle, const SCI_BaudRate_e baudRate)
Sets the serial communications interface (SCI) baud rate.
Definition: sci.c:628
Denotes that a stop after the current receive/transmit sequence.
Definition: sci.h:319
static uint16_t SCI_read(SCI_Handle sciHandle)
Reads data from the serial communications interface (SCI)
Definition: sci.h:604
void SCI_enableTxFifoEnh(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO enhancements.
Definition: sci.c:429
uint16_t SCI_getDataNonBlocking(SCI_Handle sciHandle, uint16_t *success)
Read data from the serial communications interface (Non-Blocking)
Definition: sci.c:489
#define SCI_SCIRXST_RXRDY_BITS
Defines the location of the RXRDY bits in the SCIRXST register.
Definition: sci.h:167
Denotes the fifo contains 1 word.
Definition: sci.h:328
void SCI_disableRxFifoInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive FIFO interrupt.
Definition: sci.c:177
void SCI_disableRxErrorInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive error interrupt.
Definition: sci.c:165
volatile uint16_t SCITXBUF
SCI Transmit Data Buffer Register.
Definition: sci.h:360
SCI_NumStopBits_e
Enumeration to define the serial communications interface (SCI) number of stop bits.
Definition: sci.h:297
void SCI_setNumStopBits(SCI_Handle sciHandle, const SCI_NumStopBits_e numBits)
Sets the serial communications interface (SCI) number of stop bits.
Definition: sci.c:671
Denotes the fifo contains 3 words.
Definition: sci.h:342
void SCI_clearRxFifoOvf(SCI_Handle sciHandle)
Clears the Rx FIFO overflow flag.
Definition: sci.c:69
Denotes a character length of 4 bits.
Definition: sci.h:278
Defines the serial communications interface (SCI) object.
Definition: sci.h:349
Denotes 9.6 kBaud.
Definition: sci.h:264
void SCI_resetTxFifo(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) transmit FIFO.
Definition: sci.c:614
void SCI_disableParity(SCI_Handle sciHandle)
Disable the parity.
Definition: sci.c:141
void SCI_disableAutoBaudAlign(SCI_Handle sciHandle)
Disable the serial communications interface (SCI) auto baud alignment.
Definition: sci.c:117
SCI_CharLength_e
Enumeration to define the serial communications interface (SCI) character lengths.
Definition: sci.h:273
Denotes a character length of 3 bits.
Definition: sci.h:277
void SCI_enableRxFifo(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive FIFO.
Definition: sci.c:381
void SCI_disableRxInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive interrupt.
Definition: sci.c:189
static bool SCI_txReady(SCI_Handle sciHandle)
Determines if the serial communications interface (SCI) is ready to transmit.
Definition: sci.h:707
void SCI_setTxDelay(SCI_Handle sciHandle, const uint_least8_t delay)
Sets the serial communications interface (SCI) transmit delay.
Definition: sci.c:713
volatile uint16_t SCICTL2
SCI Control Register 2.
Definition: sci.h:355
Denotes 19.2 kBaud.
Definition: sci.h:265
SCI_Priority_e
Enumeration to define the serial communications interface (SCI) emulation suspend priority...
Definition: sci.h:315
volatile uint16_t rsvd_1
Reserved.
Definition: sci.h:359
void SCI_enableLoopBack(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) loop back mode.
Definition: sci.c:309
void SCI_setParity(SCI_Handle sciHandle, const SCI_Parity_e parity)
Sets the serial communications interface (SCI) parity.
Definition: sci.c:698
void SCI_enableTxInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit interrupt.
Definition: sci.c:453
Contains public interface to various functions related to the central processing unit (CPU) object...
volatile uint16_t SCIRXBUF
SCI Receive Data Buffer Register.
Definition: sci.h:358
uint16_t SCI_putDataNonBlocking(SCI_Handle sciHandle, uint16_t data)
Writes data to the serial communications interface (Non-Blocking)
Definition: sci.c:558
void SCI_resetRxFifo(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) receive FIFO.
Definition: sci.c:600
SCI_FifoStatus_e SCI_getRxFifoStatus(SCI_Handle sciHandle)
Gets the serial communications interface (SCI) receive FIFO status.
Definition: sci.c:504
volatile uint16_t SCIRXEMU
SCI Receive Emulation Data Buffer Register.
Definition: sci.h:357
Denotes a character length of 8 bits.
Definition: sci.h:282
void SCI_disableTxWake(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) wakeup method.
Definition: sci.c:261
void SCI_enableChannels(SCI_Handle sciHandle)
Enable the serial communications interface (SCI) transmit and receive channels.
Definition: sci.c:297
volatile uint16_t SCIHBAUD
SCI Baud Register, High Bits.
Definition: sci.h:353
void SCI_disableTxFifoEnh(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit FIFO enhancements.
Definition: sci.c:225
void SCI_disableSleep(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) sleep mode.
Definition: sci.c:201
SCI_Mode_e
Enumeration to define the serial communications interface (SCI) multiprocessor protocol mode...
Definition: sci.h:288
static void SCI_write(SCI_Handle sciHandle, const uint16_t data)
Writes data to the serial communications interface (SCI)
Definition: sci.h:721
SCI_FifoStatus_e SCI_getTxFifoStatus(SCI_Handle sciHandle)
Gets the serial communications interface (SCI) transmit FIFO status.
Definition: sci.c:516
void SCI_putDataBlocking(SCI_Handle sciHandle, uint16_t data)
Writes data to the serial communications interface (Blocking)
Definition: sci.c:543
Denotes a character length of 2 bits.
Definition: sci.h:276
void SCI_clearTxFifoInt(SCI_Handle sciHandle)
Clears the Tx FIFO interrupt flag.
Definition: sci.c:93
void SCI_disableTxInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit interrupt.
Definition: sci.c:249
volatile uint16_t SCIFFRX
SCI FIFO Receive Register.
Definition: sci.h:362
void SCI_enableRx(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) receiver.
Definition: sci.c:333
void SCI_disableRx(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) master/slave receive mode.
Definition: sci.c:153
SCI_Parity_e
Enumeration to define the serial communications interface (SCI) parity.
Definition: sci.h:306
volatile uint16_t SCIFFCT
SCI FIFO Control Register.
Definition: sci.h:363
Denotes a character length of 5 bits.
Definition: sci.h:279
Denotes the fifo contains 2 words.
Definition: sci.h:329
Denotes odd parity.
Definition: sci.h:308
SCI_BaudRate_e
Enumeration to define the serial communications interface (SCI) baud rates. This enumeration assume a...
Definition: sci.h:262
Denotes the fifo is empty.
Definition: sci.h:327
volatile uint16_t SCICCR
SCI Configuration Control Register.
Definition: sci.h:351
Denotes 1 stop bit.
Definition: sci.h:299
void SCI_enableRxErrorInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive error interrupt.
Definition: sci.c:345
void SCI_disableTxFifoInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit FIFO interrupt.
Definition: sci.c:237
volatile uint16_t SCIRXST
SCI Receive Status Register.
Definition: sci.h:356
Denotes a character length of 7 bits.
Definition: sci.h:281
void SCI_setTxFifoIntLevel(SCI_Handle sciHandle, const SCI_FifoLevel_e fifoLevel)
Sets the serial communications interface (SCI) transmit FIFO level for generating an interrupt...
Definition: sci.c:741
Denotes the fifo contains 4 words.
Definition: sci.h:343
void SCI_clearRxFifoInt(SCI_Handle sciHandle)
Clears the Rx FIFO interrupt flag.
Definition: sci.c:81
Denotes the fifo contains 3 words.
Definition: sci.h:330
volatile uint16_t SCILBAUD
SCI Baud Register, Low Bits.
Definition: sci.h:354
SCI_Handle SCI_init(void *pMemory, const size_t numBytes)
Initializes the serial communications interface (SCI) object handle.
Definition: sci.c:528
void SCI_resetChannels(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) transmit and receive channels.
Definition: sci.c:586