imabot2/serialib

Question about read/write char

Closed this issue · 1 comments

It can read or write Byte char. how to read/write Byte unsigned char(0-255)?

You can cast the value returned by the funcion readChar()

unsigned char val;
val = (unsigned char) readChar  (pByte);

Check this page (sorry, it's in French) : https://lucidar.me/fr/c-class/lesson-03-04-type-casting/