From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26474 invoked by alias); 27 May 2009 17:35:30 -0000 Received: (qmail 26464 invoked by uid 22791); 27 May 2009 17:35:29 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from 30.mail-out.ovh.net (HELO 30.mail-out.ovh.net) (213.186.62.213) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 27 May 2009 17:35:24 +0000 Received: (qmail 23707 invoked by uid 503); 27 May 2009 17:35:28 -0000 Received: from gw2.ovh.net (HELO mail98.ha.ovh.net) (213.251.189.202) by 30.mail-out.ovh.net with SMTP; 27 May 2009 17:35:28 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 27 May 2009 17:35:22 -0000 Received: from nap13-1-82-66-182-22.fbx.proxad.net (HELO ?192.168.0.10?) (82.66.182.22) by ns0.ovh.net with SMTP; 27 May 2009 17:35:21 -0000 Cc: ecos-discuss@ecos.sourceware.org Message-Id: <06FBFDFF-BA5D-4DDE-967B-49F7725EAEB0@niebert.com> From: Peter Niebert To: Bart Veer In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Wed, 27 May 2009 17:35:00 -0000 References: <26F9EA9E-04C8-4BAF-869F-E7DDB41CC0A2@niebert.com> X-Ovh-Tracer-Id: 8780048948867331748 X-Ovh-Remote: 82.66.182.22 (nap13-1-82-66-182-22.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] SPI and 9 bit transfers (on AT91) X-SW-Source: 2009-05/txt/msg00119.txt.bz2 Just to be sure, this means that the count would be "shorts" rather=20=20 than "bytes" in the case of transfers between 9 and 16 bits? I will soon be able to post a patched version of the at91_spi driver=20=20 that allows for different bit length transmits. Cheers and thanks for eCos, again and again. -- Peter Le 27 mai 09 =E0 18:57, Bart Veer a =E9crit : >>>>>> "Peter" =3D=3D Peter Niebert writes: > > Peter> SPI transfers can vary depending on the protocol between 8 > Peter> and 16 bits. The generic SPI API suggests transfers in > Peter> multiples of 8bits though. How should this be interpreted > Peter> in cases of protocols with 9 or more bits? I suppose that > Peter> there is no other way than splitting such transfers to two > Peter> bytes. It could be acceptable to have this transparent in > Peter> the generic SPI API, but the byte order has to be clarified > Peter> somewhere. > > The current SPI already defines semantics for transfers of more than 8 > bits. See http://ecos.sourceware.org/docs-latest/ref/spi-api.html, > section "Simple Transfers", and the description of the tx_data > argument. Basically tx_data will be interpreted as an array of shorts > instead of bytes, and only the bottom n bits of each short will be > transferred. > > These semantics were appropriate for the ColdFire QSPI device, and the > first eCos SPI driver targetted that device. It also seems like the > simplest semantics from the perspective of application developers. I > do not know how well it maps onto the AT91 hardware. > > Bart > > --=20 > Bart Veer eCos Configuration=20=20 > Architect > eCosCentric Limited The eCos experts http://www.ecoscentric.com/ > Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223=20=20 > 245571 > Registered in England and Wales: Reg No 4422071. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss