Baud rate

I want to set the Baud rate of the serial port.
from command line i think i can do something like:
devc-ser8250 -b9600

Is there a way to set it through my C code?

Is data written to the serial port synchronously or asynchronously?
In this matlab code I was using before, I could set the data to be written on the serial port synchronously or asynchronously.

thanx
PI

“stty” can be used from the command line to set the baud rate. “use stty” for details. As for C code, check this thread:
openqnx.com/PNphpBB2+viewtopic-t-1066-.html