LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Communication with SPI driver (https://www.linuxquestions.org/questions/linux-software-2/communication-with-spi-driver-795483/)

Mactub 03-15-2010 05:29 AM

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?

Drakeo 03-15-2010 10:50 PM

this may help you

Mactub 03-16-2010 02:17 AM

Quote:

Originally Posted by Drakeo (Post 3899795)
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?


All times are GMT -5. The time now is 09:26 AM.