convert lga16.py to Python3, confirmed identical output
[hw/altusmetrum] / packages / l201.5c
1 /*
2  * Copyright © 2019 Keith Packard <keithp@keithp.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, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  */
14
15 load "footprint.5c"
16 import Footprint;
17
18 element_args();
19
20 /* from the data sheet */
21 real hole_size = 1.65;
22 real pin_space = 4.60;
23
24 /* space between rows on 2-row devices */
25 real row_space = 5.71;
26
27 real package_height = 10.79;
28 real package_width = 19.10;
29
30 /* we're guessing that 1-row devices have pins in the
31  * same place as 2-row devices, with nothing in the other
32  * row
33  */
34
35 real pin_y_off = row_space / 2;
36
37
38 /* made up */
39 real copper = 0.75;
40
41 element_start("l201");
42
43 pin_mm_options(-pin_space, -pin_y_off, hole_size, copper, "1", "1", "square");
44 pin_mm        (         0, -pin_y_off, hole_size, copper, "2", "2");
45 pin_mm        (-pin_space,  pin_y_off, hole_size, copper, "4", "4");
46 pin_mm        (         0,  pin_y_off, hole_size, copper, "5", "5");
47
48 rect(-package_width / 2, -package_height / 2, package_width, package_height);
49
50 element_end();