LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Wrapping up cfiles and related dependences to implement them in C++/Windows? (https://www.linuxquestions.org/questions/programming-9/wrapping-up-cfiles-and-related-dependences-to-implement-them-in-c-windows-4175561160/)

samSbai 12-10-2015 12:53 PM

Wrapping up cfiles and related dependences to implement them in C++/Windows?
 
Hello,

I have an assignment to write a program to implement i2c communication between a temp sensor and the Adafruit FT232H Breakout board (https://learn.adafruit.com/adafruit-...akout/overview).

The end result is this running on a Linux computer, and they did not want it implemented in python like the examples, so I decided on using the suggested C library, libmpsse,(https://code.google.com/p/libmpsse/).

after installing the libftdi library that it needs, as well as the libpmpsse code. I was able to get the .c code working, using the make provided.

There Make(
LDFLAGS= -lmpsse

all: spiflash spiflashfast i2ceeprom ds1305 gpio bitbang

spiflash:

spiflashfast:

i2ceeprom :
$(CC) $(CFlags) i2ceeprom.c -o i2ceeprom $(LDFLAGS)

ds1305:

clean:
rm -f* .dsym
rm -f spiflash spiflashfast i2ceeprom ds1305 gpio bitbang

distclean: clean

)


What I am hoping to be able to do, is take all the required library's and wrap it all together in one package (cmake?) With the end result being single functions in a c++ file that will be able to run the functions in my .c code.

Thanks for any ideas or help you might have,
If my explanation is a little weird I would be happy to explain better.

rtmistler 12-14-2015 11:31 AM

Why don't you start by completing the assignment of writing a program to implement I2C communications between a temp sensor and the Adafruit FT232H Breakout board, and have that running on a Linux computer, where you did not use Python as your source?

Or are you saying that you've already technically completed the assignment and you're just looking for improvements as well as cross platform portability?


All times are GMT -5. The time now is 03:52 AM.