| ??? 10/27/03 17:30 Read: times |
#57340 - RE: Off Topic: Set RTS / DTR Responding to: ???'s previous message |
Werner,
On C++ under WindowsCE.NET it looks like this bool initComms(void) { DCB dcb; COMMTIMEOUTS ct; if(hCommPort==INVALID_HANDLE_VALUE) hCommPort=CreateFile (_T"COM1:"),GENERIC_READ|GENERIC_WRITE, 0,NULL,OPEN_EXISTING,0,NULL); if(hCommPort==INVALID_HANDLE_VALUE) return FALSE; dcb.DCBlength=sizeof(dcb); GetCommState(hCommPort,&dcb); dcb.BaudRate=9600; dcb.fOutxCtsFlow=FALSE; dcb.fRtsControl=TRUE; dcb.fDtrControl=DTR_CONTROL_ENABLE; dcb.fOutxDsrFlow=FALSE; dcb.fOutX=FALSE; dcb.fInX=FALSE; dcb.ByteSize=8; dcb.Parity=NOPARITY; dcb.StopBits=ONESTOPBIT; SetCommState(hCommPort,&dcb); .............................. return true; } After initialisation you can use EscapeCommFunction(hCommPort,SETRTS); EscapeCommFunction(hCommPort,CLRRTS); EscapeCommFunction(hCommPort,SETDTR); EscapeCommFunction(hCommPort,CLRDTR); Hope it helps a little. I did not check but I guess that you can write similar programme under W2K. Regards, George |
| Topic | Author | Date |
| Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Exclusive access | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
| RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 | |
RE: Off Topic: Set RTS / DTR | 01/01/70 00:00 |



