Add LPH series switch footprint
authorKeith Packard <keithp@keithp.com>
Mon, 15 Jul 2013 22:08:05 +0000 (15:08 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 15 Jul 2013 22:08:05 +0000 (15:08 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/switches/Makefile
packages/switches/lph.5c [new file with mode: 0644]

index f10b24b472bb2cabb89c5c65fa73866eeee86d9d..b8e0de317b29fdaec0cc702fce3dccab2039a6f0 100644 (file)
@@ -1,7 +1,8 @@
 .SUFFIXES: .5c .py .fp
 
 FOOTPRINTS = \
-       cus-12.fp
+       cus-12.fp \
+       lph.fp
 
 .5c.fp:
        nickle $*.5c > $@
diff --git a/packages/switches/lph.5c b/packages/switches/lph.5c
new file mode 100644 (file)
index 0000000..0921093
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2012 Keith Packard <keithp@keithp.com>
+ *
+ * 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; version 2 of the License.
+ *
+ * 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.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+load "../footprint.5c"
+import Footprint;
+
+real hole_space_x = 6.5;
+real hole_space_y = 4.5;
+real package_width = 6;
+real package_height = 6;
+real hole_diameter = 1;
+real hole_copper = 0.3;
+
+element_start("lph");
+
+for (int y = 0; y < 2; y++) 
+       for (int x = 0; x < 2; x++) {
+               int     pin = (x + y * 2) + 1;
+               string  pin_name = sprintf ("%d", pin);
+               string  options = pin == 1 ? "square" : "";
+               pin_mm_options (x * hole_space_x - hole_space_x/2, y * hole_space_y - hole_space_y/2, hole_diameter,
+                               hole_copper, pin_name, pin_name, options);
+       }
+
+rect(-package_width/2, -package_height/2, package_width, package_height);
+
+element_end();
+