cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,089 Views
Registered: ‎03-31-2010

help with uartlite function

i like to receive integer from uartlite ( 1 to 30 ) who know the function used in C to do the work ??? i see the xilinx drivers but i find receive byte by byte !!!! please the function AND HOW TO USE IT !!

thx,

regards

0 Kudos
1 Reply
Highlighted
Explorer
Explorer
2,077 Views
Registered: ‎10-01-2008

Hi,

 

After you receive the bytes from UART, you may store it in an char array and use the atoi() function to convert it to an integer. Would this work for you?

 

Some examples of how this function is used.

 

http://www.codecogs.com/reference/c/stdlib.h/atoi.php

 

http://www.cplusplus.com/reference/clibrary/cstdlib/atoi/

 

Hope this will help you.

 

-Yan Shun Li

0 Kudos