Functions | |
int | NutIfStreamReadTran (NUTDEVICE *dev, char *data, int size) |
Read from a stream device translating non printables. | |
int | NutIfStreamWriteTran (NUTDEVICE *dev, CONST char *data) |
Translate and write a string to a stream device. |
|
Read from a stream device translating non printables. This call works like NutIfStreamRead(), but translates character codes below 33, above 126 or equal 34 into their hex representation prepended by a backslash and the letter x. Backslashes are duplicated and the complete string is terminated by character code zero. This offers the ability to store binary data in printable strings.
|
|
Translate and write a string to a stream device. This call works like NutIfStreamWrite(), but translates any backslash followed by the letter x followed by two hexadecimal uppercase digits into the binary representation. Simple backslashes are expected to be duplicated and the complete string must be terminated by character code zero. This offers the ability to write binary data from a printable strings. The data isn't immediately transfered to the physical device, but buffered in a transmit buffer. Transmission starts either when the buffer is full or when this function is called with a zero data pointer.
|