changeset 116:bb9908f36e23

m4-fp/qfpmnf.inc: basic fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 13 Jun 2020 04:14:10 +0000
parents a7276a03289d
children a79853ec3ab5
files ifctf-part-lib/m4-fp/qfpmnf.inc
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ifctf-part-lib/m4-fp/qfpmnf.inc	Fri Jun 12 07:25:04 2020 +0000
+++ b/ifctf-part-lib/m4-fp/qfpmnf.inc	Sat Jun 13 04:14:10 2020 +0000
@@ -14,7 +14,9 @@
 # $11: 1 to suppress edge cut and bring the silk outline in a little
 #
 # all internal units are um
-#
+
+define(`QFP_MNF_PAD', `Pad[$1`um' $2`um' $3`um' $4`um' PADTHICKNESS`um' CLEARANCE MASKTHICKNESS`um' "$5" "$5" ifelse($5, 1, 0x00, 0x100)]')
+
 define(`PKG_QFP_MNF',
        `define(`QUARTER',  ifelse(0,`$5',eval($4 * 3 / 10),eval($4 / 4)))
 	define(`QUARTER2', eval(`$4' / 2 - QUARTER))
@@ -29,12 +31,12 @@
 	define(`PADMINOFFSET',eval(`$8'+PADTHICKNESS/2))
 	define(`PADMAXOFFSET',eval(`$9'-PADTHICKNESS/2))
 	define(`MASKTHICKNESS', eval(PADTHICKNESS + `$10'))
-	define(`CLEARANCE', `10mil');
+	define(`CLEARANCE', `10mil')
 	define(`FARPIN', eval(WIDTH-BORDER))
 	define(`FARPIN2',eval(WIDTH2-BORDER2))
 	define(`PIN1INMIDDLE',0)
 	define(`STARTPIN',ifelse(1,eval(PIN1INMIDDLE),eval(((QUARTER+1)/2)+1),`1'))
-	define(`REDUCEDSILK', `$11'))
+	define(`REDUCEDSILK', `$11')
 Element[0x00 "$1" "$2" "$3" 0 0 100mil CENTER`um' 0 100 0x00]
 (
 
@@ -42,10 +44,9 @@
 define(`X', 0)
 define(`QFPPIN',`STARTPIN')
 define(`idx',0)
-define(`MYPAD', `Pad[$1`um' $2`um' $3`um' $4`um' PADTHICKNESS`um' CLEARANCE MASKTHICKNESS`um' "$5" "$5" ifelse($5, 1, 0x00, 0x100)]')
 forloop(`i', 1, QUARTER,
 	`define(`Y', eval(BORDER+(PITCH*idx)))'
-	`MYPAD(eval(X-PADMAXOFFSET), Y, eval(X-PADMINOFFSET), Y, QFPPIN)'
+	`QFP_MNF_PAD(eval(X-PADMAXOFFSET), Y, eval(X-PADMINOFFSET), Y, QFPPIN)'
 	`define(`QFPPIN', incr(QFPPIN))'
 	`define(`idx',incr(idx))'
 )
@@ -55,7 +56,7 @@
 define(`idx',0)
 forloop(`i', 1, QUARTER2,
 	`define(`X', eval(BORDER2+(PITCH*idx)))'
-	`MYPAD(X, eval(Y+PADMAXOFFSET), X, eval(Y+PADMINOFFSET), QFPPIN)'
+	`QFP_MNF_PAD(X, eval(Y+PADMAXOFFSET), X, eval(Y+PADMINOFFSET), QFPPIN)'
 	`define(`QFPPIN', incr(QFPPIN))'
 	`define(`idx',incr(idx))'
 )
@@ -65,7 +66,7 @@
 define(`idx',0)
 forloop(`i', 1, QUARTER,
 	`define(`Y', eval(FARPIN-(PITCH*idx)))'
-	`MYPAD(eval(X+PADMAXOFFSET), Y, eval(X+PADMINOFFSET), Y, QFPPIN)'
+	`QFP_MNF_PAD(eval(X+PADMAXOFFSET), Y, eval(X+PADMINOFFSET), Y, QFPPIN)'
 	`define(`QFPPIN', incr(QFPPIN))'
 	`define(`idx',incr(idx))'
 )
@@ -75,7 +76,7 @@
 define(`Y', 0)
 forloop(`i', 1, QUARTER2,
 	`define(`X',eval(FARPIN2-(PITCH*idx)))'
-	`MYPAD(X, eval(Y-PADMAXOFFSET), X, eval(Y-PADMINOFFSET), QFPPIN)'
+	`QFP_MNF_PAD(X, eval(Y-PADMAXOFFSET), X, eval(Y-PADMINOFFSET), QFPPIN)'
 	`define(`QFPPIN', incr(QFPPIN))'
 	`ifelse(eval(QFPPIN > NUMPINS), 1, `define(`QFPPIN', 1)')'
 	`define(`idx',incr(idx))'