Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: Cris on November 21, 2016, 05:33:10 PM

Title: A13-OLinuXino-MICRO I2C and SPI C library
Post by: Cris on November 21, 2016, 05:33:10 PM
Hello Guys,

   I just purchased a A13-OLinuXino-MICRO, is my first Olimex Linux board.
I am wondering if there is any C libraries for I2C and SPI, I want to connect SPI ADC, for my first application, how can I implement this in a C program?
I am an experienced embedded programmer, but I worked a lot with 8bit and 32bit microcontrollers without OS.
I saw that there is some Python support, but I would prefer to use C language.
Also, is it possible to use SMFL libraries and C++ with A13-OLinuXino-MICRO?

Thank you very much for your support !!
Cristian
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: JohnS on November 21, 2016, 05:42:10 PM
SFML is available for Linux so why not use that?  They do not appear to have any version that's standalone.

You can  access the other things you mentioned from Linux, too.

John
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: Cris on November 21, 2016, 05:45:51 PM
Thank you very much, Sir, for your quick replay.
So, there is some library that I can include in the c program , like
#include<I2C.h>  or same for SPI?

Thank you again for the help !!
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: JohnS on November 21, 2016, 07:30:52 PM
I hate to say it but web search...

John
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: Cris on November 22, 2016, 12:43:40 PM
Quote from: JohnS on November 21, 2016, 07:30:52 PM
I hate to say it but web search...

John

Well, Sir, you are right somehow, in the mean time I did search the web and found interesting stuff, but in my opinion, a forum is a place where you can ask things and, also, in my opinion , my questions were not so stupid.
But this is just my opinion and I don't want to upset anyone.

Thank you very much for your support, I really appreciate it.

Cristian
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: Lieo on December 13, 2016, 03:10:55 AM
https://github.com/jasonblewis/bbb-clock/blob/master/test/spi.c
Title: Re: A13-OLinuXino-MICRO I2C and SPI C library
Post by: Lieo on December 13, 2016, 03:15:37 AM
Please start from here.
Sorry for my English, I run with A13 board.

Please focus on "linux/spi/spidev.h".