Availability |
All terminals |
Description |
Sets the level of the RTS line of the USB-VCP COM-port |
Syntax |
void SetRTS( int level ); |
Arguments |
int level
Two values are defined for level:
ON |
The RTS line is made active. |
OFF |
The RTS line is made unactive. |
|
Returns |
None |
Remarks |
SetRTS() has no effect on the USB-CDC driver. Use SetRING() as alternative.
The default state of the RING line is OFF (Note that the default state of RTS is ON)
|
Example |
#include <stdio.h>
#include "lib.h"
void main( void )
{
int key = -1;
ComOpen( COM9 );
for(;;)
{
printf("\nPress any key");
ResetKey();
key = WaitKey();
SetRTS((key == TRIGGER_KEY) ? ON : OFF);
Idle();
}
}
|