Excuse me! everyone:
I Need to incorporate reader optico via Infrared
comunication to my aplicacion.
This is the codigo in Code Warrior 8.
Is able someone to help me.
Thanks
Juan Jose.
P/D: Sorry by the traduction, I did it with a software.
// Open the port
error = SrmOpen('ircm',irOpenOptSpeed9600,&gPortId);
if (error)
ErrAlert(error);
else
gPuertoabierto=1;
/* Seteo la velocidad */
nParamSize = sizeof(uBaudRate);
error = SrmControl(gPortId,srmCtlSetBaudRate,&uBaudRate,&nParamSize);
if (error)
ErrAlert(error);
/* Seteo Bit de paridad = 1 y cantidad de bits = 8 */
nParamSize = sizeof(uFlags);
error = SrmControl(gPortId,srmCtlSetFlags,&uFlags,&nParamSize);
if (error)
ErrAlert(error);
/* Seteo TimeOut = -1 */
nParamSize = sizeof(nCtsTimeout);
error =
SrmControl(gPortId,srmCtlSetCtsTimeout,&nCtsTimeout,&nParamSize);
if (error)
ErrAlert(error);
/* Limpio el buffer */
SrmReceiveFlush(gPortId,0);
handled = true;
break;
/* Creo que deber�a Recibir lo leido por el lector. */
SrmReceive(gPortId, &Buffer, 50,5,&error);
if (error)
ErrAlert(error);
StrCopy(gCod1,Buffer);
/* Cierro el puerto */
if (gPuertoabierto == 1)
{
SrmClose(gPortId);
gPuertoabierto = 0;
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/