Click here to Skip to main content
15,896,118 members
Articles / General Programming

AVRILOS SysTick Timer enhancements

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
8 Nov 2011CDDL9 min read 20.6K   160   5  
Bug fixes and enhancements on AVRILOS SysTick module

#ifndef UART_H
#define UART_H

#define ESC            0x1b


/*********************************************************************
* Function: f_ConfigSerial
* Configure UART Hardware and setup FIFO
* Input:
*   None
* Output:
*   None
**********************************************************************/
extern void f_ConfigSerial(void);

/* Send a 'clear screen' to a VT100 terminal */
extern void f_Uart_ClrScr(void);
/* Send a 'new line' */
extern void f_Uart_NL(void);

/*********************************************************************
* Function: f_Uart_PutChar
* Put Char to Tx FIFO
* Input:
*   Character to transmit
* Output:
*   1: if success
*   0: if Tx FIFO full
**********************************************************************/
extern bool f_Uart_PutChar(INT8 c);

/*********************************************************************
* Function: f_Uart_GetChar
* Get Char from Rx FIFO
* Input:
*   None
* Output:
*   If Rx FIFO empty 0xFFFF (-1)
*   else result is 0x00CC where CC character received
**********************************************************************/
extern INT16  f_Uart_GetChar(void);

/*********************************************************************
* Function: f_Uart_PutStr
* Put string to Tx FIFO
* Input:
*   Null terminated String to send
* Output:
*   1: success (always)
* If string length is larger than FIFO this routine blocks and waits
* until Tx FIFO is empty again. In order to avoid such delays TxFIFO 
* should be larger than your larger string
**********************************************************************/
extern bool f_Uart_PutStr(INT8 s[]);

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Systems Engineer AI ZeroCaliber Ltd
Cyprus Cyprus
More than 15 year of Embedded Systems development designing both hardware & software.
Experience with Product Development,lab prototypes and Automated Testers, Sensors, motors and System Engineering. Have used numerous micro-controllers/processors, DSP & FPGAs.

Please check AI ZeroCaliber if you need any help.
You may find also my personal site: Ilialex and my blog site: Ilialex Blog

Comments and Discussions