Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   2. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   3. r4810 - developers/werner/wlan-spi/patches-tracking
      ([EMAIL PROTECTED])
   4. r4811 - developers/werner/wlan-spi/patches-tracking
      ([EMAIL PROTECTED])
   5. r4812 - developers/werner/wlan-spi/patches-tracking
      ([EMAIL PROTECTED])
   6. r4813 - developers/werner/wlan-spi/patches-tracking
      ([EMAIL PROTECTED])
   7. r4814 - in developers/werner/ahrt/host/tmc: . lib
      ([EMAIL PROTECTED])
--- Begin Message ---
 conf/distro/include/angstrom-2007-for-openmoko.inc |    2 -
 conf/distro/openmoko.conf                          |   13 +
 conf/machine/om-gta02.conf                         |    1 +
 packages/alsa/alsa-state.bb                        |    3 +-
 packages/alsa/alsa-state/openmoko/alsa-state       |   29 +++
 packages/base-files/base-files/om-gta01/fstab      |   17 +--
 packages/base-files/base-files/om-gta02/fstab      |   17 +--
 packages/base-files/base-files_3.0.14.bb           |    2 +-
 .../hal-0.5.11/make-hal-start-a-lot-faster.patch   |   57 +++++
 packages/hal/hal_0.5.11.bb                         |    8 +-
 .../initscripts/initscripts-openmoko/alignment.sh  |    6 +
 .../initscripts/initscripts-openmoko/bootmisc.sh   |   47 ++++
 packages/initscripts/initscripts-openmoko/campgsm  |  128 ++++++++++
 .../initscripts/initscripts-openmoko/checkroot.sh  |   43 ++++
 packages/initscripts/initscripts-openmoko/devpts   |    5 +
 .../initscripts/initscripts-openmoko/finish.sh     |    6 +
 .../initscripts/initscripts-openmoko/functions     |   17 ++
 packages/initscripts/initscripts-openmoko/halt     |   25 ++
 .../initscripts/initscripts-openmoko/hostname.sh   |   11 +
 .../initscripts-openmoko/led-trigger.sh            |    6 +
 .../initscripts/initscripts-openmoko/mountall.sh   |   52 ++++
 .../initscripts-openmoko/mountdevsubfs.sh          |   14 ++
 .../initscripts-openmoko/mountkernfs.sh            |   33 +++
 .../initscripts/initscripts-openmoko/mountnfs.sh   |   87 +++++++
 .../initscripts-openmoko/populate-volatile.sh      |  248 ++++++++++++++++++++
 packages/initscripts/initscripts-openmoko/reboot   |   11 +
 .../initscripts/initscripts-openmoko/rmnologin     |   14 ++
 .../initscripts/initscripts-openmoko/save-rtc.sh   |    5 +
 packages/initscripts/initscripts-openmoko/sendsigs |   17 ++
 packages/initscripts/initscripts-openmoko/umountfs |   18 ++
 .../initscripts/initscripts-openmoko/umountnfs.sh  |   28 +++
 .../initscripts/initscripts-openmoko/volatiles     |   40 ++++
 packages/initscripts/initscripts-openmoko_1.0.bb   |  109 +++++++++
 packages/modutils/files/openmoko/modutils.sh       |   21 ++
 packages/modutils/modutils-initscripts.bb          |    2 +-
 packages/netbase/netbase/openmoko/init             |   46 ++++
 packages/netbase/netbase/openmoko/options          |    1 +
 packages/netbase/netbase_4.21.bb                   |    2 +-
 packages/opkg/opkg_svn.bb                          |   11 +-
 packages/procps/procps-3.2.7/openmoko/sysctl.conf  |   64 +++++
 packages/procps/procps-3.2.7/procps.init           |    6 +
 packages/procps/procps-3.2.7/sysctl.conf           |   64 +++++
 packages/procps/procps_3.2.7.bb                    |   19 ++-
 packages/sysvinit/sysvinit/openmoko/rc             |   70 +------
 packages/sysvinit/sysvinit/openmoko/rcS            |    9 +
 packages/sysvinit/sysvinit_2.86.bb                 |    2 +-
 packages/tasks/task-boot.bb                        |    5 +-
 packages/tasks/task-openmoko-linux.bb              |   10 +-
 packages/udev/files/links.conf                     |    3 +
 packages/udev/udev-118/openmoko/init               |  170 ++++++++++++++
 packages/udev/udev-static-devices.bb               |   15 ++
 .../om-gta01/udev_static_devices_tarball           |  Bin
 .../om-gta02/udev_static_devices_tarball           |  Bin
 packages/udev/udev_118.bb                          |    2 +-
 .../wireless-tools/openmoko/zzz-wireless.if-pre-up |   34 +++
 packages/wireless-tools/wireless-tools_29.bb       |    2 +-
 .../xserver-kdrive-common/xserver-nodm-init.bb     |    5 +-
 .../xserver-nodm-init/xserver-nodm                 |   19 +-
 58 files changed, 1568 insertions(+), 133 deletions(-)

New commits:
commit 2afb85939d305738cb139ae80d6295286d4dc5c0
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Thu Nov 20 12:16:54 2008 +0800

    hal: Cherry-pick patch from git to improve startup time.

commit 8e56b4451c6ad577787f34a9a5eccff3658e37a3
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 19:17:00 2008 +0800

    fastboot: xserver-nodm-init: Start at 05.

commit 5eb604f4d2b8dc9464f14561af87cb75dbaab12a
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Nov 18 14:02:36 2008 +0800

    fastboot: task-openmoko-linux: Cleanup.
    
    Remove packages already in task-base.  Remove splash support.  Add
    udev-static-devices.

commit a1a5d58098f0333cd65850e136a42445f3f04b3e
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 17:49:13 2008 +0800

    fastboot: base-files: Simplify fstab.

commit c0680d4d15cf957301c1584eeb95e84bb3de13db
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 16:48:44 2008 +0800

    fastboot: sysvinit: Simplify rc and rcS.
    
    Remove support for boot splash.  Source initscripts end with .sh.

commit f6f84aed7b4a55f6d28ef4f2e669df1951f6c950
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 17:55:24 2008 +0800

    fastboot: opkg: Do not run opkg-cl configure everytime.

commit 8f2b584e24df791de0b8bc18f758bf1a9784873d
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Mon Nov 17 18:08:42 2008 +0800

    fastboot: modutils: Do not run depmod.

commit 44542b192544d8d82b2df2cbe3d68bfbe80a51ce
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 16:47:18 2008 +0800

    fastboot: procps: Install and use /etc/sysctl.conf.

commit ed053013f3d50d61e83663c0ce02da2ee562f505
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Thu Oct 30 16:16:14 2008 +0800

    fastboot: netbase: No longer parse /etc/network/options.

commit afa74920144d310dad255865811ee3948c0666c3
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Thu Oct 30 16:16:33 2008 +0800

    fastboot: wireless-tools: Make zzz-wireless.if-pre-up only for dhcp.

commit 2ecd8f18ae3c6c02c5ee759b81c9610972c4975f
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 16:48:24 2008 +0800

    fastboot: alsa-state: Run init script earlier and in the background.

commit a4abf8a3811e38c208e25155ea83f3af5aad1041
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Nov 18 16:38:29 2008 +0800

    fastboot: udev: Update init script to support udev-static-devices.

commit 3694233b0d7f1570588008494e1a41ccf7988b9b
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Nov 18 16:37:42 2008 +0800

    fastboot: udev-static-devices: New package to provide static dev nodes.

commit 7bf223c86390cdcdde954add48229826886fa783
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Fri Oct 31 16:46:52 2008 +0800

    fastboot: om-gta02.conf: Set USE_VT to 0.

commit 51d282c5efe05c008ed9cf010216ad769ff7f65b
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Nov 18 16:50:36 2008 +0800

    fastboot: openmoko distro: Customize more.
    
    Remove avahi.  Use hardcoded packages for bluetooth and usbgadget
    support.  Prefer initscripts-openmoko over initscripts.

commit c7a689cb1040bd0d64a85a48660f40af59ed31b6
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Oct 28 16:49:38 2008 +0800

    fastboot: initscripts-openmoko: Replacement for initscripts.

commit 598c64205c2e1ff99793fdce967a46e25fa17157
Author: Chia-I Wu <[EMAIL PROTECTED]>
Date:   Tue Nov 18 16:49:54 2008 +0800

    fastboot: task-boot: Make initscripts configurable.




--- End Message ---
--- Begin Message ---
 packages/avahi/avahi-python_0.6.21.bb              |    2 +-
 packages/avahi/avahi-ui_0.6.21.bb                  |    2 +-
 packages/avahi/avahi.inc                           |    9 +++++----
 packages/avahi/avahi_0.6.19.bb                     |    2 +-
 packages/avahi/avahi_0.6.20.bb                     |    2 +-
 packages/avahi/avahi_0.6.21.bb                     |    2 +-
 packages/avahi/avahi_0.6.22.bb                     |    2 +-
 packages/openmoko-projects/illume-theme-asu_svn.bb |   20 +++++++++++++++++++-
 8 files changed, 30 insertions(+), 11 deletions(-)

New commits:
commit c94efc540df8107f8bac9f88e9c2d1f232911085
Author: John Lee <[EMAIL PROTECTED]>
Date:   Sat Nov 22 00:10:39 2008 +0800

    illume-theme-asu_svn.bb: add postinst script to purge the incompatible
    e cfg in Om2008.9

commit 4ba4f8e3cf082dce55df50d2a320b88ed32401f8
Author: John Lee <[EMAIL PROTECTED]>
Date:   Fri Nov 21 23:38:21 2008 +0800

    avahi: fix postinst script error
    
        The previous version of dbus-1 will not stop clean if there
        exists running 'dbus-daemon --session' in the system.  That
        will cause the script to believe it should ask for a
        force-reload of dbus, which leads to an error exit because the
        'dbus-daemon --system' wasn't really running.




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-11-21 22:41:31 +0100 (Fri, 21 Nov 2008)
New Revision: 4810

Added:
   developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch
Log:
Debugging tool: raise GPF6 (AUX) when reaching a trigger.



Added: developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch
===================================================================
--- developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch       
                        (rev 0)
+++ developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch       
2008-11-21 21:41:31 UTC (rev 4810)
@@ -0,0 +1,95 @@
+Index: ktrack/arch/arm/plat-s3c24xx/Makefile
+===================================================================
+--- ktrack.orig/arch/arm/plat-s3c24xx/Makefile 2008-11-21 19:22:53.000000000 
-0200
++++ ktrack/arch/arm/plat-s3c24xx/Makefile      2008-11-21 19:23:02.000000000 
-0200
+@@ -51,4 +51,5 @@
+                                  gta02_pm_wlan.o  \
+                                  neo1973_shadow.o \
+                                  neo1973_pm_resume_reason.o \
+-                                 neo1973_memconfig.o
++                                 neo1973_memconfig.o \
++                                 gta02_trigger.o
+Index: ktrack/arch/arm/plat-s3c24xx/gta02_trigger.c
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ ktrack/arch/arm/plat-s3c24xx/gta02_trigger.c       2008-11-21 
19:40:23.000000000 -0200
+@@ -0,0 +1,79 @@
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/device.h>
++#include <linux/sysfs.h>
++#include <mach/gpio.h>
++#include <mach/regs-gpio.h>
++
++
++static int trigger_value = -1;
++static int trigger_count;
++
++
++
++void trigger(void)
++{
++      if (trigger_count++ != trigger_value)
++              return;
++      printk(KERN_ERR "TRIGGER (%d)\n", trigger_count-1);
++      gpio_direction_output(S3C2410_GPF6, 1);
++}
++
++
++static ssize_t trigger_read(struct device *dev, struct device_attribute *attr,
++    char *buf)
++{
++      return sprintf(buf, "%d\n", trigger_value);
++}
++
++
++static ssize_t trigger_write(struct device *dev, struct device_attribute 
*attr,
++    const char *buf, size_t count)
++{
++      long tmp;
++      char *end;
++
++      tmp = simple_strtol(buf, &end, 0);
++      if (end == buf)
++              return -EINVAL;
++      trigger_value = tmp;
++      return count;
++}
++
++
++static ssize_t trigger_count_read(struct device *dev,
++    struct device_attribute *attr, char *buf)
++{
++      return sprintf(buf, "%d\n", trigger_count);
++}
++
++
++static ssize_t trigger_count_write(struct device *dev,
++    struct device_attribute *attr, const char *buf, size_t count)
++{
++      trigger_count = 0;
++      return count;
++}
++
++
++static DEVICE_ATTR(trigger, 0644, trigger_read, trigger_write);
++static DEVICE_ATTR(trigger_count, 0644, trigger_count_read,
++    trigger_count_write);
++
++
++static int __init trigger_init(void)
++{
++      int ret;
++
++      ret = sysfs_create_file(kernel_kobj, &dev_attr_trigger.attr);
++      if (ret)
++              return ret;
++      /* @@@ we don't really care about errors here ... */
++      return sysfs_create_file(kernel_kobj, &dev_attr_trigger_count.attr);
++}
++
++
++module_init(trigger_init);
++
++EXPORT_SYMBOL_GPL(trigger);




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-11-22 02:04:08 +0100 (Sat, 22 Nov 2008)
New Revision: 4811

Added:
   developers/werner/wlan-spi/patches-tracking/hif-fix-suspend.patch
Log:
Backup, before changing in_suspend to a mutex.



Added: developers/werner/wlan-spi/patches-tracking/hif-fix-suspend.patch
===================================================================
--- developers/werner/wlan-spi/patches-tracking/hif-fix-suspend.patch           
                (rev 0)
+++ developers/werner/wlan-spi/patches-tracking/hif-fix-suspend.patch   
2008-11-22 01:04:08 UTC (rev 4811)
@@ -0,0 +1,99 @@
+Index: ktrack/drivers/ar6000/hif/hif2.c
+===================================================================
+--- ktrack.orig/drivers/ar6000/hif/hif2.c      2008-11-21 22:48:42.000000000 
-0200
++++ ktrack/drivers/ar6000/hif/hif2.c   2008-11-21 22:58:33.000000000 -0200
+@@ -36,7 +36,6 @@
+  * KNOWN BUGS:
+  *
+  * - HIF_DEVICE_IRQ_ASYNC_SYNC doesn't work yet (gets MMC errors)
+- * - driver doesn't remove cleanly yet
+  * - latency can reach hundreds of ms, probably because of scheduling delays
+  * - packets go through about three queues before finally hitting the network
+  */
+@@ -110,6 +109,7 @@
+ 
+ 
+ static HTC_CALLBACKS htcCallbacks;
++static int in_shutdown; /* prevent recursion through HIFShutDownDevice */
+ 
+ 
+ /* ----- Request processing ------------------------------------------------ 
*/
+@@ -521,16 +521,22 @@
+       HIF_DEVICE *hif = sdio_get_drvdata(func);
+       int ret;
+ 
+-#if 0
+-      /*
+-       * Funny, Atheros' HIF does this call, but this just puts us in a
+-       * recursion through HTCShutDown/HIFShutDown if unloading the
+-       * module.
+-       */
+-      ret = htcCallbacks.deviceRemovedHandler(hif->htc_handle, A_OK);
+-      if (ret != A_OK)
+-              dev_err(dev, "deviceRemovedHandler: %d\n", ret);
+-#endif
++      dev_dbg(dev, "sdio_ar6000_remove\n");
++      if (!in_shutdown) {
++              /*
++               * Funny, Atheros' HIF does this call, but this just puts us in
++               * a recursion through HTCShutDown/HIFShutDown if unloading the
++               * module.
++               *
++               * However, we need it for suspend/resume. See the comment at
++               * HIFShutDown, below.
++               */
++              in_shutdown++;
++              ret = htcCallbacks.deviceRemovedHandler(hif->htc_handle, A_OK);
++              in_shutdown--;
++              if (ret != A_OK)
++                      dev_err(dev, "deviceRemovedHandler: %d\n", ret);
++      }
+       wait_queue_empty(hif);
+       ret = kthread_stop(hif->io_task);
+       if (ret)
+@@ -591,8 +597,44 @@
+ }
+ 
+ 
++/*
++ * We have three possible call chains here:
++ *
++ * System shutdown/reboot:
++ *
++ *   kernel_restart_prepare ...> device_shutdown ... > s3cmci_shutdown ->
++ *     mmc_remove_host ..> sdio_bus_remove -> sdio_ar6000_remove ->
++ *     deviceRemovedHandler (HTCTargetRemovedHandler) -> HIFShutDownDevice
++ *
++ *   This is roughly the same sequence as suspend, described below.
++ *
++ * Module removal:
++ *
++ *   sys_delete_module -> ar6000_cleanup_module -> HTCShutDown ->
++ *     HIFShutDownDevice -> sdio_unregister_driver ...> sdio_bus_remove ->
++ *     sdio_ar6000_remove
++ *
++ *   In this case, HIFShutDownDevice must call sdio_unregister_driver to
++ *   notify the driver about its removal. sdio_ar6000_remove must not call
++ *   deviceRemovedHandler, because that would loop back into 
HIFShutDownDevice.
++ *
++ * Suspend:
++ *
++ *   device_suspend ...> s3cmci_suspend ...> sdio_bus_remove ->
++ *     sdio_ar6000_remove -> deviceRemovedHandler (HTCTargetRemovedHandler) ->
++ *     HIFShutDownDevice
++ *
++ *   We must call deviceRemovedHandler to inform the ar6k stack that the 
device
++ *   has been removed. Since HTCTargetRemovedHandler calls back into
++ *   HIFShutDownDevice, we must also prevent the call to
++ *   sdio_unregister_driver, or we'd end up recursing into the SDIO stack,
++ *   eventually deadlocking somewhere.
++ */
++
+ void HIFShutDownDevice(HIF_DEVICE *hif)
+ {
+       /* Beware, HTCShutDown calls us with hif == NULL ! */
+-      sdio_unregister_driver(&sdio_ar6000_driver);
++      if (!in_shutdown++)
++              sdio_unregister_driver(&sdio_ar6000_driver);
++      in_shutdown--;
+ }




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-11-22 02:14:21 +0100 (Sat, 22 Nov 2008)
New Revision: 4812

Added:
   developers/werner/wlan-spi/patches-tracking/README
Log:
Make it clear that this isn't the place to look for useful code.



Added: developers/werner/wlan-spi/patches-tracking/README
===================================================================
--- developers/werner/wlan-spi/patches-tracking/README                          
(rev 0)
+++ developers/werner/wlan-spi/patches-tracking/README  2008-11-22 01:14:21 UTC 
(rev 4812)
@@ -0,0 +1,7 @@
+The patches in this directory are all work in progress items.
+They serve mainly as backups and are NOT meant for public
+consumption.
+
+The changes related to putting the WLAN stack on Linux SDIO are
+now in our git repository at git://git.openmoko.org/git/kernel.git
+in the stable-tracking branch.




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-11-22 04:28:50 +0100 (Sat, 22 Nov 2008)
New Revision: 4813

Modified:
   developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch
Log:
Added description.



Modified: developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch
===================================================================
--- developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch       
2008-11-22 01:14:21 UTC (rev 4812)
+++ developers/werner/wlan-spi/patches-tracking/debug-gta02-trigger.patch       
2008-11-22 03:28:50 UTC (rev 4813)
@@ -1,3 +1,26 @@
+This is a little gadget that may be useful for low-level debugging.
+
+It generates a rising edge on GPF6 (the AUX button) when a certain
+trigger condition has occurred the right number of times. This can
+be used to trigger an oscilloscope.
+
+The code being debugged has to call trigger() before the event in
+question. The system is controlled via sysfs files:
+
+/sys/kernel/trigger
+    write: enable the trigger and specify now many triggers will be
+        ignored.
+    read: read back the value that has been set.
+/sys/kernel/trigger_count:
+    write: reset the counter.
+    read: the number of times trigger() has been called since the
+        last reset.
+
+Probably not something we want in our official branches, but it may
+be handy to have around if debugging some protocol issues.
+
+- Werner
+
 Index: ktrack/arch/arm/plat-s3c24xx/Makefile
 ===================================================================
 --- ktrack.orig/arch/arm/plat-s3c24xx/Makefile 2008-11-21 19:22:53.000000000 
-0200




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2008-11-22 04:42:01 +0100 (Sat, 22 Nov 2008)
New Revision: 4814

Modified:
   developers/werner/ahrt/host/tmc/lib/dxplore.py
   developers/werner/ahrt/host/tmc/lib/scope.py
   developers/werner/ahrt/host/tmc/setup.py
Log:
Highlights:
- increase delay to improve reliability of communication with DS1000
- some bug fixes

Details:
- setup.py: forgot to install phosphor.py
- lib/scope.py: increase pause after commands from 100ms to 300ms :-(
- lib/scope.py: :HARDCOPY is synonymous to :LCD:DATA? - remove it
- lib/scope.py (rigol_ds1000c): new experimental method "window" to set up the
  horizontal system in application-centered terms
- lib/dxplore.py (channel.draw): if a channel contained edits, we cut off the
  channel after them



Modified: developers/werner/ahrt/host/tmc/lib/dxplore.py
===================================================================
--- developers/werner/ahrt/host/tmc/lib/dxplore.py      2008-11-22 03:28:50 UTC 
(rev 4813)
+++ developers/werner/ahrt/host/tmc/lib/dxplore.py      2008-11-22 03:42:01 UTC 
(rev 4814)
@@ -54,7 +54,7 @@
 
        for pos in self.edits:
            if pos < self.main.pos0:
-               return
+               break
            self.main.w.create_rectangle(
              self.x(pos)-self.edit_border, self.y(0)+self.edit_border,
              self.x(pos+1)+self.edit_border, self.y(1)-self.edit_border,

Modified: developers/werner/ahrt/host/tmc/lib/scope.py
===================================================================
--- developers/werner/ahrt/host/tmc/lib/scope.py        2008-11-22 03:28:50 UTC 
(rev 4813)
+++ developers/werner/ahrt/host/tmc/lib/scope.py        2008-11-22 03:42:01 UTC 
(rev 4814)
@@ -156,7 +156,7 @@
        if self.scope.trigger is not None and self.trigger_get is not None:
            return self.trigger_get(self.scope.trigger)
 
-       
+
 class horizontal(settable):
 
     state_map = [ "RUN", "STOP", "T'D", "WAIT", "SCAN", "AUTO" ]
@@ -346,7 +346,7 @@
 
     def send(self, s):
        scope.send(self, s)
-       time.sleep(0.1)
+       time.sleep(0.3)
 
     # --- functions below are for internal use --------------------------------
 
@@ -378,7 +378,6 @@
        return float(self.query(":ACQ:SAMP? CH1"))
 
     def screendump(self):
-       self.send(":HARDCOPY")
        return rigol_to_ppm(self.query(":LCD:DATA?"))
 
     def wave(self, channels, start = None, end = None, step = None):
@@ -394,3 +393,59 @@
                    la = self.download_la(start, end, step)
                res.append(la[ch])
        return res
+
+    # WORK IN PROGRESS. INTERFACE WILL CHANGE !
+
+    # DS1000C/CD only ! E/D will need a different map.
+    #
+    # Note that we don't check if 400MSa/s mode is actually available.
+
+    rate_map = (
+       ( 400e6,  50e-9 ),      #  50ns/div -> 400MSa/s
+       ( 200e6, 200e-9 ),      # 200ns/div -> 200MSa/s
+       ( 100e6, 200e-6 ),      # 200us/div -> 100MSa/s, mind the gap !
+       (  50e6, 500e-6 ),      # 500us/div ->  50MSa/s
+       (  20e6,   1e-3 ),      #   1ms/div ->  20MSa/s
+       (  10e6,   2e-3 ),      #   2ms/div ->  10MSa/s
+       (   5e6,   5e-3 ),      #   5ms/div ->   5MSa/s
+       (   2e6,  10e-3 ),      #  10ms/div ->   2MSa/s
+       (   1e6,  20e-3 ),      #  20ms/div ->   1MSa/s
+       ( 873813.3125,    50e-3 ),      # mystery clock divider
+       ( 436906.65625,  100e-3 ),      # PLL at 32.768 Hz ?
+       ( 218453.328125, 200e-3 ),      # *80/3 yields 873813.3333... Hz
+       (  87381.335938, 500e-3 ),
+       (  43690.667969,   1 ),
+       (  21845.333984,   2 ),
+       (   8738.133789,   5 ),
+       (   4369.066895,  10 ),
+       (   2184.533447,  20 ),
+       (    873.813354,  50 ),
+    )
+
+    def rate_to_div(self, rate):
+       last = None
+       for e in self.rate_map:
+           if rate > e[0]:
+               break
+           last = e
+       if last is None:
+           raise hell
+       return last[0], last[1]
+
+    def window(self, rate, t0 = None, t1 = None, trigger = 0):
+       real_rate, div = self.rate_to_div(rate)
+       if t0 is not None and t1 is not None:
+           if t0 >= t1:
+               raise hell
+           samples = (t1-t0)*real_rate
+           if samples > 524288:        # 512*1024 Sa
+               raise hell
+       self.hor.pos = 0
+       self.hor.scale = div
+       if t0 is None and t1 is None:
+           self.hor.pos = 0
+       else:
+           if t0 is None:
+               t0 = t1-self.samples/real_rate
+           center = (t0+t1)/2.0
+           self.hor.pos = center-trigger

Modified: developers/werner/ahrt/host/tmc/setup.py
===================================================================
--- developers/werner/ahrt/host/tmc/setup.py    2008-11-22 03:28:50 UTC (rev 
4813)
+++ developers/werner/ahrt/host/tmc/setup.py    2008-11-22 03:42:01 UTC (rev 
4814)
@@ -6,6 +6,7 @@
     py_modules = [ "tmc.instrument",
        "tmc.wave", "tmc.trigger", "tmc.shape",
        "tmc.crc", "tmc.decode", "tmc.dxplore",
+       "tmc.phosphor",
         "tmc.meter", "tmc.scope", "tmc.power", "tmc.function" ],
     package_dir = { "tmc": "lib" },
     ext_modules = [




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to