Use Arduino sketch functions in regular C++ Code?

Hi!
I'm coding a C++ project in Eclipse for the Intel Edison. In the past I had problems with the serial communication. The serial Port "/dev/ttyGS0" ist set to 9600 Baud per default. But on the Intel Edison the serial connections seems to be unreliable at that speed.

When I use the Arduino IDE to ipload and run a sketch with the "Serial.begin(115200)" command, the serial connection works well.

Now how can I do that in my C++ project before I start a serial communication? Is it possible to see what "Serial.begin()" does? Or can I include a library to use that function?

Tanks for any help!
Christoph

See if this helps:

http://playground.arduino.cc/Interfacing/CPPWindows

econjack:
See if this helps:

http://playground.arduino.cc/Interfacing/CPPWindows

Ok. But isn't this for Windows systems? I'm not able to receive on an Edison,
which is Linux based...

I didn't really mean it was a plug-and-go resource. Rather, it was code that you could study to see how it was implemented under Windows with the idea of modifying it for Edison.

The serial Port “/dev/ttyGS0” ist set to 9600 Baud per default.

“The serial Port” is an instance of some class. I hardly expect that the class doesn’t provide SOME method to change the properties of the instance.