summaryrefslogtreecommitdiff
path: root/xpp/gen_slic_init
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-03 23:06:02 +0000
commit2dd60aaf18e98b0e9d3c06bd9dce5f1128fa55ad (patch)
tree1a1cd28888f191e6ce83bcbbe539124e2529c90b /xpp/gen_slic_init
parent8c4db4e3acd9a7626e709af0494055487b589719 (diff)
xpp driver release 1.1.0 (first part of commit)
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/gen_slic_init')
-rwxr-xr-xxpp/gen_slic_init37
1 files changed, 0 insertions, 37 deletions
diff --git a/xpp/gen_slic_init b/xpp/gen_slic_init
deleted file mode 100755
index f102c33..0000000
--- a/xpp/gen_slic_init
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/bin/perl -w
-
-use strict;
-
-my $input;
-my $header;
-my $comment;
-
-@ARGV == 2 or die "Usage: $0 <infile> <outfile>\n";
-$input = $ARGV[0];
-$header = $ARGV[1];
-open(IF, "$input") or die "Failed to write '$input': $!\n";
-open(HF, ">$header") or die "Failed to write '$header': $!\n";
-
-while(<IF>) {
- chomp;
- undef $comment;
- s/\r//; # CRLF -> LF
- if(s/\s*[;#]\s*(.*?)$//) { # Comments
- $comment = $1;
- }
- if(/^\s*$/) { # Empty lines
- next;
- }
- my ($slic0, $slic1, $slic2, $slic3, $len, @data) = split;
- die "Bad input (len=$len)" if hex($len) != @data;
- my $slic = "$slic3$slic2$slic1$slic0";
- die "Bad slic address '$slic'" if length($slic) != 8;
- grep(s/\w+/0x$&/g, ($slic, $len, @data));
- my $str = join(", ", @data);
- print HF "S_($slic,\t$len,\t$str),\t";
-} continue {
- if(defined($comment)) {
- print HF "// $comment";
- }
- print HF "\n";
-}