diff options
author | Noe Rubinstein <nrubinstein@avencall.com> | 2012-03-28 14:46:35 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@avencall.com> | 2012-03-28 14:46:35 +0200 |
commit | eb55d270e1d4ea785bcb1a0d15949e902bcf2bb8 (patch) | |
tree | 4913ad9464217b212ec9ad277afa51fb2353f56e | |
parent | 988a70325443162da997608a0764b3b978b825fe (diff) |
Document several files in README
-rw-r--r-- | README | 75 | ||||
-rw-r--r-- | convert.rb | 2 | ||||
-rwxr-xr-x | convert2.rb | 2 |
3 files changed, 77 insertions, 2 deletions
@@ -0,0 +1,75 @@ +Some misc utils and files from the XiVO IPBX Open Hardware project +================================================================== + +architecture_driver_xhfc.dia + An old architecture diagram for the interactions surrounding the XHFC + driver. Prolly obsolete. + + +convert.rb + Writes C preprocessor definitions for bit offsets in a register, from + text copypasted from an Intel datasheet from xpdf. + + Paste the definition in stdin and press enter. :: + + no@yorceev ~/misc (master) % ruby1.9.1 convert.rb STATUS + 31 : 10 Rsvd + 09 : 08 Reserved + 07 : 06 SPEED + 05 LINKMODE + 04 TXOFF + 03 : 02 Rsvd + 01 RSVD + 00 FD + + #define STATUS_SPEED 6 + #define STATUS_LINKMODE 5 + #define STATUS_TXOFF 4 + #define STATUS_FD 0 + +convert2.rb + Analyses the content of a register which value is passed on the command + line and definition is pasted from an Intel datasheet in xpdf. End the + definition with Control+D. :: + + no@yorceev ~/misc (master) % ruby1.9.1 convert2.rb 0x000440b0 + 31 : 10 Rsvd + 09 : 08 Reserved + 07 : 06 SPEED + 05 LINKMODE + 04 TXOFF + 03 : 02 Rsvd + 01 RSVD + 00 FD + 31:10 0000000000000100010000b 110h 420o + 9:8 00b 0h 0o + 7:6 SPEED 10b 2h 2o + 5:5 LINKMODE 1b 1h 1o + 4:4 TXOFF 1b 1h 1o + 3:2 00b 0h 0o + 1:1 0b 0h 0o + 0:0 FD 0b 0h 0o + +dump_stuff + A Linux kernel module which, on load, dumps the content of the PCI + config and MMIO regions for the EP80579 IMCH. + +find_nitpicking.rb + Filters a patch by remothing hunks consisting only of whitespace + change. + +fix_linux_indent.rb + Intended to be called from VIM by selecting a region and starting the + script as a filtering command on the regions; it reindents the region + while keeping it at the right indentation. + +git_checkpatch.sh + Obsolete; exemple of using git and checkpatch.pl to check if a patch + follows Linux coding guidelines. + +bin.c + Prints an integer in decimal, hexadecimal and binary. + +replace_dowhile.rb + Et Coccinelle, c'est pour les chiens? + @@ -148,7 +148,7 @@ end lines3.each do |line| acronym, start, stop, width = line[:acronym], line[:start], line[:stop], line[:width] - name = (acronym =~ /reserved/i ? "" : ($regname ? $regname + "_" : "") + acronym) + name = (acronym =~ /reserved|rsvd/i ? "" : ($regname ? $regname + "_" : "") + acronym) if $mode == :struct tabs = "\t" * [2 - name.length / 8, 0].max diff --git a/convert2.rb b/convert2.rb index 388d47a..977d56d 100755 --- a/convert2.rb +++ b/convert2.rb @@ -87,7 +87,7 @@ class Reg width = start - stop + 1 total_width += width - name = (acronym =~ /reserved/i ? "" : acronym) + name = (acronym =~ /reserved|rsvd/i ? "" : acronym) @fields << Field.new(start, stop, name) end |