From owner-freebsd-questions Wed Jul 31 9:39:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51C4737B40D for ; Wed, 31 Jul 2002 09:39:39 -0700 (PDT) Received: from hotmail.com (f305.law10.hotmail.com [64.4.14.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC4FA43E4A for ; Wed, 31 Jul 2002 09:39:38 -0700 (PDT) (envelope-from jshamlet@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 31 Jul 2002 09:39:38 -0700 Received: from 155.104.239.16 by lw10fd.law10.hotmail.msn.com with HTTP; Wed, 31 Jul 2002 16:39:38 GMT X-Originating-IP: [155.104.239.16] From: "Seth Henry" To: freebsd-questions@freebsd.org Subject: termios.h question Date: Wed, 31 Jul 2002 11:39:38 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 31 Jul 2002 16:39:38.0570 (UTC) FILETIME=[DC913AA0:01C238B0] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I am working on porting some Linux code to FreeBSD. Specifically, I received a sample program from CrystalFontz to drive their CFA633 intelligent LCD module. The problem is in the serial I/O file. There are several references to defines that aren't in the FreeBSD termios.h file. In particular, this is what I get when I try to compile their code: serial.c: In function `Serial_Init': serial.c:91: `IUCLC' undeclared (first use in this function) serial.c:91: (Each undeclared identifier is reported only once serial.c:91: for each function it appears in.) serial.c:95: `OLCUC' undeclared (first use in this function) serial.c:96: `OFILL' undeclared (first use in this function) serial.c:96: `OFDEL' undeclared (first use in this function) serial.c:96: `NLDLY' undeclared (first use in this function) serial.c:96: `CRDLY' undeclared (first use in this function) serial.c:96: `TABDLY' undeclared (first use in this function) serial.c:96: `BSDLY' undeclared (first use in this function) serial.c:96: `VTDLY' undeclared (first use in this function) serial.c:96: `FFDLY' undeclared (first use in this function) serial.c:97: `NL0' undeclared (first use in this function) serial.c:97: `CR0' undeclared (first use in this function) serial.c:97: `TAB0' undeclared (first use in this function) serial.c:97: `BS0' undeclared (first use in this function) serial.c:97: `VT0' undeclared (first use in this function) serial.c:97: `FF0' undeclared (first use in this function) The code in question is: //input modes term.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|INPCK|ISTRIP|INLCR|IGNCR|ICRNL |IUCLC|IXON|IXANY|IXOFF|IMAXBEL); term.c_iflag |= IGNPAR; //output modes term.c_oflag &= ~(OPOST|OLCUC|ONLCR|OCRNL|ONOCR|ONLRET|OFILL |OFDEL|NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY); term.c_oflag |= NL0|CR0|TAB0|BS0|VT0|FF0; //control modes term.c_cflag &= ~(CSIZE|PARENB|CRTSCTS|PARODD|HUPCL); term.c_cflag |= CREAD|CS8|CSTOPB|CLOCAL; //local modes term.c_lflag &= ~(ISIG|ICANON|IEXTEN|ECHO|FLUSHO|PENDIN); term.c_lflag |= NOFLSH; //set baud rate cfsetospeed(&term, brate); cfsetispeed(&term, brate); //set new device settings if (tcsetattr(handle, TCSANOW, &term) != 0) { printf("tcsetattr failed\n"); return(4); } Some of the defines are in the FreeBSD termios.h, but I'm not sure if they are trustworthy. Can anyone tell me what these defines should be? Also, aren't these part of the POSIX spec? If so, what's the deal? Thanks, Seth Henry _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message