r2980 - in trunk/src/host/qemu-neo1973: gnokiigsm hw
andrew at sita.openmoko.org
andrew at sita.openmoko.org
Mon Sep 17 15:53:57 CEST 2007
Author: andrew
Date: 2007-09-17 15:53:55 +0200 (Mon, 17 Sep 2007)
New Revision: 2980
Modified:
trunk/src/host/qemu-neo1973/gnokiigsm/at-emulator.c
trunk/src/host/qemu-neo1973/hw/modem.c
Log:
Emit the AT greeting on every interpreter reset.
Modified: trunk/src/host/qemu-neo1973/gnokiigsm/at-emulator.c
===================================================================
--- trunk/src/host/qemu-neo1973/gnokiigsm/at-emulator.c 2007-09-17 11:48:33 UTC (rev 2979)
+++ trunk/src/host/qemu-neo1973/gnokiigsm/at-emulator.c 2007-09-17 13:53:55 UTC (rev 2980)
@@ -1172,6 +1172,9 @@
}
break;
+ case '\0':
+ break;
+
default:
gn_atem_modem_result(MR_ERROR);
return;
Modified: trunk/src/host/qemu-neo1973/hw/modem.c
===================================================================
--- trunk/src/host/qemu-neo1973/hw/modem.c 2007-09-17 11:48:33 UTC (rev 2979)
+++ trunk/src/host/qemu-neo1973/hw/modem.c 2007-09-17 13:53:55 UTC (rev 2980)
@@ -133,14 +133,6 @@
return GN_ERR_NONE;
}
-static void modem_reset(struct modem_s *s)
-{
- s->out_len = 0;
- s->baud_delay = ticks_per_sec;
- qemu_del_timer(s->reg_tm);
- qemu_del_timer(s->csq_tm);
-}
-
static void modem_csq_report(void *opaque)
{
struct modem_s *s = (struct modem_s *) opaque;
@@ -223,10 +215,6 @@
case CHR_IOCTL_MODEM_HANDSHAKE:
if (!s->enable)
return -ENOTSUP;
-#if 0
- if (*(int *) arg)
- modem_resp(s, "AT-Command Interpreter Ready\r\nOK\r\n");
-#endif
break;
default:
@@ -235,12 +223,21 @@
return 0;
}
+static void modem_reset(struct modem_s *s)
+{
+ s->out_len = 0;
+ s->baud_delay = ticks_per_sec;
+ qemu_del_timer(s->reg_tm);
+ qemu_del_timer(s->csq_tm);
+ modem_resp(s, "AT-Command Interpreter ready\r\nOK\r\n");
+}
+
void modem_enable(CharDriverState *chr, int enable)
{
struct modem_s *s = (struct modem_s *) chr->opaque;
+ s->enable = enable;
if (enable)
modem_reset(s);
- s->enable = enable;
}
static void modem_out_tick(void *opaque)
More information about the commitlog
mailing list