LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 03-15-2010, 05:29 AM   #1
Mactub
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
Communication with SPI driver


Hi

I am moving some code for to work with SPI interface from windows to Linux SUSE platform and for to make it working I have to communicate with some small SPI driver, I have few libraries generated by that driver:

libi2cbrdg.a
libi2cbrdg.la
libi2cbrdg.so
libi2cbrdg.so.1
libi2cbrdg.so.1.1.0

I am compiling my project with following makefile:

comp: ErrorCodes.h Errors.h FrameDll.h FrameDllHeader.h Framework.h Functions.h TargetProcessor.h Layout1.h ModCommon.h ModScalerDB.h ProxyIDs.h SPIProxy.h SPITuning.cpp ModBiquad.h ModCommon.h ModDeinterleave.h ModFloatToFract32.h
g++ -g -L./lib -li2cbrdg ErrorCodes.h Errors.h FrameDll.h FrameDllHeader.h Framework.h Functions.h TargetProcessor.h Layout1.h ModCommon.h ModScalerDB.h ProxyIDs.h SPIProxy.h SPITuning.cpp -o comp.o

Output:

SPIProxy.h: In member function ‘virtual int CSPIProxy::_Read(void*, int)’:
SPIProxy.h:55: error: ‘U2C_IoWrite’ was not declared in this scope
SPIProxy.h:56: error: ‘U2C_SpiRead’ was not declared in this scope
SPIProxy.h: In member function ‘virtual int CSPIProxy::_Write(const void*, int)’:
SPIProxy.h:65: error: ‘U2C_IoWrite’ was not declared in this scope
SPIProxy.h:66: error: ‘U2C_SpiWrite’ was not declared in this scope
SPIProxy.h: In member function ‘virtual int CSPIProxy::Open(unsigned int)’:
SPIProxy.h:185: error: ‘U2C_GetDeviceCount’ was not declared in this scope
SPIProxy.h:192: error: ‘U2C_OpenDevice’ was not declared in this scope
SPIProxy.h:200: error: ‘U2C_SpiSetConfig’ was not declared in this scope
SPIProxy.h:201: error: ‘U2C_SPI_FREQ_200KHZ’ was not declared in this scope
SPIProxy.h:201: error: ‘U2C_SpiSetFreq’ was not declared in this scope
SPIProxy.h:202: error: ‘U2C_SetIoDirection’ was not declared in this scope
SPIProxy.h:203: error: ‘U2C_IoWrite’ was not declared in this scope
SPIProxy.h: In member function ‘virtual int CSPIProxy::_Read(void*, int)’:
SPIProxy.h:55: error: ‘U2C_IoWrite’ was not declared in this scope
SPIProxy.h:56: error: ‘U2C_SpiRead’ was not declared in this scope
SPIProxy.h: In member function ‘virtual int CSPIProxy::_Write(const void*, int)’:
SPIProxy.h:65: error: ‘U2C_IoWrite’ was not declared in this scope
SPIProxy.h:66: error: ‘U2C_SpiWrite’ was not declared in this scope
SPIProxy.h: In member function ‘virtual int CSPIProxy::Open(unsigned int)’:
SPIProxy.h:185: error: ‘U2C_GetDeviceCount’ was not declared in this scope
SPIProxy.h:192: error: ‘U2C_OpenDevice’ was not declared in this scope
SPIProxy.h:200: error: ‘U2C_SpiSetConfig’ was not declared in this scope
SPIProxy.h:201: error: ‘U2C_SPI_FREQ_200KHZ’ was not declared in this scope
SPIProxy.h:201: error: ‘U2C_SpiSetFreq’ was not declared in this scope
SPIProxy.h:202: error: ‘U2C_SetIoDirection’ was not declared in this scope
SPIProxy.h:203: error: ‘U2C_IoWrite’ was not declared in this scope

But still as u see I have some functions missed I know that they are in these libraries, whats wrong? People, please, help?
 
Old 03-15-2010, 10:50 PM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,455
Blog Entries: 3

Rep: Reputation: 182Reputation: 182
this may help you
 
Old 03-16-2010, 02:17 AM   #3
Mactub
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Drakeo View Post
this may help you
My SPI driver does not create any directory in /dev .
I have only these libraries for to communicate with it. It is pretty simple but I cannot see any reason why after linking these libraries to my code functions that have to perform communication are not visible?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problems with SPI driver and spidev asmeti Linux - Software 2 11-11-2011 09:08 PM
My SPI driver not working in u-boot. sunr2007 Linux - Embedded & Single-board computer 1 10-24-2009 07:17 AM
SPI Flash driver (mtd) for Spansion S25FL128P luklem Linux - Embedded & Single-board computer 0 07-30-2009 10:04 AM
how to write spi driver for mpc8247 saheelahamed Linux - Software 1 02-20-2008 12:27 AM
Asynchronous communication between a driver and its clients dollar1206 Linux - General 0 08-15-2007 05:13 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration