Dear developers,
I`m trying to make a communication protocol using
serial port, but when the program calls the open
serial routine a fatal error happens and the program
crash. The serial open routine is presented below:
static Err OpenSerial(void)
{
Err error = 0;
UInt32 flags = 0;
UInt16 flagsSize = sizeof(flags);
/* Here the error happens, when SrmOpen is called
the
program returns a fatal error and the program
crash */
error = SrmOpen(serPortCradlePort, 9600,
&gPortID);
ErrNonFatalDisplayIf(error == serErrBadPort,
"serErrBadPort");
switch (error) {
case errNone:
break;
case serErrAlreadyOpen:
SrmClose(gPortID);
FrmAlert(SerialBusyAlert);
return error;
break;
default:
FrmAlert(SerialOpenAlert);
return error;
break;
}
gConnected = true;
flags = srmSettingsFlagBitsPerChar8 |
srmSettingsFlagStopBits1;
SrmControl(gPortID, srmCtlSetFlags, &flags,
&flagsSize);
return error;
}
I`m using PRC-Tools and pilrc to make the
applications.
Can you help me with this problem?
Mr. Paulo Regis
------------------------------------------------------------
Mensagem enviada usando WebMail mantido por FortalNet ISP.
http://www.fortalnet.com.br/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/