Mail Archives: djgpp/2004/04/23/07:15:26
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | "PT" <ptalloen AT hotmail DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | PMCOM10 Stops working after a period ?
|
Date: | Fri, 23 Apr 2004 13:11:11 +0200
|
Organization: | Planet Internet
|
Lines: | 62
|
Message-ID: | <c6atq1$5i5$1@reader11.wxs.nl>
|
NNTP-Posting-Host: | u212-239-176-5.adsl.pi.be
|
X-Trace: | reader11.wxs.nl 1082718849 5701 212.239.176.5 (23 Apr 2004 11:14:09 GMT)
|
X-Complaints-To: | abuse AT planet DOT nl
|
NNTP-Posting-Date: | 23 Apr 2004 11:14:09 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2800.1409
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1409
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
PMCOM10 Stops working after a period of time? No receipt nor transmission
of data possible any more.
Is PMCOM10 the latest version ?
Can somebody help me ?
Thanks,
Patrick
Test situation:
PC1(win32 appl) 20 byte -> PC2 (pmcom1)
PC1(win32 appl) <-20 byte PC2(pmcom1)
PC2 Program:
//--------------------------------------------------------------------------
-
#include <stdio.h>
#include <string.h>
#include <com.h>
int main()
{
int key=0;
int i;
char buf1[256];
COMInit();
i=COMPortOpen(COM4,115200,8,'N',1,0,NULL);
if (i<0){
printf("COM%d open error %d\n\r",COM4+1,i);
}
else {
printf("COM%d open OK\n\r",COM4+1);
do {
if(kbhit()){
key=getch();
}
if ((nUsed=COMRXBufferUsed(COM4))>0)
{
if ((nError = COMReadBuffer(COM4, buf, NULL, nUsed)) == 0)
{
printf("%s\n\r",buf);
COMWriteBuffer(COM4,buf,0,nUsed,0);
} // end if
} // end if
} while (key!=ESCAPE);
} // end if
COMShutDown();
}
//----------------------------------------------------------------------
- Raw text -