#!/bin/sh

# Reference: Microchip Packaging Specification DS00000049BX (en012702.pdf), SSOP

#@@example qfn(16,3x3,0.5)

#@@purpose Generate QFN packages
#@@desc Generate QFN packages - a simplified frontend to qf() - 
#@@desc look up 3..4 data in the datasheet and get a regular QFN footprint!
#@@desc Should work for QFN, TQFN, etc.
#@@desc NOTE: some of the qf() parameters can be also used.

#@@params pins,size,pitch,cpad_size

#@@param:pins total number of pins (leads); must be divisible by 4
#@@param:size a single integer N or NxN or NxNxH; the pad spacing dimension (outer dimension, lead-to-lead) in mm
#@@param:pitch lead pitch (distance between the centerline of two adjacent leads), in mm; must be one of 0.4, 0.5, 0.65

#@@param:cpad_size width (and height) of the central pad, in mm
#@@optional:cpad_size
#@@default:cpad_size empty, there's no central pad

awk -f `dirname $0`/common_subc.awk -f `dirname $0`/qfn.awk -f `dirname $0`/qf.awk -v "args=$*" -v gen=`basename $0` -v "genfull=$0"

