AT example.cydsn/Generated_Source/PSoC5/UART.c
void UART_WriteTxData(uint8 txDataByte) 
    {
        /* If not Initialized then skip this function*/
        if(UART_initVar != 0u)
        {
            #if(UART_TXBUFFERSIZE > UART_FIFO_LENGTH)

                /* Disable Tx interrupt. */
                /* Protect variables that could change on interrupt. */
                #if(UART_TX_INTERRUPT_ENABLED)
                    UART_DisableTxInt();
                #endif /* End UART_TX_INTERRUPT_ENABLED */

                if( (UART_txBufferRead == UART_txBufferWrite) &&
                    ((UART_TXSTATUS_REG & UART_TX_STS_FIFO_FULL) == 0u) )
                {
                    /* Add directly to the FIFO. */
                    UART_TXDATA_REG = txDataByte;
                }
                else
                {
                    if(UART_txBufferWrite >= UART_TXBUFFERSIZE)
                    {
                        UART_txBufferWrite = 0u;
                    }

                    UART_txBuffer[UART_txBufferWrite] = txDataByte;

                    /* Add to the software buffer. */
                    UART_txBufferWrite++;

                }

                /* Enable Tx interrupt. */
                #if(UART_TX_INTERRUPT_ENABLED)
                    UART_EnableTxInt();
                #endif /* End UART_TX_INTERRUPT_ENABLED */

            #else /* UART_TXBUFFERSIZE > UART_FIFO_LENGTH */

                /* Add directly to the FIFO. */
                UART_TXDATA_REG = txDataByte;

            #endif /* End UART_TXBUFFERSIZE > UART_FIFO_LENGTH */
        }
    }
/*******************************************************************************
    * Function Name: UART_WriteTxData
    ********************************************************************************
    *
    * Summary:
    *  Write a byte of data to the Transmit FIFO or TX buffer to be sent when the
    *  bus is available. WriteTxData sends a byte without checking for buffer room
    *  or status. It is up to the user to separately check status.
    *
    * Parameters:
    *  TXDataByte: byte of data to place in the transmit FIFO
    *
    * Return:
    * void
    *
    * Global Variables:
    *  UART_txBuffer - RAM buffer pointer for save data for transmission
    *  UART_txBufferWrite - cyclic index for write to txBuffer,
    *    incremented after each byte saved to buffer.
    *  UART_txBufferRead - cyclic index for read from txBuffer,
    *    checked to identify the condition to write to FIFO directly or to TX buffer
    *  UART_initVar - checked to identify that the component has been
    *    initialized.
    *
    * Reentrant:
    *  No.
    *
    *******************************************************************************/
Function Name: UART_WriteTxData
Summary:
Write a byte of data to the Transmit FIFO or TX buffer to be sent when the
bus is available. WriteTxData sends a byte without checking for buffer room
or status. It is up to the user to separately check status.

byte of data to place in the transmit FIFO

void

Global Variables:
UART_txBuffer - RAM buffer pointer for save data for transmission
UART_txBufferWrite - cyclic index for write to txBuffer,
incremented after each byte saved to buffer.
UART_txBufferRead - cyclic index for read from txBuffer,
checked to identify the condition to write to FIFO directly or to TX buffer
UART_initVar - checked to identify that the component has been
initialized.

No.
Function Name : UART_WriteTxData Summary : Write a byte of data to the Transmit FIFO or TX buffer to be sent when the bus is available . WriteTxData sends a byte without checking for buffer room or status . It is up to the user to separately check status . byte of data to place in the transmit FIFO void Global Variables : UART_txBuffer - RAM buffer pointer for save data for transmission UART_txBufferWrite - cyclic index for write to txBuffer incremented after each byte saved to buffer . UART_txBufferRead - cyclic index for read from txBuffer checked to identify the condition to write to FIFO directly or to TX buffer UART_initVar - checked to identify that the component has been initialized . No .
void UART_WriteTxData(uint8 txDataByte) 
    {
        if(UART_initVar != 0u)
        {
            #if(UART_TXBUFFERSIZE > UART_FIFO_LENGTH)
                #if(UART_TX_INTERRUPT_ENABLED)
                    UART_DisableTxInt();
                #endif 
                if( (UART_txBufferRead == UART_txBufferWrite) &&
                    ((UART_TXSTATUS_REG & UART_TX_STS_FIFO_FULL) == 0u) )
                {
                    UART_TXDATA_REG = txDataByte;
                }
                else
                {
                    if(UART_txBufferWrite >= UART_TXBUFFERSIZE)
                    {
                        UART_txBufferWrite = 0u;
                    }
                    UART_txBuffer[UART_txBufferWrite] = txDataByte;
                    UART_txBufferWrite++;
                }
                #if(UART_TX_INTERRUPT_ENABLED)
                    UART_EnableTxInt();
                #endif 
            #else 
                UART_TXDATA_REG = txDataByte;
            #endif 
        }
    }
void UART_WriteTxData ( uint8 txDataByte ) { if ( UART_initVar != 0u ) { #if ( UART_TXBUFFERSIZE > UART_FIFO_LENGTH ) #if ( UART_TX_INTERRUPT_ENABLED ) UART_DisableTxInt ( ) ; #endif if ( ( UART_txBufferRead == UART_txBufferWrite ) && ( ( UART_TXSTATUS_REG & UART_TX_STS_FIFO_FULL ) == 0u ) ) { UART_TXDATA_REG = txDataByte ; } else { if ( UART_txBufferWrite >= UART_TXBUFFERSIZE ) { UART_txBufferWrite = 0u ; } UART_txBuffer [ UART_txBufferWrite ] = txDataByte ; UART_txBufferWrite ++ ; } #if ( UART_TX_INTERRUPT_ENABLED ) UART_EnableTxInt ( ) ; #endif #else UART_TXDATA_REG = txDataByte ; #endif } }
Function Name: UART_WriteTxData
 Summary:
  Write a byte of data to the Transmit FIFO or TX buffer to be sent when the
  bus is available.
Function Name : UART_WriteTxData Summary : Write a byte of data to the Transmit FIFO or TX buffer to be sent when the bus is available .
/* If not Initialized then skip this function*/ /* Disable Tx interrupt. */ /* Protect variables that could change on interrupt. */ /* End UART_TX_INTERRUPT_ENABLED */ /* Add directly to the FIFO. */ /* Add to the software buffer. */ /* Enable Tx interrupt. */ /* End UART_TX_INTERRUPT_ENABLED */ /* UART_TXBUFFERSIZE > UART_FIFO_LENGTH */ /* Add directly to the FIFO. */ /* End UART_TXBUFFERSIZE > UART_FIFO_LENGTH */