Add footprints for STM32 and tyco header
authorKeith Packard <keithp@keithp.com>
Sat, 4 Aug 2012 20:22:09 +0000 (13:22 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 4 Aug 2012 20:22:09 +0000 (13:22 -0700)
gnet-partslist-keithp.scm [new file with mode: 0644]
packages/282834-6.fp [new file with mode: 0644]
packages/lqfp64.fp [new file with mode: 0644]

diff --git a/gnet-partslist-keithp.scm b/gnet-partslist-keithp.scm
new file mode 100644 (file)
index 0000000..2d01305
--- /dev/null
@@ -0,0 +1,86 @@
+; Copyright (C) 2001-2010 MIYAMOTO Takanori
+; gnet-partslist-keithp.scm
+; 
+; This program is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or
+; (at your option) any later version.
+; 
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU General Public License for more details.
+; 
+; You should have received a copy of the GNU General Public License
+; along with this program; if not, write to the Free Software
+; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+; The /'s may not work on win32
+(load (string-append gedadata "/scheme/gnet-partslist-common.scm"))
+
+(define partslist-keithp:write-top-header
+  (lambda (port)
+    (display ".START\n" port)
+    (display "..device\tvalue\tfootprint\t\tvendor\tvendor_part_number\tquantity\trefdes\n" port)))
+
+(define (partslist-keithp:write-partslist ls port)
+  (if (null? ls)
+      '()
+      (begin (write-one-row (cdar ls) "\t" "\t" port)
+            (write-one-row (caar ls) " " "\n" port)
+            (partslist-keithp:write-partslist (cdr ls) port))))
+
+(define partslist-keithp:write-bottom-footer
+  (lambda (port)
+    (display ".END" port)
+    (newline port)))
+
+(define (count-same-parts ls)
+  (if (null? ls)
+      (append ls)
+      (let* ((parts-table-no-uref (let ((result '()))
+                                   (for-each (lambda (l) (set! result (cons (cdr l) result))) (reverse ls))
+                                   (append result)))
+            (first-ls (car parts-table-no-uref))
+            (match-length (length (member first-ls (reverse parts-table-no-uref))))
+            (rest-ls (list-tail ls match-length))
+            (match-ls (list-tail (reverse ls) (- (length ls) match-length)))
+            (uref-ls (let ((result '()))
+                       (for-each (lambda (l) (set! result (cons (car l) result))) match-ls)
+                       (append result))))
+       (cons (cons uref-ls (append first-ls  (list match-length))) (count-same-parts rest-ls)))))
+
+(define get-vendor
+   (lambda (package)
+      (gnetlist:get-package-attribute package "vendor")))
+
+(define get-vendor-part-number
+   (lambda (package)
+      (gnetlist:get-package-attribute package "vendor_part_number")))
+
+(define get-footprint
+   (lambda (package)
+      (gnetlist:get-package-attribute package "footprint")))
+
+(define (get-parts-table-keithp packages)
+  (if (null? packages)
+      '()
+      (let ((package (car packages)))
+       (if (string=? (get-device package) "include")
+           (get-parts-table-keithp (cdr packages))
+           (cons (list package
+                       (get-device package)
+                       (get-value package)
+                       (get-footprint package)
+                       (get-vendor package)
+                       (get-vendor-part-number package)) ;; sdb change
+                 (get-parts-table-keithp (cdr packages)))))))
+
+(define partslist-keithp
+  (lambda (output-filename)
+    (let ((port (open-output-file output-filename))
+         (parts-table (marge-sort-with-multikey (get-parts-table-keithp packages) '(1 2 3 0))))
+      (set! parts-table (count-same-parts parts-table))
+      (partslist-keithp:write-top-header port)
+      (partslist-keithp:write-partslist parts-table port)
+      (close-output-port port))))
diff --git a/packages/282834-6.fp b/packages/282834-6.fp
new file mode 100644 (file)
index 0000000..6896b4e
--- /dev/null
@@ -0,0 +1,17 @@
+# author: Bdale Garbee
+# email: bdale@gag.com
+# dist-license: GPL 2
+# use-license: unlimited
+Element[0x0 "282834-6" "" "" 0 0 0 0 0 100 0x0]
+(
+   Pin[ 5906 12795 7087 1260 8346 4528 "pin6" "6" 0x0001 ]
+   Pin[ 15906 12795 7087 1260 8346 4528 "pin5" "5" 0x0001 ]
+   Pin[ 25906 12795 7087 1260 8346 4528 "pin4" "4" 0x0001 ]
+   Pin[ 35906 12795 7087 1260 8346 4528 "pin3" "3" 0x0001 ]
+   Pin[ 45906 12795 7087 1260 8346 4528 "pin2" "2" 0x0001 ]
+   Pin[ 55906 12795 7087 1260 8346 4528 "pin1" "1" 0x0101 ]
+   ElementLine[ 0 0 0 25591 600 ]
+   ElementLine[ 0 25591 61811 25591 600 ]
+   ElementLine[ 61811 25591 61811 0 600 ]
+   ElementLine[ 61811 0 0 0 600 ]
+)
diff --git a/packages/lqfp64.fp b/packages/lqfp64.fp
new file mode 100644 (file)
index 0000000..85b48e5
--- /dev/null
@@ -0,0 +1,76 @@
+# author: Bdale Garbee
+# email: bdale@gag.com
+# dist-license: GPL 2
+# use-license: unlimited
+Element[0x0 "LQFP100" "" "" 0 0 0 0 0 100 0x0]
+(
+   Pad[ -14763 -24408 -14763 -20865 1181 787 1811 "pin16" "16" 0x0100]
+   Pad[ -14763 20866 -14763 24409 1181 787 1811 "pin33" "33" 0x0100]
+   Pad[ 20866 -14763 24409 -14763 1181 787 1811 "pin64" "64" 0x0100]
+   Pad[ -24408 -14763 -20865 -14763 1181 787 1811 "pin17" "17" 0x0100]
+   Pad[ -12794 -24408 -12794 -20865 1181 787 1811 "pin15" "15" 0x0100]
+   Pad[ -12794 20866 -12794 24409 1181 787 1811 "pin34" "34" 0x0100]
+   Pad[ 20866 -12794 24409 -12794 1181 787 1811 "pin63" "63" 0x0100]
+   Pad[ -24408 -12794 -20865 -12794 1181 787 1811 "pin18" "18" 0x0100]
+   Pad[ -10826 -24408 -10826 -20865 1181 787 1811 "pin14" "14" 0x0100]
+   Pad[ -10826 20866 -10826 24409 1181 787 1811 "pin35" "35" 0x0100]
+   Pad[ 20866 -10826 24409 -10826 1181 787 1811 "pin62" "62" 0x0100]
+   Pad[ -24408 -10826 -20865 -10826 1181 787 1811 "pin19" "19" 0x0100]
+   Pad[ -8857 -24408 -8857 -20865 1181 787 1811 "pin13" "13" 0x0100]
+   Pad[ -8857 20866 -8857 24409 1181 787 1811 "pin36" "36" 0x0100]
+   Pad[ 20866 -8857 24409 -8857 1181 787 1811 "pin61" "61" 0x0100]
+   Pad[ -24408 -8857 -20865 -8857 1181 787 1811 "pin20" "20" 0x0100]
+   Pad[ -6889 -24408 -6889 -20865 1181 787 1811 "pin12" "12" 0x0100]
+   Pad[ -6889 20866 -6889 24409 1181 787 1811 "pin37" "37" 0x0100]
+   Pad[ 20866 -6889 24409 -6889 1181 787 1811 "pin60" "60" 0x0100]
+   Pad[ -24408 -6889 -20865 -6889 1181 787 1811 "pin21" "21" 0x0100]
+   Pad[ -4920 -24408 -4920 -20865 1181 787 1811 "pin11" "11" 0x0100]
+   Pad[ -4920 20866 -4920 24409 1181 787 1811 "pin38" "38" 0x0100]
+   Pad[ 20866 -4920 24409 -4920 1181 787 1811 "pin59" "59" 0x0100]
+   Pad[ -24408 -4920 -20865 -4920 1181 787 1811 "pin22" "22" 0x0100]
+   Pad[ -2952 -24408 -2952 -20865 1181 787 1811 "pin10" "10" 0x0100]
+   Pad[ -2952 20866 -2952 24409 1181 787 1811 "pin39" "39" 0x0100]
+   Pad[ 20866 -2952 24409 -2952 1181 787 1811 "pin58" "58" 0x0100]
+   Pad[ -24408 -2952 -20865 -2952 1181 787 1811 "pin23" "23" 0x0100]
+   Pad[ -983 -24408 -983 -20865 1181 787 1811 "pin9" "9" 0x0100]
+   Pad[ -983 20866 -983 24409 1181 787 1811 "pin40" "40" 0x0100]
+   Pad[ 20866 -983 24409 -983 1181 787 1811 "pin57" "57" 0x0100]
+   Pad[ -24408 -983 -20865 -983 1181 787 1811 "pin24" "24" 0x0100]
+   Pad[ 984 -24408 984 -20865 1181 787 1811 "pin8" "8" 0x0100]
+   Pad[ 984 20866 984 24409 1181 787 1811 "pin41" "41" 0x0100]
+   Pad[ 20866 984 24409 984 1181 787 1811 "pin56" "56" 0x0100]
+   Pad[ -24408 984 -20865 984 1181 787 1811 "pin25" "25" 0x0100]
+   Pad[ 2953 -24408 2953 -20865 1181 787 1811 "pin7" "7" 0x0100]
+   Pad[ 2953 20866 2953 24409 1181 787 1811 "pin42" "42" 0x0100]
+   Pad[ 20866 2953 24409 2953 1181 787 1811 "pin55" "55" 0x0100]
+   Pad[ -24408 2953 -20865 2953 1181 787 1811 "pin26" "26" 0x0100]
+   Pad[ 4921 -24408 4921 -20865 1181 787 1811 "pin6" "6" 0x0100]
+   Pad[ 4921 20866 4921 24409 1181 787 1811 "pin43" "43" 0x0100]
+   Pad[ 20866 4921 24409 4921 1181 787 1811 "pin54" "54" 0x0100]
+   Pad[ -24408 4921 -20865 4921 1181 787 1811 "pin27" "27" 0x0100]
+   Pad[ 6890 -24408 6890 -20865 1181 787 1811 "pin5" "5" 0x0100]
+   Pad[ 6890 20866 6890 24409 1181 787 1811 "pin44" "44" 0x0100]
+   Pad[ 20866 6890 24409 6890 1181 787 1811 "pin53" "53" 0x0100]
+   Pad[ -24408 6890 -20865 6890 1181 787 1811 "pin28" "28" 0x0100]
+   Pad[ 8858 -24408 8858 -20865 1181 787 1811 "pin4" "4" 0x0100]
+   Pad[ 8858 20866 8858 24409 1181 787 1811 "pin45" "45" 0x0100]
+   Pad[ 20866 8858 24409 8858 1181 787 1811 "pin52" "52" 0x0100]
+   Pad[ -24408 8858 -20865 8858 1181 787 1811 "pin29" "29" 0x0100]
+   Pad[ 10827 -24408 10827 -20865 1181 787 1811 "pin3" "3" 0x0100]
+   Pad[ 10827 20866 10827 24409 1181 787 1811 "pin46" "46" 0x0100]
+   Pad[ 20866 10827 24409 10827 1181 787 1811 "pin51" "51" 0x0100]
+   Pad[ -24408 10827 -20865 10827 1181 787 1811 "pin30" "30" 0x0100]
+   Pad[ 12795 -24408 12795 -20865 1181 787 1811 "pin2" "2" 0x0100]
+   Pad[ 12795 20866 12795 24409 1181 787 1811 "pin47" "47" 0x0100]
+   Pad[ 20866 12795 24409 12795 1181 787 1811 "pin50" "50" 0x0100]
+   Pad[ -24408 12795 -20865 12795 1181 787 1811 "pin31" "31" 0x0100]
+   Pad[ 14764 -24408 14764 -20865 1181 787 1811 "pin1" "1" 0x0100]
+   Pad[ 14764 20866 14764 24409 1181 787 1811 "pin48" "48" 0x0100]
+   Pad[ 20866 14764 24409 14764 1181 787 1811 "pin49" "49" 0x0100]
+   Pad[ -24408 14764 -20865 14764 1181 787 1811 "pin32" "32" 0x0100]
+   ElementLine[ -19684 -19684 -19684 19685 1000 ]
+   ElementLine[ -19684 19685 19685 19685 1000 ]
+   ElementLine[ 19685 19685 19685 -19684 1000 ]
+   ElementLine[ 19685 -19684 -19684 -19684 1000 ]
+   ElementArc[ 20866 -20865 500 500 0 360 1000 ]
+)