void (*rlp_callback)(RLP_F96Frame *frame))
{
unsigned char init_char = N6110_SYNC_BYTE;
-#ifndef UCLINUX
unsigned char end_init_char = N6110_IR_END_SYNC_BYTE;
-#endif /* UCLINUX */
int count;
int InitLength;
#endif /* UCLINUX */
case GCT_FBUS:
-#ifndef UCLINUX
case GCT_Infrared:
+#ifndef UCLINUX
case GCT_Tekram:
#endif /* UCLINUX */
InitLength = atoi(initlength);
InitLength = 250; /* This is the usual value, lower may work. */
}
+ if (CurrentConnectionType==GCT_Infrared
#ifndef UCLINUX
- if (CurrentConnectionType==GCT_Infrared ||
- CurrentConnectionType==GCT_Tekram) {
+ || CurrentConnectionType==GCT_Tekram
+#endif /* UCLINUX */
+ ) {
#ifdef DEBUG
fprintf(stdout,_("Setting infrared for FBUS communication...\n"));
#endif
device_changespeed(9600);
}
-#endif /* UCLINUX */
#ifdef DEBUG
fprintf(stdout,_("Writing init chars...."));
/* Send init string to phone, this is a bunch of 0x55 characters. Timing is
empirical. */
for (count = 0; count < InitLength; count ++) {
+ if (CurrentConnectionType!=GCT_Infrared
#ifndef UCLINUX
- if (CurrentConnectionType!=GCT_Infrared &&
- CurrentConnectionType!=GCT_Tekram)
+ && CurrentConnectionType!=GCT_Tekram
#endif /* UCLINUX */
- usleep(100);
+ ) usleep(100);
Protocol->WritePhone(1,&init_char);
}
+ if (CurrentConnectionType==GCT_Infrared
#ifndef UCLINUX
- if (CurrentConnectionType==GCT_Infrared ||
- CurrentConnectionType==GCT_Tekram) {
+ || CurrentConnectionType==GCT_Tekram
+#endif /* UCLINUX */
+ ) {
Protocol->WritePhone(1,&end_init_char);
usleep(200000);
}
-#endif /* UCLINUX */
#ifdef DEBUG
fprintf(stdout,_("Done\n"));
#endif
+ if (CurrentConnectionType==GCT_Infrared
#ifndef UCLINUX
- if (CurrentConnectionType==GCT_Infrared ||
- CurrentConnectionType==GCT_Tekram) {
+ || CurrentConnectionType==GCT_Tekram
+#endif /* UCLINUX */
+ ) {
device_changespeed(115200);
}
-#endif /* UCLINUX */
N6110_SendStatusRequest();