Availability | All terminals |
Description | PutnString2() transmits length number of characters of data through the specified srial communications port. |
Syntax | int PutnString2( char *data, int length ); |
Arguments |
char *datadata is the string containing characters to be transmitted.int lengthlength is the number of characters to be transmitted. |
Returns | OK on success or ERROR on failure. |
Remarks |
- When no port is currently open, ERROR will be returned. - Note that on the default port (COM9) is automatically opened at startup. |
Example |
#include <stdio.h> #include "lib.h" void main( void ) { char buffer[] = "This is a string"; ComOpen( COM9 ); // Open the COM port for USB-VCP for(;;) { PutnString2(COM9, buffer, 4); Delay(50); } } |