public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Frank Wu <qiongwu23@gmail.com>
Cc: ecos-discuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] at91sam7 spi test code
Date: Wed, 31 Jan 2007 07:17:00 -0000	[thread overview]
Message-ID: <20070131071733.GI22661@lunn.ch> (raw)
In-Reply-To: <591a86200701301655n5763facwb31e7abd33dd6cf1@mail.gmail.com>

On Tue, Jan 30, 2007 at 04:55:35PM -0800, Frank Wu wrote:
> 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

O.K. So you need to read the manual:

http://ecos.sourceware.org/docs-latest/ref/io-spi.html

There is already a driver for the AT91SAM7S and AT91SAM7X, so there is
no need to write any new driver code. 

What you need is a structure for each device on the bus. eg see
packages/devs/spi/arm/eb55/current/src/spi_eb55.c which declares a
DataFlash device on the bus. And you need a device drives for the
device, eg  packages/disk/generic/mmc/current/src

Unfortunately, i don't think there is a complete example in anoncvs of
all the parts coming together for one development board :-(

    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

  parent reply	other threads:[~2007-01-31  7:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 20:36 Frank Wu
2007-01-30 20:51 ` Andrew Lunn
2007-01-31  0:55   ` Frank Wu
2007-01-31  1:13     ` jiang jet
2007-01-31  7:17     ` Andrew Lunn [this message]
2007-01-30 22:55 ` [ECOS] Fwd: " Nikita Tabatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070131071733.GI22661@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=qiongwu23@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).