50 #include "sw/modules/types/src/types.h"
71 #define SCIA_BASE_ADDR (0x00007050)
75 #define SCIB_BASE_ADDR (0x00007750)
80 #define SCI_SCICCR_CHAR_LENGTH_BITS (7 << 0)
84 #define SCI_SCICCR_MODE_BITS (1 << 3)
88 #define SCI_SCICCR_LB_ENA_BITS (1 << 4)
92 #define SCI_SCICCR_PARITY_ENA_BITS (1 << 5)
96 #define SCI_SCICCR_PARITY_BITS (1 << 6)
100 #define SCI_SCICCR_STOP_BITS (1 << 7)
105 #define SCI_SCICTL1_RXENA_BITS (1 << 0)
109 #define SCI_SCICTL1_TXENA_BITS (1 << 1)
113 #define SCI_SCICTL1_SLEEP_BITS (1 << 2)
117 #define SCI_SCICTL1_TXWAKE_BITS (1 << 3)
121 #define SCI_SCICTL1_RESET_BITS (1 << 5)
125 #define SCI_SCICTL1_RX_ERR_INT_ENA_BITS (1 << 6)
130 #define SCI_SCICTL2_TX_INT_ENA_BITS (1 << 0)
134 #define SCI_SCICTL2_RX_INT_ENA_BITS (1 << 1)
138 #define SCI_SCICTL2_TXEMPTY_BITS (1 << 6)
142 #define SCI_SCICTL2_TXRDY_BITS (1 << 7)
147 #define SCI_SCIRXST_RXWAKE_BITS (1 << 1)
151 #define SCI_SCIRXST_PE_BITS (1 << 2)
155 #define SCI_SCIRXST_OE_BITS (1 << 3)
159 #define SCI_SCIRXST_FE_BITS (1 << 4)
163 #define SCI_SCIRXST_BRKDT_BITS (1 << 5)
167 #define SCI_SCIRXST_RXRDY_BITS (1 << 6)
171 #define SCI_SCIRXST_RXERROR_BITS (1 << 7)
176 #define SCI_SCIFFRX_IL_BITS (31 << 0)
180 #define SCI_SCIFFRX_IENA_BITS ( 1 << 5)
184 #define SCI_SCIFFRX_INTCLR_BITS ( 1 << 6)
188 #define SCI_SCIFFRX_INT_BITS ( 1 << 7)
192 #define SCI_SCIFFRX_FIFO_ST_BITS (31 << 8)
196 #define SCI_SCIFFRX_FIFO_RESET_BITS ( 1 << 13)
200 #define SCI_SCIFFRX_FIFO_OVFCLR_BITS ( 1 << 14)
204 #define SCI_SCIFFRX_FIFO_OVF_BITS ( 1 << 15)
209 #define SCI_SCIFFTX_IL_BITS (31 << 0)
213 #define SCI_SCIFFTX_IENA_BITS ( 1 << 5)
217 #define SCI_SCIFFTX_INTCLR_BITS ( 1 << 6)
221 #define SCI_SCIFFTX_INT_BITS ( 1 << 7)
225 #define SCI_SCIFFTX_FIFO_ST_BITS (31 << 8)
229 #define SCI_SCIFFTX_FIFO_RESET_BITS ( 1 << 13)
233 #define SCI_SCIFFTX_FIFO_ENA_BITS ( 1 << 14)
237 #define SCI_SCIFFTX_CHAN_RESET_BITS ( 1 << 15)
242 #define SCI_SCIFFCT_DELAY_BITS (255 << 0)
246 #define SCI_SCIFFCT_CDC_BITS ( 1 << 13)
250 #define SCI_SCIFFCT_ABDCLR_BITS ( 1 << 14)
254 #define SCI_SCIFFCT_ABD_BITS ( 1 << 15)
585 extern SCI_Handle
SCI_init(
void *pMemory,
const size_t numBytes);
604 static inline uint16_t
SCI_read(SCI_Handle sciHandle)
618 extern void SCI_reset(SCI_Handle sciHandle);
646 return((
bool)status);
689 extern void SCI_setTxDelay(SCI_Handle sciHandle,
const uint_least8_t delay);
714 return((
bool)status);
721 static inline void SCI_write(SCI_Handle sciHandle,
const uint16_t data)
738 #endif // end of _SCI_H_ definition
struct _SCI_Obj_ * SCI_Handle
Defines the serial communications interface (SCI) handle.
void SCI_clearAutoBaudDetect(SCI_Handle sciHandle)
Clears the auto baud detect mode.
uint16_t SCI_getDataBlocking(SCI_Handle sciHandle)
Gets data from the serial communications interface (Blocking)
void SCI_setPriority(SCI_Handle sciHandle, const SCI_Priority_e priority)
Sets the serial communications interface (SCI) priority.
void SCI_reset(SCI_Handle sciHandle)
Resets the serial communications interface (SCI)
Denotes the fifo contains 2 words.
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.
SCI_FifoLevel_e
Enumeration to define the serial communications interface (SCI) FIFO level.
void SCI_enable(SCI_Handle sciHandle)
Enables the serial communications interface (SCI)
void SCI_enableTx(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) masater/slave transmit mode.
void SCI_enableRxInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive interrupt.
volatile uint16_t SCIFFTX
SCI FIFO Transmit Register.
void SCI_disable(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) interrupt.
Denotes the fifo is empty.
Denotes a character length of 6 bits.
void SCI_disableTx(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) master/slave transmit mode.
Denotes idle-line mode protocol.
void SCI_enableAutoBaudAlign(SCI_Handle sciHandle)
Enable the serial communications interface (SCI) auto baud alignment.
void SCI_setMode(SCI_Handle sciHandle, const SCI_Mode_e mode)
Sets the serial communications interface (SCI) miltprocessor mode.
volatile uint16_t SCIPRI
SCI Priority Register.
Denotes address-bit mode protocol.
void SCI_enableTxFifoInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO interrupt.
void SCI_setRxFifoIntLevel(SCI_Handle sciHandle, const SCI_FifoLevel_e fifoLevel)
Sets the serial communications interface (SCI) receive FIFO level for generating an interrupt...
#define SCI_SCICTL2_TXRDY_BITS
Defines the location of the RX EMPTY bits in the SCICTL2 register.
Denotes an immediate stop.
volatile uint16_t rsvd_2[2]
Reserved.
void SCI_enableParity(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) parity.
volatile uint16_t SCICTL1
SCI Control Register 1.
void SCI_enableTxFifo(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO.
void SCI_enableRxFifoInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive FIFO interrupt.
Denotes the fifo contains 1 word.
Denotes the fifo contains 4 words.
void SCI_disableLoopBack(SCI_Handle sciHandle)
Disables the serial peripheral interface (SCI) loop back mode.
static bool SCI_rxDataReady(SCI_Handle sciHandle)
Determines if the serial communications interface (SCI) has receive data ready.
SCI_FifoStatus_e
Enumeration to define the serial communications interface (SCI) FIFO status.
void SCI_setCharLength(SCI_Handle sciHandle, const SCI_CharLength_e charLength)
Sets the serial communications interface (SCI) character length.
Denotes a character length of 1 bit.
void SCI_enableSleep(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) sleep mode.
void SCI_setBaudRate(SCI_Handle sciHandle, const SCI_BaudRate_e baudRate)
Sets the serial communications interface (SCI) baud rate.
Denotes that a stop after the current receive/transmit sequence.
static uint16_t SCI_read(SCI_Handle sciHandle)
Reads data from the serial communications interface (SCI)
void SCI_enableTxFifoEnh(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit FIFO enhancements.
uint16_t SCI_getDataNonBlocking(SCI_Handle sciHandle, uint16_t *success)
Read data from the serial communications interface (Non-Blocking)
#define SCI_SCIRXST_RXRDY_BITS
Defines the location of the RXRDY bits in the SCIRXST register.
Denotes the fifo contains 1 word.
void SCI_disableRxFifoInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive FIFO interrupt.
void SCI_disableRxErrorInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive error interrupt.
volatile uint16_t SCITXBUF
SCI Transmit Data Buffer Register.
SCI_NumStopBits_e
Enumeration to define the serial communications interface (SCI) number of stop bits.
void SCI_setNumStopBits(SCI_Handle sciHandle, const SCI_NumStopBits_e numBits)
Sets the serial communications interface (SCI) number of stop bits.
Denotes the fifo contains 3 words.
void SCI_clearRxFifoOvf(SCI_Handle sciHandle)
Clears the Rx FIFO overflow flag.
Denotes a character length of 4 bits.
Defines the serial communications interface (SCI) object.
void SCI_resetTxFifo(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) transmit FIFO.
void SCI_disableParity(SCI_Handle sciHandle)
Disable the parity.
void SCI_disableAutoBaudAlign(SCI_Handle sciHandle)
Disable the serial communications interface (SCI) auto baud alignment.
SCI_CharLength_e
Enumeration to define the serial communications interface (SCI) character lengths.
Denotes a character length of 3 bits.
void SCI_enableRxFifo(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive FIFO.
void SCI_disableRxInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) receive interrupt.
static bool SCI_txReady(SCI_Handle sciHandle)
Determines if the serial communications interface (SCI) is ready to transmit.
void SCI_setTxDelay(SCI_Handle sciHandle, const uint_least8_t delay)
Sets the serial communications interface (SCI) transmit delay.
volatile uint16_t SCICTL2
SCI Control Register 2.
SCI_Priority_e
Enumeration to define the serial communications interface (SCI) emulation suspend priority...
volatile uint16_t rsvd_1
Reserved.
void SCI_enableLoopBack(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) loop back mode.
void SCI_setParity(SCI_Handle sciHandle, const SCI_Parity_e parity)
Sets the serial communications interface (SCI) parity.
void SCI_enableTxInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) transmit interrupt.
Contains public interface to various functions related to the central processing unit (CPU) object...
volatile uint16_t SCIRXBUF
SCI Receive Data Buffer Register.
uint16_t SCI_putDataNonBlocking(SCI_Handle sciHandle, uint16_t data)
Writes data to the serial communications interface (Non-Blocking)
void SCI_resetRxFifo(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) receive FIFO.
SCI_FifoStatus_e SCI_getRxFifoStatus(SCI_Handle sciHandle)
Gets the serial communications interface (SCI) receive FIFO status.
volatile uint16_t SCIRXEMU
SCI Receive Emulation Data Buffer Register.
Denotes a character length of 8 bits.
void SCI_disableTxWake(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) wakeup method.
void SCI_enableChannels(SCI_Handle sciHandle)
Enable the serial communications interface (SCI) transmit and receive channels.
volatile uint16_t SCIHBAUD
SCI Baud Register, High Bits.
void SCI_disableTxFifoEnh(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit FIFO enhancements.
void SCI_disableSleep(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) sleep mode.
SCI_Mode_e
Enumeration to define the serial communications interface (SCI) multiprocessor protocol mode...
static void SCI_write(SCI_Handle sciHandle, const uint16_t data)
Writes data to the serial communications interface (SCI)
SCI_FifoStatus_e SCI_getTxFifoStatus(SCI_Handle sciHandle)
Gets the serial communications interface (SCI) transmit FIFO status.
void SCI_putDataBlocking(SCI_Handle sciHandle, uint16_t data)
Writes data to the serial communications interface (Blocking)
Denotes a character length of 2 bits.
void SCI_clearTxFifoInt(SCI_Handle sciHandle)
Clears the Tx FIFO interrupt flag.
void SCI_disableTxInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit interrupt.
volatile uint16_t SCIFFRX
SCI FIFO Receive Register.
void SCI_enableRx(SCI_Handle sciHandle)
Enables the serial peripheral interface (SCI) receiver.
void SCI_disableRx(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) master/slave receive mode.
SCI_Parity_e
Enumeration to define the serial communications interface (SCI) parity.
volatile uint16_t SCIFFCT
SCI FIFO Control Register.
Denotes a character length of 5 bits.
Denotes the fifo contains 2 words.
SCI_BaudRate_e
Enumeration to define the serial communications interface (SCI) baud rates. This enumeration assume a...
Denotes the fifo is empty.
volatile uint16_t SCICCR
SCI Configuration Control Register.
void SCI_enableRxErrorInt(SCI_Handle sciHandle)
Enables the serial communications interface (SCI) receive error interrupt.
void SCI_disableTxFifoInt(SCI_Handle sciHandle)
Disables the serial communications interface (SCI) transmit FIFO interrupt.
volatile uint16_t SCIRXST
SCI Receive Status Register.
Denotes a character length of 7 bits.
void SCI_setTxFifoIntLevel(SCI_Handle sciHandle, const SCI_FifoLevel_e fifoLevel)
Sets the serial communications interface (SCI) transmit FIFO level for generating an interrupt...
Denotes the fifo contains 4 words.
void SCI_clearRxFifoInt(SCI_Handle sciHandle)
Clears the Rx FIFO interrupt flag.
Denotes the fifo contains 3 words.
volatile uint16_t SCILBAUD
SCI Baud Register, Low Bits.
SCI_Handle SCI_init(void *pMemory, const size_t numBytes)
Initializes the serial communications interface (SCI) object handle.
void SCI_resetChannels(SCI_Handle sciHandle)
Resets the serial communications interface (SCI) transmit and receive channels.