From owner-freebsd-usb@FreeBSD.ORG Tue Apr 29 19:57:52 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5154B1065672 for ; Tue, 29 Apr 2008 19:57:52 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id DA4468FC19 for ; Tue, 29 Apr 2008 19:57:51 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.156] (account mc467741@c2i.net [62.113.132.156] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 818040074; Tue, 29 Apr 2008 21:57:50 +0200 From: Hans Petter Selasky To: "Xiaofan Chen" Date: Tue, 29 Apr 2008 21:59:10 +0200 User-Agent: KMail/1.9.7 References: <200804252349.25954.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804292159.11467.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB Mass Storage Device with HPS Stack X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 19:57:52 -0000 On Saturday 26 April 2008, Xiaofan Chen wrote: > http://sourceforge.net/projects/pic18fusb Hi, This source code is not USB standard compliant and it is not good! For example: //Clear feature void clear_feature(void){ parity.msdi_parity = 0; //reset ep1 in parity UEP1bits.EPSTALL = 0; ep0Bi.CNT = 0; //send zero length packet ep0Bi.STAT = 0x80 | 0x40 | 0x08; send_csw(); //send csw } At least this function should check which endpoint you clear the stall on. Maybe you can get my USB stack working on your PIC board? It now supports the Device Side aswell as the host side! See "usbd_handle_request" in: http://www.selasky.org/hans_petter/isdn4bsd/sources/src/sys/dev/usb/usb_transfer.c Mass storage driver: http://www.selasky.org/hans_petter/isdn4bsd/sources/src/sys/dev/usb/ustorage_fs.c --HPS