NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » How to convert serial data from uart_read() to const char*
November 22, 2011 by saleem |
Hi, I have a function as below "do_simple_display()" in it I am reading char using uart_read(). I want to call the function scroll_display(const char *s) how do I convert or make a string to pass to scroll_display() function? Thx Saleem void do_simple_display() { ledarray_blank(); uint8_t offset = 0; char x = ' '; while(1){ x = uart_read(); if(x == 'z'){ ledarray_blank(); offset = 0; } else { //render the charater we just got font_display(x,offset); // I want to build my string here
} //then call scroll_display(my string) } void scroll_display(const char *s) { } |
---|
Please log in to post a reply.
Did you know that NerdKits has been featured in the MIT Undergraduate Research Journal? Learn more...
|