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
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

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

   1. r5486 - in trunk/gta02-core/docs/ecn: . ecn0030
      (wer...@docs.openmoko.org)
   2. r5487 - trunk/eda/fped (wer...@docs.openmoko.org)
   3. r5488 - trunk/gta02-core/docs (wer...@docs.openmoko.org)
   4. r5489 - trunk/gta02-core/components (wer...@docs.openmoko.org)
   5. r5490 - trunk/eda/fped (wer...@docs.openmoko.org)
   6. r5491 - trunk/gta02-core/docs/ecn (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2009-08-19 12:36:03 +0200 (Wed, 19 Aug 2009)
New Revision: 5486

Added:
   trunk/gta02-core/docs/ecn/ecn0030/
   trunk/gta02-core/docs/ecn/ecn0030/lvl.pl
Log:
- ECN0030 (modem) complement: level-shifting with a resistive divider



Added: trunk/gta02-core/docs/ecn/ecn0030/lvl.pl
===================================================================
--- trunk/gta02-core/docs/ecn/ecn0030/lvl.pl                            (rev 0)
+++ trunk/gta02-core/docs/ecn/ecn0030/lvl.pl    2009-08-19 10:36:03 UTC (rev 
5486)
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+$Vol_max = 0.4;
+$Voh_min = 2.4;
+$Voh_max = 3.3;
+
+$Rs = 82e3;
+$Rp = 1000e3;
+
+$Ii = 1e-6;
+
+
+sub v
+{
+    local ($v, $rs, $rp, $i) = @_;
+
+    return ($v-$rs*$i)/(1+$rs/$rp);
+}
+
+print "Vil(max) = ", &v($Vol_max, $Rs*0.95, $Rp*1.05, -$Ii), " V\n";
+print "Vih(min) = ", &v($Voh_min, $Rs*1.05, $Rp*0.95, $Ii), " V\n";
+print "Vih(max) = ", &v($Voh_max, $Rs*0.95, $Rp*1.05, $Ii), " V\n";
+print "Ileak(max) = ", $Voh_max/($Rs*0.95+$Rp*0.95)*1e6, " uA\n";


Property changes on: trunk/gta02-core/docs/ecn/ecn0030/lvl.pl
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-08-19 16:38:59 +0200 (Wed, 19 Aug 2009)
New Revision: 5487

Modified:
   trunk/eda/fped/Makefile
   trunk/eda/fped/README
   trunk/eda/fped/TODO
   trunk/eda/fped/gui_style.c
Log:
- Makefile: now requires /bin/bash (for PIPESTATUS)
- Makefile: use PIPESTATUS to catch errors in the icon conversion pipe
- Makefile: whitespace and comment cleanup
- gui_style.c: removed no longer needed definition of INVALID



Modified: trunk/eda/fped/Makefile
===================================================================
--- trunk/eda/fped/Makefile     2009-08-19 10:36:03 UTC (rev 5486)
+++ trunk/eda/fped/Makefile     2009-08-19 14:38:59 UTC (rev 5487)
@@ -24,17 +24,18 @@
        meas.xpm meas_x.xpm meas_y.xpm \
        stuff.xpm stuff_off.xpm meas_off.xpm
 
+SHELL = /bin/bash
 CFLAGS_GTK = `pkg-config --cflags gtk+-2.0`
 LIBS_GTK = `pkg-config --libs gtk+-2.0`
 
-CFLAGS_WARN=-Wall -Wshadow -Wmissing-prototypes \
-            -Wmissing-declarations -Wno-format-zero-length
-CFLAGS=-g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' $(CFLAGS_WARN)
-SLOPPY=-Wno-unused -Wno-implicit-function-declaration -Wno-missing-prototypes \
-       -Wno-missing-declarations
+CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
+             -Wmissing-declarations -Wno-format-zero-length
+CFLAGS = -g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' $(CFLAGS_WARN)
+SLOPPY = -Wno-unused -Wno-implicit-function-declaration \
+        -Wno-missing-prototypes -Wno-missing-declarations
 LDLIBS = -lm -lfl $(LIBS_GTK)
-YACC=bison -y
-YYFLAGS=-v
+YACC = bison -y
+YYFLAGS = -v
 
 # ----- Verbosity control -----------------------------------------------------
 
@@ -75,13 +76,11 @@
 
 # generate 26x26 pixels icons, then drop the 1-pixel frame
 
-# this adds a magenta border
-# sed '/2 2 0 1 /{s//2 2 0 15 /;s/ 0 7 / 22 7 /;}' $< | \
-
 .fig.xpm:
                $(GEN) fig2dev -L xpm -Z 0.32 -S 4 $< | \
                  convert -crop 24x24+1+1 - - | \
-                 sed "s/*.*\[]/*xpm_`basename $@ .xpm`[]/" >$@
+                 sed "s/*.*\[]/*xpm_`basename $@ .xpm`[]/" >$@; \
+                 [ "$${PIPESTATUS[*]}" = "0 0 0" ] || { rm -f $@; exit 1; }
 
 all:           fped
 

Modified: trunk/eda/fped/README
===================================================================
--- trunk/eda/fped/README       2009-08-19 10:36:03 UTC (rev 5486)
+++ trunk/eda/fped/README       2009-08-19 14:38:59 UTC (rev 5487)
@@ -15,6 +15,7 @@
 
 Prerequisites:
 
+- bash
 - flex
 - bison
 - fig2dev

Modified: trunk/eda/fped/TODO
===================================================================
--- trunk/eda/fped/TODO 2009-08-19 10:36:03 UTC (rev 5486)
+++ trunk/eda/fped/TODO 2009-08-19 14:38:59 UTC (rev 5487)
@@ -20,7 +20,6 @@
   upper toolbar
 - status area looks awful
 - add button with GTK_STOCK_UNDELETE for "undelete" to menu bar
-- edit names/values/etc. in place if possible
 - maximizing pad name size creates uneven text sizes. Particularly "1" gets
   excessively large.
 - pango_layout_get_size doesn't seem to consider rotation, so we currently
@@ -66,12 +65,14 @@
   we can already approximate this by introducing an intermediate table that
   sets up the arguments (provided that we don't consider vectors as well)
 - Q: should we make it a requirement to generate objects only once ?
-  A: almost certainly yes.
+  A: yes.
 
 Future directions:
 - future: consider using cairo instead of gdk
 - live update of value when entering strings and expressions ?
 - advanced: non-standard solder mask
 - advanced: solder paste exceptions (subtractive, additive)
+- advanced: holes
 - advanced: silk line width
-- future: consider editing non-canvas items in place
+- future: consider editing non-canvas items (e.g., variable names/values) in
+  place

Modified: trunk/eda/fped/gui_style.c
===================================================================
--- trunk/eda/fped/gui_style.c  2009-08-19 10:36:03 UTC (rev 5486)
+++ trunk/eda/fped/gui_style.c  2009-08-19 14:38:59 UTC (rev 5487)
@@ -18,9 +18,6 @@
 #include "gui_style.h"
 
 
-#define        INVALID "#00ffff"
-
-
 GdkGC *gc_bg, *gc_bg_error;
 GdkGC *gc_drag;
 GdkGC *gc_highlight;




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-08-19 16:39:03 +0200 (Wed, 19 Aug 2009)
New Revision: 5488

Modified:
   trunk/gta02-core/docs/GETTING-STARTED
Log:
- fped now requires bash



Modified: trunk/gta02-core/docs/GETTING-STARTED
===================================================================
--- trunk/gta02-core/docs/GETTING-STARTED       2009-08-19 14:38:59 UTC (rev 
5487)
+++ trunk/gta02-core/docs/GETTING-STARTED       2009-08-19 14:39:03 UTC (rev 
5488)
@@ -53,6 +53,7 @@
 
   - Prerequisites:
 
+    - bash
     - flex
     - bison
     - fig2dev




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-08-19 16:53:19 +0200 (Wed, 19 Aug 2009)
New Revision: 5489

Modified:
   trunk/gta02-core/components/STATUS
Log:
- Werner reviewed the GE865 module



Modified: trunk/gta02-core/components/STATUS
===================================================================
--- trunk/gta02-core/components/STATUS  2009-08-19 14:39:03 UTC (rev 5488)
+++ trunk/gta02-core/components/STATUS  2009-08-19 14:53:19 UTC (rev 5489)
@@ -15,7 +15,7 @@
 emh4                   Q1501   Alvaro  Werner  Dave    Rene
 exc24cb102u            B3004   Alvaro  Werner  Dave    Rene
 fa2012                 RP6001  Alvaro  Werner  Dave    Rene
-ge865                          Dave
+ge865                          Dave    Werner
 gta02_power            -       Alvaro  Werner
 gta02_wlan_s           CON7901 Rene
 ht110                  LED1502 Dave




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-08-20 00:13:47 +0200 (Thu, 20 Aug 2009)
New Revision: 5490

Modified:
   trunk/eda/fped/dump.c
   trunk/eda/fped/fbga.fpd
   trunk/eda/fped/inst.h
   trunk/eda/fped/obj.h
   trunk/eda/fped/postscript.c
   trunk/eda/fped/sc89.fpd
Log:
- postscript.c: always run flattenpath before pathbbox
- postscript.c: fixed algorithm in "center"
- dump.c: reorder frames if we would end up with forward-references
- sc89.fpd, fbga.fpd: changed "part" to new "package"



Modified: trunk/eda/fped/dump.c
===================================================================
--- trunk/eda/fped/dump.c       2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/dump.c       2009-08-19 22:13:47 UTC (rev 5490)
@@ -436,8 +436,7 @@
 /* ----- frames ------------------------------------------------------------ */
 
 
-static void dump_frame(FILE *file, const struct frame *frame,
-    const char *indent)
+static void dump_frame(FILE *file, struct frame *frame, const char *indent)
 {
        const struct table *table;
        const struct loop *loop;
@@ -446,6 +445,17 @@
        const struct order *item;
        char *s, *s1;
 
+       if (frame->dumped)
+               return;
+       frame->dumped = 1;
+
+       for (obj = frame->objs; obj; obj = obj->next)
+               if (obj->type == ot_frame)
+                       dump_frame(file, obj->u.frame.ref, "\t");
+
+       if (frame->name)
+               fprintf(file, "frame %s {\n", frame->name);
+
        for (table = frame->tables; table; table = table->next)
                dump_table(file, table, indent);
        for (loop = frame->loops; loop; loop = loop->next)
@@ -472,6 +482,9 @@
                fprintf(file, "%s%s\n", indent, s);
                free(s);
        }
+
+       if (frame->name)
+               fprintf(file, "}\n\n");
 }
 
 
@@ -480,17 +493,17 @@
 
 int dump(FILE *file)
 {
-       const struct frame *frame;
+       struct frame *frame;
 
        fprintf(file, "/* MACHINE-GENERATED ! */\n\n");
+       for (frame = frames; frame; frame = frame->next)
+               frame->dumped = 0;
        for (frame = frames; frame; frame = frame->next) {
                if (!frame->name) {
                        fprintf(file, "package \"%s\"\n", pkg_name);
                        dump_frame(file, frame, "");
                } else {
-                       fprintf(file, "frame %s {\n", frame->name);
                        dump_frame(file, frame, "\t");
-                       fprintf(file, "}\n\n");
                }
        }
        fflush(file);

Modified: trunk/eda/fped/fbga.fpd
===================================================================
--- trunk/eda/fped/fbga.fpd     2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/fbga.fpd     2009-08-19 22:13:47 UTC (rev 5490)
@@ -35,7 +35,7 @@
        frame pad @
 }
 
-part "Fake_BGA"
+package "Fake_BGA"
 table
     { row, rname, inner }
     { 0, "A", 1 }

Modified: trunk/eda/fped/inst.h
===================================================================
--- trunk/eda/fped/inst.h       2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/inst.h       2009-08-19 22:13:47 UTC (rev 5490)
@@ -72,7 +72,6 @@
 struct inst {
        const struct inst_ops *ops;
        struct coord base;
-//     struct inst *base_inst; /* frame or vector leading to this item */
        struct bbox bbox;
        struct vec *vec; /* NULL if not vector */
        struct obj *obj; /* NULL if not object */

Modified: trunk/eda/fped/obj.h
===================================================================
--- trunk/eda/fped/obj.h        2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/obj.h        2009-08-19 22:13:47 UTC (rev 5490)
@@ -122,6 +122,9 @@
        /* generating and editing */
        struct obj *active_ref;
 
+       /* for dumping */
+       int dumped;
+
        /* for the GUI */
        GtkWidget *label;
 };

Modified: trunk/eda/fped/postscript.c
===================================================================
--- trunk/eda/fped/postscript.c 2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/postscript.c 2009-08-19 22:13:47 UTC (rev 5490)
@@ -31,6 +31,8 @@
 #define        PS_MEAS_ARROW_ANGLE     30
 #define        PS_MEAS_TEXT_HEIGHT     mm_to_units(0.2)
 #define        PS_MEAS_BASE_OFFSET     mm_to_units(0.05)
+#define        PS_CROSS_WIDTH          mm_to_units(0.01)
+#define        PS_CROSS_DASH           mm_to_units(0.1)
 
 
 struct postscript_params postscript_params = {
@@ -274,6 +276,18 @@
 }
 
 
+static void ps_cross(FILE *file, const struct inst *inst)
+{
+       fprintf(file, "gsave 0 setgray %d setlinewidth\n", PS_CROSS_WIDTH);
+       fprintf(file, "    [%d] 0 setdash\n", PS_CROSS_DASH);
+       fprintf(file, "    %d 0 moveto %d 0 lineto\n",
+           inst->bbox.min.x, inst->bbox.max.x);
+       fprintf(file, "    0 %d moveto 0 %d lineto\n",
+           inst->bbox.min.y, inst->bbox.max.y);
+       fprintf(file, "    stroke grestore \n");
+}
+
+
 int postscript(FILE *file)
 {
        enum inst_prio prio;
@@ -292,7 +306,7 @@
 
        fprintf(file,
 "/dotpath {\n"
-"    gsave pathbbox clip newpath\n"
+"    gsave flattenpath pathbbox clip newpath\n"
 "    1 setlinecap %d setlinewidth\n"
 "    /ury exch def /urx exch def /lly exch def /llx exch def\n"
 "    llx %d urx {\n"
@@ -304,7 +318,7 @@
 
        fprintf(file,
 "/hatchpath {\n"
-"     gsave pathbbox clip newpath\n"
+"     gsave flattenpath pathbbox clip newpath\n"
 "    /ury exch def /urx exch def /lly exch def /llx exch def\n"
 "    lly ury sub %d urx llx sub {\n"   /* for -(ury-lly) to urx-llx */
 "      llx add dup lly moveto\n"
@@ -314,7 +328,7 @@
 
        fprintf(file,
 "/backhatchpath {\n"
-"     gsave pathbbox clip newpath\n"
+"     gsave flattenpath pathbbox clip newpath\n"
 "    /ury exch def /urx exch def /lly exch def /llx exch def\n"
 "    0 %d ury lly sub urx llx sub add {\n"     /* for 0 to urx-llx_ury-lly */
 "      llx add dup lly moveto\n"
@@ -335,7 +349,7 @@
 "    gsave 0 0 moveto\n"
 "    /f exch def /h exch def /w exch def\n"
 "    exch f scalefont setfont\n"
-"    false charpath pathbbox\n"
+"    false charpath flattenpath pathbbox\n"
 "    /ury exch def /urx exch def /lly exch def /llx exch def\n"
 "    w urx llx sub div h ury lly sub div 2 copy gt { exch } if pop\n"
 "    f mul grestore } def\n");
@@ -346,10 +360,12 @@
 
        fprintf(file,
 "/center {\n"
-"    gsave dup false charpath pathbbox\n"
-"    /ury exch def /urx exch def /lly exch def /llx exch def\n"
+"    currentpoint /y exch def /x exch def\n"
+"    gsave dup false charpath flattenpath pathbbox\n"
+"    /ury exch def /urx exch def\n"
+"    /lly exch def /llx exch def\n"
 "    grestore\n"
-"    llx urx sub 2 div lly ury sub 2 div rmoveto } def\n");
+"    x llx urx add 2 div sub y lly ury add 2 div sub rmoveto } def\n");
 
        /*
         * Stack: string dist -> string
@@ -358,7 +374,7 @@
        fprintf(file,
 "/hcenter {\n"
 "    /off exch def\n"
-"    gsave dup false charpath pathbbox\n"
+"    gsave dup false charpath flattenpath pathbbox\n"
 "    /ury exch def /urx exch def /lly exch def /llx exch def\n"
 "    grestore\n"
 "    llx urx sub 2 div\n"
@@ -371,9 +387,20 @@
        fprintf(file,
 "/showoutlined {\n"
 "    gsave 2 mul setlinewidth 1 setgray\n"
-"    dup false charpath stroke grestore\n"
+"    dup false charpath flattenpath stroke grestore\n"
 "    show } def\n");
 
+       /*
+        * Stack: string -> string
+        */
+
+fprintf(file,
+"/debugbox { gsave dup false charpath flattenpath pathbbox\n"
+"    /ury exch def /urx exch def /lly exch def /llx exch def\n"
+"    0 setgray 100 setlinewidth\n"
+"    llx lly urx llx sub ury lly sub rectstroke grestore } def\n");
+
+       ps_cross(file, pkgs->insts[ip_frame]);
        FOR_INST_PRIOS_UP(prio)
                FOR_ALL_INSTS(i, prio, inst)
                        ps_background(file, prio, inst);

Modified: trunk/eda/fped/sc89.fpd
===================================================================
--- trunk/eda/fped/sc89.fpd     2009-08-19 14:53:19 UTC (rev 5489)
+++ trunk/eda/fped/sc89.fpd     2009-08-19 22:13:47 UTC (rev 5490)
@@ -50,7 +50,7 @@
        line top_left . 5mil
 }
 
-part "SC89"
+package "SC89"
 table
     { Px, Py, Gy, Wx }
     { 0.5mm, 0.6mm, 0.7mm, 1.5mm }




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-08-20 07:14:37 +0200 (Thu, 20 Aug 2009)
New Revision: 5491

Modified:
   trunk/gta02-core/docs/ecn/STATUS
   trunk/gta02-core/docs/ecn/ecn0015.txt
   trunk/gta02-core/docs/ecn/ecn0031.txt
Log:
- ECN0031 (codec interrupt): added details of the conversion
- ECN0031: moved to "Discuss"
- ECN0015 (Calypso backdoor removal): we remove(d) R4405, not R4408
- ECN0015: "to do", removal of remaining bits, has been done as well
- ECN0015: clarified that R4405/7 aren't dead yet, just 0R.



Modified: trunk/gta02-core/docs/ecn/STATUS
===================================================================
--- trunk/gta02-core/docs/ecn/STATUS    2009-08-19 22:13:47 UTC (rev 5490)
+++ trunk/gta02-core/docs/ecn/STATUS    2009-08-20 05:14:37 UTC (rev 5491)
@@ -30,7 +30,7 @@
 0028   Cancel  Remove USB "charge path" power switch U4905
 0029   Discuss Move 0R resistors next to PMU after caps
 0030   Edit    Replace Calypso with Telit GE865
-0031   Edit    Use codec to detect jack insertion and HOLD button
+0031   Discuss Use codec to detect jack insertion and HOLD button
 
 
 Open ECNs

Modified: trunk/gta02-core/docs/ecn/ecn0015.txt
===================================================================
--- trunk/gta02-core/docs/ecn/ecn0015.txt       2009-08-19 22:13:47 UTC (rev 
5490)
+++ trunk/gta02-core/docs/ecn/ecn0015.txt       2009-08-20 05:14:37 UTC (rev 
5491)
@@ -5,13 +5,13 @@
 
 Changes:
 - removed U4401
-- removed R4407 and R4408, these resistors probably keept the input signal from
-  shorting through the amplifier, so there is no need for them anymore.
+- changed R4407 and R4405 from 33 Ohm to 0 Ohm. These resistors probably kept
+  the input signal from shorting through the amplifier, so there is no need
+  for them anymore. (Remove them completely ?)
 - removed TP4405/4406
 - removed R4403, pulldown resistor for U4401 enable lines 
+- remove R4411 and TP4402/4401 as well
 
-To do:
-- depending on Calypso replacement we might want to keep/remove R4411 and 
TP4402/4401 as well
 
-
 Author: Rene Harder <re...@saweb.de>
+Review: Werner Almesberger <wer...@openmoko.org>, SVN 5490

Modified: trunk/gta02-core/docs/ecn/ecn0031.txt
===================================================================
--- trunk/gta02-core/docs/ecn/ecn0031.txt       2009-08-19 22:13:47 UTC (rev 
5490)
+++ trunk/gta02-core/docs/ecn/ecn0031.txt       2009-08-20 05:14:37 UTC (rev 
5491)
@@ -4,14 +4,43 @@
 The Wolfson WM8753L has the ability to detect jack insertion and pressing
 the HOLD button (MIC bias short-circuit).
 
-Rough outline:
-- HOLD seems to be internal, ok
-- route JACK_INSERT to the codec (GPIO4), not the CPU
+Outline (based on Joerg's "mega-ECN"):
+
+- HOLD is detected inside the codec:
+  - remove R4410, R1531
+  - remove nHOLD net
+  - free EINT7
+- route JACK_INSERT to the codec, not the CPU:
+  - remove R4406
+  - disconnect R1532 from the JACK_INSERT net
+  - connect JACK_INSERT to a new 10 kOhm series resistor (To protect codec
+    against negative transients from the output capacitors. The name R4402
+    is available.)
+  - connect the other end of R4402 to the codec's GPIO4
 - route codec IRQ (GP1) to CPU
+  - name net CODEC_IRQ
+  - connect codec GP1 to R1532
+  - EINT4 is now CODEC_IRQ, not JACK_INSERT
 
-Q: how do we distinguish multiple interrupt sources ? Mask and see if
-the interrupt persists ? Or would we have to upgrade to a 3-wire interface
-so that we could read data back ? (Seems too intrusive.)
+Q: how do we distinguish multiple interrupt sources ?
+A: Mask and see if the interrupt persists.
 
+again:
+       HPSWIEN = 0;                            /* mask jack insert */
+       /* assume active-low */
+       if (gpio_get_value(CODEC_INT)) {
+               /* interrupt went away - it's JACK_INSERT */
+               HPSWIPOL = !HPSWIPOL;
+       } else {
+               /* interrupt is still pending - it's HOLD */
+               MICSHTEN = 0;
+               MICSHTPOL = !MICSHTPOL;
+               MICSHTEN = 1;
+       }
+       HPSWIEN = 1;
+       /* more than one source or new interrupt */
+       if (!gpio_get_value(CODEC_INT))
+               goto again;
 
+
 Author: Werner Almesberger <wer...@openmoko.org>




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

Reply via email to