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
28 # common defines for packages
30 # -------------------------------------------------------------------
31 # create a single object
33 # $2: 'value' of the new object
34 # $3: package of the circuit
36 define(`CreateObject',
37 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
38 `PKG_$3(`Description_$1', ,``$2'', Param1_$1, Param2_$1)'
41 # this one is used to show the correct value for the footprint attribute
42 # in a gschem (www.geda.seul.org) schematic. See QueryLibrary.sh
44 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
45 `$3 ifdef(`Param1_$1', `Param1_$1') ifdef(`Param2_$1', `Param2_$1')'
48 # -------------------------------------------------------------------
49 # define for-loops like the manual tells us
52 `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
54 `$4`'ifelse($1, `$3', ,
55 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
57 # -------------------------------------------------------------------
58 # the following definitions evaluate the list of pin-names
59 # missing names will be defined as 'P_#'
61 # the first two arguments are skipped
63 define(`PIN', `Pin($1 $2 $3 $4 ifdef(`P_$5', "P_$5", "$5") ifelse($5, 1, 0x101, 0x01))')
64 define(`PAD', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") ifelse($6, 1, 0x00, 0x100))')
66 define(`EDGECONN', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") "$6" $7)')
67 define(`DEFPIN', `define(`count', incr(count))' `define(`P_'count, $1)')
68 define(`DefinePinList', `ifelse($#, 1, ,
73 define(`_DEFPINLIST', `ifelse($#, 0, , $#, 1, `DEFPIN(`$1')',
75 _DEFPINLIST(shift($@))')')
78 ifelse($#, 0, , $#, 1,`define(`arg'cnt,`$1')',
79 `define(`arg'cnt,`$1') define(`cnt',incr(cnt)) args(shift($@))')')
86 include(connector.inc)
90 include(johnstech.inc)
91 include(minicircuits.inc)
95 include(panasonic.inc)
102 include(resistor_adjust.inc)
108 # if any of these files exist, then include them.
109 # this makes it a bit easier to configure pcb without
110 # mucking with app-defaults every time you launch it
111 sinclude(site-config.inc)
112 sinclude(user-config.inc)
113 sinclude(proj-config.inc)