SMA connectors cheaper at DK now
[hw/altusmetrum] / packages / sk6812.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 element_args();
18
19 /* from the data sheet */
20
21 real pad_x_edge = 5.4;  /* outside edge to outside edge */
22 real pad_y_edge = 4.2;  /* outside edge to outside edge */
23 real pad_width = 1.5;
24 real pad_height = 1.5;
25
26 real pad_x_space = pad_x_edge - pad_width;
27 real pad_y_space = pad_y_edge - pad_height;
28
29 real pad_x_off = pad_x_space / 2.0;
30 real pad_y_off = pad_y_space / 2.0;
31
32 real line_off = pad_width * 2/3;
33
34 element_start("sk6812");
35
36 pad_mm(pad_x_off, pad_y_off, pad_width, pad_height, "1", "1");
37 pad_mm(pad_x_off, -pad_y_off, pad_width, pad_height, "2", "2");
38
39 pad_mm(-pad_x_off, -pad_y_off, pad_width, pad_height, "3", "3");
40 pad_mm(-pad_x_off, pad_y_off, pad_width, pad_height, "4", "4");
41
42 line(pad_x_off + line_off, pad_y_off + line_off,
43      pad_x_off + line_off, pad_y_off + line_off);
44
45 element_end();