From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13544 invoked by alias); 31 Jan 2007 01:13:11 -0000 Received: (qmail 13530 invoked by uid 22791); 31 Jan 2007 01:13:09 -0000 X-Spam-Check-By: sourceware.org Received: from bay0-omc2-s19.bay0.hotmail.com (HELO bay0-omc2-s19.bay0.hotmail.com) (65.54.246.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 31 Jan 2007 01:13:03 +0000 Received: from hotmail.com ([64.4.48.89]) by bay0-omc2-s19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 30 Jan 2007 17:13:02 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Jan 2007 17:13:01 -0800 Message-ID: Received: from 64.4.48.123 by by137fd.bay137.hotmail.msn.com with HTTP; Wed, 31 Jan 2007 01:13:00 GMT X-Sender: jetjiang@hotmail.com In-Reply-To: <591a86200701301655n5763facwb31e7abd33dd6cf1@mail.gmail.com> From: "jiang jet" To: qiongwu23@gmail.com Cc: ecos-discuss@ecos.sourceware.org Bcc: Date: Wed, 31 Jan 2007 01:13:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed 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] at91sam7 spi test code X-SW-Source: 2007-01/txt/msg00181.txt.bz2 All device drivers in Ecos are almost the same.you have to implement two MACRO, DEVTAB_ENTRY,DEVIO_ENTRY, here you can do the job you decribe, initialization..read write register interrupt and so on.. BTW, you have to make sure ur bus work correctly, or else it will be a nightmare for u to debug device driver... jet >From: "Frank Wu" >To: "Frank Wu" , ecos-discuss >Subject: Re: [ECOS] at91sam7 spi test code >Date: Tue, 30 Jan 2007 16:55:35 -0800 > >Hi Andrew, > >It is very easy to get a SPI eeprom sample chip on line to be the >SPI device. >Maybe my question is not addressed clearly. What I want is how to >use >SPI driver in eCos porting to at91sam7 evaluation board (I have the >board). Something like, >1) Initialize the spi port >2) write >3) read >4) use in interrupt/pulling mode > >Thanks > >Frank > > >On 1/30/07, Andrew Lunn wrote: >>On Tue, Jan 30, 2007 at 12:36:40PM -0800, Frank Wu wrote: >> > Dear All, >> > >> > I want to use SPI bus on a sam7 uC. Where can I find SPI test >>code to >> > make sure the SPI driver works? >> >>This is not easy. You need a device on the bus and a driver for the >>device. It is not really possible to test the SPI bus driver >>without >>testing the SPI device device driver at the same time. >> >>So i suggest you just write your device device driver and maybe >>connect a logic analyser/3-channel digital oscilloscope to the SPI >>bus. >> >> Andrew >> > >-- >Before posting, please read the FAQ: >http://ecos.sourceware.org/fom/ecos >and search the list archive: >http://ecos.sourceware.org/ml/ecos-discuss > _________________________________________________________________ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss