Path: utzoo!utgpu!cunews!cognos!attila!fozzi.ocunix.on.ca!latour!mcr From: mcr@Sandelman.OCUnix.on.ca (Michael Richardson) Newsgroups: comp.sys.amiga.programmer Subject: Re: ASDG DSB DTR control Message-ID: <1991Jun22.025147.10168@Sandelman.OCUnix.on.ca> Date: 22 Jun 91 02:51:47 GMT References: <91171.021857DXB132@psuvm.psu.edu> Organization: Sandelman Software Works, Debugging Department, Ottawa, ON Lines: 78 In article <91171.021857DXB132@psuvm.psu.edu> DXB132@psuvm.psu.edu writes: >This information was posted to the net a while ago, but it slipped by me. >Could someone with documentation on the ASDG dual serial board describe >the command extensions defined by ASDG for controlling DTR? I'd like to >be compatible. Thanks!!! My experience is that trying to send characters to the internal serial port while the DTR is down occasionally crashes serial.device. It has been awhile since I tried though. There is no problem sending characters to the ASDG board while DTR is down. From welmat/src/welmat/session/modemio.c: /* DTR.c -- handle DTR */ /****************************************/ /* Set com DTR line */ /* FALSE = DTR off; TRUE = dtr on */ /* I hate bit bashing. */ /****************************************/ SetInternalDTR(fd,set) MHANDLE fd; int set; { struct CIA *Ciab; char tbuf[20]; #ifdef DTR_DEBUG sprintf(tbuf,"DTR is %d\n",set); M_DEBUG(M_DEBUG_FATAL,tbuf); #endif Ciab=(struct CIA *)0xBFD000; Disable(); Ciab->ciaddra |= CIAF_COMDTR; /* Set DTR as output */ if (set) Ciab->ciapra &= ~CIAF_COMDTR; /* Set DTR low */ else Ciab->ciapra |= CIAF_COMDTR; /* Set DTR high */ Enable(); } /****************************************************/ /* ASDG Dual Serial Board (and presumably 4 board) */ /* DTR control support. */ /****************************************************/ #define SIOCMD_SETCTRLLINES 0x10 #define SIOB_RTSB 0 #define SIOB_DTRB 1 #define SIOB_RTSF (1<IOutil; ios->IOSer.io_Command=SIOCMD_SETCTRLLINES; ios->IOSer.io_Offset=SIOB_DTRF; if(set==TRUE) { ios->IOSer.io_Length=SIOB_DTRF; } else { ios->IOSer.io_Length=0; } DoIO(ios); } /*************************************************/ -- :!mcr!: | The postmaster never | So much mail, Michael Richardson | resolves twice. | so little time. HOME: mcr@sandelman.ocunix.on.ca Bell: (613) 237-5629 Small Ottawa nodes contact me about joining ocunix.on.ca!