#!/bin/sh

#@@example connector(2, 3)

#@@purpose Generate pin-array connectors (e.g. headers).

#@@desc Generate a connectors that consits of an array of
#@@desc evenly spaced terminals and a frame.

#@@params ny, nx, spacing, eshift, etrunc

#@@param:ny number of pins (in vertical direction)
#@@param:nx number of columns (in horizontal direction; e.g. single row connectors have 1, headers have 2)
#@@optional:nx

#@@param:eshift double pin spacing, shift even rows or columns by 1 spacing (optional; default: don't shift)
#@@enum:eshift:x shift columns (vertical)
#@@enum:eshift:y shift rows (horizontal)
#@@enum:eshift:none do not shift anything
#@@default:eshift none
#@@optional:eshift
#@@preview_args:eshift 2,3

#@@param:etrunc truncate the last pin of a shifted row or column
#@@bool:etrunc
#@@default:etrunc false
#@@optional:etrunc
#@@preview_args:etrunc 2,3,eshift=x

#@@param:sequence pin numbering sequence
#@@enum:sequence:normal increase by y first, then by x
#@@enum:sequence:pivot increase by x first, then by y
#@@enum:sequence:zigzag "dip-style" numbering in zig-zag: number odd x rows by y ascending, even x rows by y descending
#@@preview_args:sequence 2,4
#@@thumbsize:sequence 3
#@@thumbnum:sequence 1
#@@default:sequence normal
#@@optional:sequence



#@@include common_sym.awk

awk -f `dirname $0`/../common_sym.awk -f `dirname $0`/connector.awk -v "args=$*" -v gen=`basename $0` -v "genfull=$0"

