create a qspi flash memory symbol
[hw/altusmetrum] / packages / switches / 20571.5c
1 /*
2  * Copyright © 2015 Bdale Garbee <bdale@gag.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16  */
17
18 load "../footprint.5c"
19 import Footprint;
20
21 real hole_space_x = 12.5;
22 real hole_space_y = 5.0;
23 real package_width = 12;
24 real package_height = 12;
25 real hole_diameter = 1.20;
26 real hole_copper = 0.3;
27
28 element_start("lph");
29
30 for (int y = 0; y < 2; y++) 
31         for (int x = 0; x < 2; x++) {
32                 int     pin = y + 1;
33                 string  pin_name = sprintf ("%d", pin);
34                 string  options = "";
35                 pin_mm_options (x * hole_space_x - hole_space_x/2, y * hole_space_y - hole_space_y/2, hole_diameter,
36                                 hole_copper, pin_name, pin_name, options);
37         }
38
39 rect(-package_width/2, -package_height/2, package_width, package_height);
40
41 element_end();
42