From d0dbd1f4ab930f479812b9c9a2d886f32ff14b36 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Dec 2010 17:35:58 +0000 Subject: [PATCH] pcb/points-pin-alloc: Improvements --- pcb/Makefile | 4 ++-- pcb/points-pin-alloc-gen | 29 ++++++++++++++++++++++------- pcb/points-pin-alloc.setup | 8 ++++---- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/pcb/Makefile b/pcb/Makefile index 0b0901a..ef3ab2d 100644 --- a/pcb/Makefile +++ b/pcb/Makefile @@ -100,8 +100,8 @@ pcboprints: reversers.oprints-l detectors.oprints-l ./$< $@ $o points-pin-alloc.lout: points-pin-alloc-gen points-pin-alloc.setup \ - detectors.net-spec reversers.net-spec - ./$< reversers:4 detectors:4 $o + Makefile detectors.net-spec reversers.net-spec + ./$< reversers:4 detectors:6 $o %.ps: %.lout lout -s $< $o diff --git a/pcb/points-pin-alloc-gen b/pcb/points-pin-alloc-gen index 8709d0b..ac574be 100755 --- a/pcb/points-pin-alloc-gen +++ b/pcb/points-pin-alloc-gen @@ -78,35 +78,50 @@ sub endrow () { sub cell ($$) { my ($fmt, $data) = @_; my $ix= $cellix++; #"C".scalar @cells; - push @formats, '@Cell '.$fmt." $ix"; + push @formats, '@Cell rule { yes } '.$fmt." $ix"; push @cells, "$ix { $data }"; } +startrow(); +cell('', ''); +cell('indent { right }', '@B "board"'); +foreach my $board (0..$#boards) { cell('',''); } +cell('', ''); +endrow(); + startrow(); cell('', '@B pin'); cell('', '@B { alternative uses }'); foreach my $board (0..$#boards) { cell('', "$boards[$board]"); } +cell('', '@B pin'); endrow(); foreach my $pin (@pins) { startrow(); - cell('', $pin); + cell('indent { right }', $pin); cell('', "\"$pin2otherdesc[$pin]\""); foreach my $board (0..$#boards) { my $point= $boardpin2point{$boards[$board]}[$pin]; if (!defined $point) { cell('paint { lightgrey }', ''); } else { - cell('', "PT$point"); + cell('marginhorizontal { 0.1f }', "10p \@Font PT$point"); } } + cell('indent { right }', $pin); endrow(); } print "{\n",$body,"}\n"; +my $revid= `../.git-revid`; +chomp($revid) or die $?; +$revid =~ s/[\"\\]/\\$&/g; + print <error and die $!; __DATA__ 40 (useable for point only) 39 (useable for point only) -38 Interrupt on change -37 Interrupt on change -36 GPIO +36 (GPIO) +24 (GPIO) +38 (Interrupt on change) +37 (Interrupt on change) 35 External Interrupt 2 34 External Interrupt 1 33 External Interrupt 0 @@ -127,7 +143,6 @@ __DATA__ 27 ECCP1 PWN output A 26 RS232 RX 25 RS232 TX -24 GPIO 22 Comparator 2 input 2 Analogue in 0 / Comparator ref out 3 Analogue in 1 diff --git a/pcb/points-pin-alloc.setup b/pcb/points-pin-alloc.setup index 2d9475e..f382b75 100644 --- a/pcb/points-pin-alloc.setup +++ b/pcb/points-pin-alloc.setup @@ -87,10 +87,10 @@ # @PageBackground { } # background of each page # @TopMargin { 2.5c @OrIfPlain 6f } # top margin of all pages # @FootMargin { 2.5c @OrIfPlain 6f } # bottom margin of all pages - # @OddLeftMargin { 2.5c @OrIfPlain 10s } # left margin of odd pages - # @OddRightMargin { 2.5c @OrIfPlain 10s } # right margin of odd pages - # @EvenLeftMargin { 2.5c @OrIfPlain 10s } # left margin of even pages - # @EvenRightMargin { 2.5c @OrIfPlain 10s } # right margin of even pages + @OddLeftMargin { 1c } # left margin of odd pages + @OddRightMargin { 1c } # right margin of odd pages + @EvenLeftMargin { 1c } # left margin of even pages + @EvenRightMargin { 1c } # right margin of even pages # @OddLeftBodyMargin { 0c } # extra margin for page body # @OddRightBodyMargin { 0c } # extra margin for page body # @EvenLeftBodyMargin { 0c } # extra margin for page body -- 2.30.2