5 # PCB, interactive printed circuit board design
6 # Copyright (C) 1994,1995,1996 Thomas Nau
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 # Contact addresses for paper mail and Email:
23 # Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
24 # Thomas.Nau@rz.uni-ulm.de
27 # common defines for packages
29 # -------------------------------------------------------------------
30 # create a single object
32 # $2: 'value' of the new object
33 # $3: package of the circuit
35 define(`CreateObject',
36 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
37 `PKG_$3(`Description_$1', ,``$2'', Param1_$1, Param2_$1)'
40 # this one is used to show the correct value for the footprint attribute
41 # in a gschem (www.geda.seul.org) schematic. See QueryLibrary.sh
43 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
44 `$3 ifdef(`Param1_$1', `Param1_$1') ifdef(`Param2_$1', `Param2_$1')'
47 # -------------------------------------------------------------------
48 # define for-loops like the manual tells us
51 `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
53 `$4`'ifelse(eval($1 < `$3'), 1,
54 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
56 # -------------------------------------------------------------------
57 # the following definitions evaluate the list of pin-names
58 # missing names will be defined as 'P_#'
60 # the first two arguments are skipped
62 define(`PIN', `Pin($1 $2 $3 $4 ifdef(`P_$5', "P_$5", "$5") ifelse($5, 1, 0x101, 0x01))')
63 define(`PAD', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") ifelse($6, 1, 0x00, 0x100))')
65 define(`EDGECONN', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") "$6" $7)')
66 define(`DEFPIN', `define(`count', incr(count))' `define(`P_'count, $1)')
67 define(`DefinePinList', `ifelse($#, 1, ,
72 define(`_DEFPINLIST', `ifelse($#, 0, , $#, 1, `DEFPIN(`$1')',
74 _DEFPINLIST(shift($@))')')
77 ifelse($#, 0, , $#, 1,`define(`arg'cnt,`$1')',
78 `define(`arg'cnt,`$1') define(`cnt',incr(cnt)) args(shift($@))')')
85 include(connector.inc)
89 include(johnstech.inc)
90 include(minicircuits.inc)
94 include(panasonic.inc)
101 include(resistor_adjust.inc)
107 # if any of these files exist, then include them.
108 # this makes it a bit easier to configure pcb without
109 # mucking with app-defaults every time you launch it
110 sinclude(site-config.inc)
111 sinclude(user-config.inc)
112 sinclude(proj-config.inc)