On 07/30/2010 02:10 PM, Razvan-Ionut Stoian wrote:
Point taken.
However, when I decided to play with the SPI interface on my TS7200, I
had exactly the same problem as the original poster. If you were a
beginner, would you start programming interfaces in kernel space?
|
No. Good point.
I will take a look and see if I can release the SPI driver that I
have. It may make doing things on SPI a bit easier.
ÂÂÂ -Brett
R.
--- On Fri, 7/30/10, Breton M. Saunders m("ntlworld.com","breton.saunders");"><>
wrote:
From: Breton M. Saunders m("ntlworld.com","breton.saunders");"><>
Subject: Re: [ts-7000] 7260 SPI C Programming Example
To: m("yahoogroups.com","ts-7000");">
Cc: "Razvan-Ionut Stoian" m("yahoo.com","razvan_ionut_stoian");"><>
Date: Friday, July 30, 2010, 6:11 AM
Â
It isn't the code style that worries me.
It is the myth that one can write a reliable driver (real-time or not)
as a user mode program that concerns me greatly.
There is a reason why real drivers run inside the kernel, and do not
use peekpoke.h!
ÂÂÂ -Brett
On 07/30/2010 03:00 AM, Razvan-Ionut Stoian wrote:
[Attachment(s)
from Razvan-Ionut Stoian included below]
I once interfaced an external ADC
(MCP3208)
via SPI, Try the files in the attachment (peekpoke.h, spi.h and
ringbuffer.h and other source files were taken from TS ftp server and
other sources).
The coding style would make a professional programmer pretty unhappy,
but the code does the job.
R.
--- On Thu, 7/29/10, yavin229 m("hotmail.com","yavin");">< com>
wrote:
From: yavin229 m("hotmail.com","yavin");">< com>
Subject: [ts-7000] 7260 SPI C Programming Example
To: m("yahoogroups.com","ts-7000");"> .com
Date: Thursday, July 29, 2010, 3:14 AM
Â
Hi, I am trying to find some samples of code
that
exemplifies how to access the output of a device on the SPI bus. I have
everything physically connected and as I understand it, I need to set
one of the DIO channels (CS?) high to signal a conversion on my slave
device. That part should be simple enough but the requirement to "Force
the CS low to stop the conversion and apply a clock signal at SCK to
read the results at SO" have me stumped. Not sure how to set apply a
clock signal and read the results. If anyone is able to point me in the
right direction I would greatly appreciate it! Thanks!
|
Attachment(s) from Razvan-Ionut Stoian
1 of 1 File(s)
|
__._,_.___
__,_._,___
|
|