Exemplo n.º 1
0
/*
 *  ======== UARTUtils_systemPutch ========
 */
Void UARTUtils_systemPutch(Char a)
{    
    /* Make sure UART is initialized */
    if (systemHandle) {
        UART_writePolling(systemHandle, &a, 1);
    }
}
Exemplo n.º 2
0
/*
 *  ======== UARTUtils_systemAbort ========
 */
Void UARTUtils_systemAbort(String str)
{
    /* Make sure UART is initialized */
    if (systemHandle) {
        UART_writePolling(systemHandle, str, strlen(str));
    }
}
Exemplo n.º 3
0
/*!
 *  @brief  writes a char to the UART Console
 *
 *  @param  	a - char to write
 *  @return     None
 */
Void UARTConsole_putch(Char a)
{
	/* Make sure UART is initialized */
	if (handle)
	{
		UART_writePolling(handle, (void *) &a, 1);
	}
}
Exemplo n.º 4
0
/*
 *  ======== UARTUtils_loggerIdleSend ========
 *  Plugged into LoggerIdle to send log data during idle.
 */
Int UARTUtils_loggerIdleSend(UChar *a, Int size)
{    
    /* Make sure UART is initialized */    
    if (loggerHandle) {
        /* 
         * Write up to 16 bytes at a time.  This function runs during idle and
         * should not tie up other idle functions from running.  The idle loop
         * is generally short enough that this function will run again before all
         * 16 bytes have been transmitted from the FIFO.
         */
        if (size < 16) {
            return (UART_writePolling(loggerHandle, (Char *)a, size));
        }
        else {
            return (UART_writePolling(loggerHandle, (Char *)a, 16));
        }
    }
    else {
        return (0);
    }
}