LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2012, 02:20 AM   #1
manishahg
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Rep: Reputation: Disabled
linux c program for hardware spi reading from specified location


I am using hardware SPI for PRoslic Si3217 and want to read spi data from the specified location.I am unable to read the data from particular location( ex:- 0x00 location). i tried different search engines, but i didn't get any answer for that. i need program for that READ/WRITE operations using ioctl() function only in linux C.

so please help me to get out from this hurdle.

Last edited by manishahg; 07-11-2012 at 02:21 AM.
 
Old 07-12-2012, 09:58 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by manishahg View Post
I am using hardware SPI for PRoslic Si3217 and want to read spi data from the specified location.I am unable to read the data from particular location( ex:- 0x00 location). i tried different search engines, but i didn't get any answer for that. i need program for that READ/WRITE operations using ioctl() function only in linux C.

so please help me to get out from this hurdle.
Really?? Did you try checking out the ProSLIC website, where they have the complete programming API???
http://www.silabs.com/products/voice...Pages/API.aspx

And if you had tried Google, you'd have found code on Google Code, that does what you want:
https://code.google.com/p/rt-n56u/so...b6790a3e19e588
 
1 members found this post helpful.
Old 07-16-2012, 11:35 PM   #3
manishahg
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks. But how do I read spi driver id and other register values in linux. Also i want to implement hardware spi read-write for my api.
 
Old 07-17-2012, 08:43 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by manishahg View Post
Thanks. But how do I read spi driver id and other register values in linux. Also i want to implement hardware spi read-write for my api.
You get their API, and read the instructions. The API provides you with the interface you need to query the hardware. Their API is a pay-for product, so you will first purchase the API, then read the instructions that come with it. If you've got questions after that, you contact their tech support, since you're paying for it with your purchase.
 
Old 07-18-2012, 05:37 AM   #5
manishahg
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Is there any linux c code to read and write device registers and device address. I want to read the address of /dev/devicename and read the content of its register 0. I am using fd = open(device, O_RDWR); to open the device.
 
Old 07-18-2012, 05:44 AM   #6
manishahg
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I basically want to know if my spi interface is working correctly. So i want to read the Proslic register values through spi to verify the values match with its presets.
 
Old 07-18-2012, 09:59 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by manishahg View Post
I basically want to know if my spi interface is working correctly. So i want to read the Proslic register values through spi to verify the values match with its presets.
Yes, we understand what you're asking. AGAIN, I will point you to the documentation/instructions that come with your purchase of the API, and the access to their tech-support which comes with that purchase. I do not have the API, since it is a pay-for product which I don't need.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux c program for i2c reading from specified location pillisrikanth Linux - Software 15 03-05-2012 01:15 AM
SPI program using c++ Lobinho Programming 3 02-10-2011 05:18 PM
What's a good hardware reading program jacatone Linux - Newbie 1 07-19-2007 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration