From owner-freebsd-questions Fri Oct 12 4:46: 2 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mephi.ru (danko.mephi.ru [194.67.67.34]) by hub.freebsd.org (Postfix) with ESMTP id 4920F37B408 for ; Fri, 12 Oct 2001 04:45:47 -0700 (PDT) Received: from p1 (htsc.mephi.ru [194.67.66.9]) by mephi.ru (8.9.3/8.9.3) with SMTP id NAA62880 for ; Fri, 12 Oct 2001 13:13:53 +0400 (MSD) (envelope-from risky@stabilis.ru) Message-Id: <200110120913.NAA62880@mephi.ru> Date: Fri, 12 Oct 2001 13:32:52 +0400 To: freebsd-questions@FreeBSD.ORG From: "Sergey V. Efimoff" Subject: tried to use I2C via lpbb... failed :( Reply-To: risky@stabilis.ru Organization: Stabilis Systems, Inc. X-Mailer: Opera 5.12 build 932b X-Priority: 3 (Normal) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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, All! I recently tried to use iicbus on lpbb. I have assembled the device described in lpbb(4) and connected it; the kernel configuration contains device iic device iicbb device lpbb device iicbus So dmesg reports that iic0 is detected. Then I started to develop application with fd=open("/dev/iic0", O_RDWR); where `open` is called successfuly and returns file descriptor 3 (the first free descriptor in case we are not using, for example, GDB). Use of `open` on "/dev/iic1" returns "Device not configured", which is right. So, device is configured, up and opened successfully. Then I tried to call result = ioctl(fd,I2CRSTCARD); result is -1 and errno is EBADF (Bad file descriptor) as on any other random descriptor which was not bind to "/dev/iic0". And, finally, result = ioctl(fd,I2CSTART); returns -1 with errno EINVAL (Invalid argument) or traps the kernel (Page Not Present). I have found no documentation about IICBUS except man's which give almost no information about programming it. Please, help me to solve this problem. Best Regards, Thank You In Advance Sergey V. Efimoff Stabilis Systems, Inc. General Director 142100 Komsomolskaja 81-169 Podolsk Moscow Region Russia Tel./Fax +7-095-3245586 E-Mail: stabilis@stabilis.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message