From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 12 05:51:19 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B75F37B401 for ; Thu, 12 Jun 2003 05:51:19 -0700 (PDT) Received: from hotmail.com (bay4-f32.bay4.hotmail.com [65.54.171.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id D103F43F3F for ; Thu, 12 Jun 2003 05:51:18 -0700 (PDT) (envelope-from oykai@msn.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 12 Jun 2003 05:51:18 -0700 Received: from 218.104.107.71 by by4fd.bay4.hotmail.msn.com with HTTP; Thu, 12 Jun 2003 12:51:18 GMT X-Originating-IP: [218.104.107.71] X-Originating-Email: [oykai@msn.com] From: "ouyang kai" To: freebsd-hackers@freebsd.org Date: Thu, 12 Jun 2003 20:51:18 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 12 Jun 2003 12:51:18.0706 (UTC) FILETIME=[5158E120:01C330E1] Subject: how can I hack my com interrupt? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 12:51:19 -0000 Hi, guys, I want to hack my com interface to specail purpose. I want to use the Modem Status Register. When the high 4 bits change, it could spring an interrupt. So, I set the Intertupt Enable Register(in sioattach fuction) to the interrupt, which support changing in the state of the modem input pins(IER_EMSC). I set the MSR successfully. But when the MSR state change, the siointr print anything(I add a printf as the first line of the function). I found there are 4 level interrupt(IIR). I want to set the IIR 4 level to support Modem status. But I couldn't set the Interrupt Identification Register, why? the code of set IIR is in the sioattach function: sio_setreg(com, com_iir, IIR_MLSC); I found the com_iir content is not changed. How can I do that? My OS is FreeBSD4.8-Release. Thanks a lot! Best Regards Ouyang Kai _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail