Hi,
Could anyboby help me and share information how to correctly use serial
port during developing application in PhAB ? From example I’m going to
read digital data from osciloscope and pass it in by serial port. I don’t
have an idea what function could be adequate: open(), fopen(),
modem_read() ? If modem_read() what are the parameters during calling the
function (e.g. serial port speed) ?
I want to create sth. like digital osciloscope in Photon, I’ve made
visualisation but have a problem with reading the data. My own procedure
produces core.
Thanks a lot
Maciej Wdowiarz wrote:
Hi,
Could anyboby help me and share information how to correctly use serial
port during developing application in PhAB ? From example I’m going to
read digital data from osciloscope and pass it in by serial port. I don’t
have an idea what function could be adequate: open(), fopen(),
modem_read() ? If modem_read() what are the parameters during calling the
function (e.g. serial port speed) ?
I want to create sth. like digital osciloscope in Photon, I’ve made
visualisation but have a problem with reading the data. My own procedure
produces core.
Open device with open(), then use dev_read() for reading and write() for
writing. The easy way to control serial port parameters is to use “stty”
command. Don’t control serial port from Photon application - you will probably
have timing problems. Make another process which will drive serial port and
send data to your Photon apps.
Hope this helps,
Grzegorz Wrobel
PS
In case you have further questions drop me email - in polish if you prefer

Previously, Grzegorz Wrobel wrote in comp.os.qnx:
will probably
have timing problems. Make another process which will drive serial port and
send data to your Photon apps.
Another option would be to use the proxy parameter of
dev_read() and attach a an input function PtAppAddInput() to
handle the triggers.
Mitchell Schoenbrun --------- maschoen@pobox.com