Availability | All terminals |
Description | PutString() transmits a string through the serial communications port that was last opened by ComOpen(). |
Syntax | int PutString( char *data ); |
Arguments |
char *datadata is the string 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 PutString(buffer); for(;;) { Idle(); // Very important to lower the power consumption } } |