| Availability |
All terminals |
| Description |
Sets the level of the DTR line of the USB-VCP or USB-CDC COM-port |
| Syntax |
void SetDTR( int level ); |
| Arguments |
int level
Two values are defined for level:
| ON |
The DTR line is made active. |
| OFF |
The DTR line is made inactive. |
|
| Returns |
None |
| Remarks |
SetDTR() has no effect when used on other communications ports.
The default state of the DTR line is OFF.
|
| Example |
#include <stdio.h>
#include "lib.h"
void main( void )
{
int key = -1;
ComOpen( COM9 );
for(;;)
{
printf("\nPress any key");
ResetKey();
key = WaitKey();
SetDTR((key == TRIGGER_KEY) ? ON : OFF);
Idle();
}
}
|