Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

board corrections + atmega firmware

  • Loading branch information...
commit 8f0ee9923c2c55d66a2a03e7f086cd06e2f61d35 1 parent 9e599e4
Nephirus authored September 18, 2012

Showing 38 changed files with 9,364 additions and 3 deletions. Show diff stats Hide diff stats

  1. 430  eagle/brmscope/eagle.epf
  2. 4  eagle/brmscope/stepper_driver.brd
  3. 14  eagle/brmscope/stepper_driver.sch
  4. 75  firmware/Readme.txt
  5. 42  firmware/commandline/Makefile
  6. 18  firmware/commandline/Makefile.windows
  7. 324  firmware/commandline/hiddata.c
  8. 71  firmware/commandline/hiddata.h
  9. BIN  firmware/commandline/hiddata.o
  10. 49  firmware/commandline/hidsdi.h
  11. BIN  firmware/commandline/hidtool
  12. 127  firmware/commandline/hidtool.c
  13. BIN  firmware/commandline/hidtool.o
  14. 164  firmware/firmware/Makefile
  15. 265  firmware/firmware/main.c
  16. 373  firmware/firmware/usbconfig.h
  17. 318  firmware/firmware/usbdrv/Changelog.txt
  18. 166  firmware/firmware/usbdrv/CommercialLicense.txt
  19. 361  firmware/firmware/usbdrv/License.txt
  20. 172  firmware/firmware/usbdrv/Readme.txt
  21. 149  firmware/firmware/usbdrv/USB-ID-FAQ.txt
  22. 154  firmware/firmware/usbdrv/USB-IDs-for-free.txt
  23. 188  firmware/firmware/usbdrv/asmcommon.inc
  24. 50  firmware/firmware/usbdrv/oddebug.c
  25. 123  firmware/firmware/usbdrv/oddebug.h
  26. 376  firmware/firmware/usbdrv/usbconfig-prototype.h
  27. 628  firmware/firmware/usbdrv/usbdrv.c
  28. 736  firmware/firmware/usbdrv/usbdrv.h
  29. 393  firmware/firmware/usbdrv/usbdrvasm.S
  30. 21  firmware/firmware/usbdrv/usbdrvasm.asm
  31. 393  firmware/firmware/usbdrv/usbdrvasm12.inc
  32. 750  firmware/firmware/usbdrv/usbdrvasm128.inc
  33. 423  firmware/firmware/usbdrv/usbdrvasm15.inc
  34. 346  firmware/firmware/usbdrv/usbdrvasm16.inc
  35. 453  firmware/firmware/usbdrv/usbdrvasm165.inc
  36. 707  firmware/firmware/usbdrv/usbdrvasm18-crc.inc
  37. 360  firmware/firmware/usbdrv/usbdrvasm20.inc
  38. 144  firmware/firmware/usbdrv/usbportability.h
430  eagle/brmscope/eagle.epf
... ...
@@ -1,2 +1,430 @@
1 1
 [Eagle]
2  
-Version="06 02 00"
  2
+Version="06 02 00"
  3
+Platform="Linux"
  4
+Serial="62191E841E-LSR-WLM-1EL"
  5
+Globals="Globals"
  6
+Desktop="Desktop"
  7
+
  8
+[Globals]
  9
+AutoSaveProject=1
  10
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/19inch.lbr"
  11
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/40xx.lbr"
  12
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/41xx.lbr"
  13
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/45xx.lbr"
  14
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74ac-logic.lbr"
  15
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74ttl-din.lbr"
  16
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74xx-eu.lbr"
  17
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74xx-little-de.lbr"
  18
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74xx-little-us.lbr"
  19
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/74xx-us.lbr"
  20
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/751xx.lbr"
  21
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/advanced-test-technologies.lbr"
  22
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/agilent-technologies.lbr"
  23
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/allegro.lbr"
  24
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/altera-cyclone-II.lbr"
  25
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/altera-cyclone-III.lbr"
  26
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/altera-stratix-iv.lbr"
  27
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/altera.lbr"
  28
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/am29-memory.lbr"
  29
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/amd-mach.lbr"
  30
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/amd.lbr"
  31
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/amis.lbr"
  32
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/analog-devices.lbr"
  33
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ase.lbr"
  34
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/atmel.lbr"
  35
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/austriamicrosystems.lbr"
  36
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/avago.lbr"
  37
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/axis.lbr"
  38
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/battery.lbr"
  39
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/belton-engineering.lbr"
  40
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/burr-brown.lbr"
  41
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/busbar.lbr"
  42
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/buzzer.lbr"
  43
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/c-trimm.lbr"
  44
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/california-micro-devices.lbr"
  45
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/capacitor-wima.lbr"
  46
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/chipcard-siemens.lbr"
  47
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/cirrus-logic.lbr"
  48
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-3m.lbr"
  49
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-4ucon.lbr"
  50
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-champ.lbr"
  51
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-micromatch.lbr"
  52
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-mt.lbr"
  53
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-mt6.lbr"
  54
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-quick.lbr"
  55
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp-te.lbr"
  56
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amp.lbr"
  57
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-amphenol.lbr"
  58
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-avx.lbr"
  59
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-berg.lbr"
  60
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-bosch.lbr"
  61
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-chipcard-iso7816.lbr"
  62
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-coax.lbr"
  63
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-commcon.lbr"
  64
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-conrad.lbr"
  65
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-cpci.lbr"
  66
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-cui.lbr"
  67
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-cypressindustries.lbr"
  68
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-deutsch.lbr"
  69
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-dil.lbr"
  70
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-ebyelectro.lbr"
  71
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-elco.lbr"
  72
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-erni.lbr"
  73
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-faston.lbr"
  74
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-fci.lbr"
  75
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-friwo.lbr"
  76
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-garry.lbr"
  77
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-harting-h.lbr"
  78
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-harting-ml.lbr"
  79
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-harting-v.lbr"
  80
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-harting.lbr"
  81
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-hirose.lbr"
  82
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-hirschmann.lbr"
  83
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-jack.lbr"
  84
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-jae.lbr"
  85
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-jst.lbr"
  86
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-kycon.lbr"
  87
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-kyocera-elco.lbr"
  88
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-lemo.lbr"
  89
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-leotronics.lbr"
  90
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-lsta.lbr"
  91
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-lstb.lbr"
  92
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-lumberg.lbr"
  93
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-ml.lbr"
  94
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-molex.lbr"
  95
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-neutrik_ag.lbr"
  96
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-omron.lbr"
  97
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-panasonic.lbr"
  98
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-panduit.lbr"
  99
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-pc.lbr"
  100
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-pc104.lbr"
  101
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-254.lbr"
  102
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-3.81.lbr"
  103
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-350.lbr"
  104
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-500.lbr"
  105
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-508.lbr"
  106
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-762.lbr"
  107
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-me_max.lbr"
  108
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-mkds_5.lbr"
  109
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-phoenix-smkdsp.lbr"
  110
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-ptr500.lbr"
  111
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-pulse.lbr"
  112
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-rib.lbr"
  113
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-samtec.lbr"
  114
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-shallin.lbr"
  115
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-shiua-chyuan.lbr"
  116
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-stewart.lbr"
  117
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-stocko.lbr"
  118
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-subd.lbr"
  119
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-sullinselectronics.lbr"
  120
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-thomas-betts.lbr"
  121
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-tyco.lbr"
  122
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-tycoelectronics.lbr"
  123
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-vg.lbr"
  124
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-wago-500.lbr"
  125
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-wago-508.lbr"
  126
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-wago.lbr"
  127
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-wago255.lbr"
  128
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-weidmueller-sl35.lbr"
  129
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-wenzhou-yihua.lbr"
  130
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-xmultiple.lbr"
  131
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/con-yamaichi.lbr"
  132
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/crystal.lbr"
  133
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/csr.lbr"
  134
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/cypress.lbr"
  135
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/davicom.lbr"
  136
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/dc-dc-converter.lbr"
  137
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/dimensions.lbr"
  138
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/diode.lbr"
  139
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/discrete.lbr"
  140
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/display-hp.lbr"
  141
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/display-kingbright.lbr"
  142
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/display-lcd.lbr"
  143
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/docu-dummy.lbr"
  144
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ecl.lbr"
  145
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/em-microelectronic.lbr"
  146
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/etx-board.lbr"
  147
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/exar.lbr"
  148
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fairchild-semic.lbr"
  149
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/farnell.lbr"
  150
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fiber-optic-hp.lbr"
  151
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fiber-optic-siemens.lbr"
  152
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fifo.lbr"
  153
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/flexipanel.lbr"
  154
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fox-electronics.lbr"
  155
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/frames.lbr"
  156
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/freescale.lbr"
  157
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ftdichip.lbr"
  158
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fujitsu.lbr"
  159
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/fuse.lbr"
  160
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/gennum.lbr"
  161
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/halo-electronics.lbr"
  162
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/heatsink.lbr"
  163
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/holes.lbr"
  164
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/holtek.lbr"
  165
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ic-package.lbr"
  166
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/inductor-coilcraft.lbr"
  167
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/inductor-neosid.lbr"
  168
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/inductor-nkl.lbr"
  169
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/inductors.lbr"
  170
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/infineon-tricore.lbr"
  171
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/infineon.lbr"
  172
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/intersil.lbr"
  173
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ir.lbr"
  174
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/isd.lbr"
  175
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/johanson-technology.lbr"
  176
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/jump-0r-smd.lbr"
  177
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/jumper.lbr"
  178
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lantronix.lbr"
  179
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lattice.lbr"
  180
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lc-filter.lbr"
  181
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/led-7-segment.lbr"
  182
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/led-citizen-electronics.lbr"
  183
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/led-lumiled.lbr"
  184
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/led.lbr"
  185
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lem.lbr"
  186
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/linear-technology.lbr"
  187
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/linear.lbr"
  188
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/linx.lbr"
  189
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/logo.lbr"
  190
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lprs.lbr"
  191
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lsi-computer-systems.lbr"
  192
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/lumiled.lbr"
  193
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/marks.lbr"
  194
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/maxim.lbr"
  195
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/maxstream.lbr"
  196
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/melexis.lbr"
  197
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-hitachi.lbr"
  198
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-idt.lbr"
  199
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-micron.lbr"
  200
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-motorola-dram.lbr"
  201
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-nec.lbr"
  202
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-samsung.lbr"
  203
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory-sram.lbr"
  204
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/memory.lbr"
  205
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/mems.lbr"
  206
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micrel.lbr"
  207
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-cyrod.lbr"
  208
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-fujitsu.lbr"
  209
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-harris.lbr"
  210
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-hitachi.lbr"
  211
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-infineon.lbr"
  212
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-intel.lbr"
  213
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-mc68000.lbr"
  214
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-motorola.lbr"
  215
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-philips.lbr"
  216
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-renesas.lbr"
  217
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-samsung.lbr"
  218
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micro-siemens.lbr"
  219
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/microchip.lbr"
  220
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micron.lbr"
  221
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/micronas.lbr"
  222
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/microphon.lbr"
  223
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/microwave.lbr"
  224
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/midori-sensor.lbr"
  225
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/minicircuits.lbr"
  226
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/mitsubishi-semiconductor.lbr"
  227
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/motorola-sensor-driver.lbr"
  228
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/murata-filter.lbr"
  229
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/murata-sensor.lbr"
  230
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/nanotec.lbr"
  231
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/national-instruments.lbr"
  232
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/national-semiconductor.lbr"
  233
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/nec-lqfp100-pack.lbr"
  234
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/nec.lbr"
  235
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/nrj-semiconductor.lbr"
  236
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/omnivision.lbr"
  237
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/on-semiconductor.lbr"
  238
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-honeywell-3000.lbr"
  239
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-honeywell-4000.lbr"
  240
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-honeywell.lbr"
  241
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-micro-linear.lbr"
  242
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-trans-siemens.lbr"
  243
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-transmittter-hp.lbr"
  244
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/opto-vishay.lbr"
  245
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/optocoupler.lbr"
  246
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pal.lbr"
  247
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/philips-semiconductors.lbr"
  248
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/photo-elements.lbr"
  249
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/piher.lbr"
  250
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pinhead.lbr"
  251
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/plcc-socket.lbr"
  252
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pld-intel.lbr"
  253
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/plxtech.lbr"
  254
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pot-vitrohm.lbr"
  255
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pot-xicor.lbr"
  256
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/pot.lbr"
  257
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ptc-ntc.lbr"
  258
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/quantum-research-group.lbr"
  259
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/rcl.lbr"
  260
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/recom-international.lbr"
  261
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/rectifier.lbr"
  262
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ref-packages-longpad.lbr"
  263
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/ref-packages.lbr"
  264
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/relay.lbr"
  265
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/renesas.lbr"
  266
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-bourns.lbr"
  267
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-dil.lbr"
  268
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-net.lbr"
  269
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-power.lbr"
  270
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-ruf.lbr"
  271
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-shunt.lbr"
  272
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor-sil.lbr"
  273
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/resistor.lbr"
  274
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/rf-micro-devices.lbr"
  275
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/rf-solutions.lbr"
  276
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/rohm.lbr"
  277
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/semicon-smd-ipc.lbr"
  278
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sensor-comus-group.lbr"
  279
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sensor-heraeus.lbr"
  280
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sensor-infratec.lbr"
  281
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sharp.lbr"
  282
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/silabs.lbr"
  283
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sim-technology.lbr"
  284
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/sipex.lbr"
  285
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/smd-ipc.lbr"
  286
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/smd-special.lbr"
  287
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/solomon-systech.lbr"
  288
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/solpad.lbr"
  289
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/special-drill.lbr"
  290
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/special.lbr"
  291
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/st-microelectronics.lbr"
  292
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/supertex.lbr"
  293
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/supply1.lbr"
  294
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/supply2.lbr"
  295
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-alps.lbr"
  296
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-coto.lbr"
  297
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-dil.lbr"
  298
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-misc.lbr"
  299
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-omron.lbr"
  300
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-raychem.lbr"
  301
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch-reed.lbr"
  302
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/switch.lbr"
  303
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/telcom.lbr"
  304
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/telecontrolli.lbr"
  305
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/telefunken.lbr"
  306
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/testpad.lbr"
  307
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/texas.lbr"
  308
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/toshiba.lbr"
  309
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/traco-electronic.lbr"
  310
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/trafo-bei.lbr"
  311
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/trafo-siemens.lbr"
  312
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/trafo-xicon.lbr"
  313
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/trafo.lbr"
  314
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transformer-pulse.lbr"
  315
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-fet.lbr"
  316
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-neu-to92.lbr"
  317
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-npn.lbr"
  318
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-pnp.lbr"
  319
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-power.lbr"
  320
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor-small-signal.lbr"
  321
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/transistor.lbr"
  322
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/triac.lbr"
  323
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/trimble.lbr"
  324
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/tripas.lbr"
  325
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/u-blox.lbr"
  326
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/uln-udn.lbr"
  327
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/v-reg-micrel.lbr"
  328
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/v-reg.lbr"
  329
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/varistor.lbr"
  330
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/wafer-scale-psd.lbr"
  331
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/wirepad.lbr"
  332
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/xicor.lbr"
  333
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/xilinx-virtex-v5.lbr"
  334
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/xilinx-xc18v.lbr"
  335
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/xilinx-xc9.lbr"
  336
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/xilinx-xcv.lbr"
  337
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/zetex.lbr"
  338
+UsedLibrary="/home/nephirus/eagle-6.2.0/lbr/zilog.lbr"
  339
+
  340
+[Win_1]
  341
+Type="Board Editor"
  342
+Loc="0 0 599 399"
  343
+State=1
  344
+Number=1
  345
+File="stepper_driver.brd"
  346
+View="32.7968 27.4967 61.0265 53.7359"
  347
+WireWidths=" 0 0.254 0.3048 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0.4064"
  348
+PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  349
+PadDrills=" 0.5 0.6 0.7 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.8"
  350
+ViaDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  351
+ViaDrills=" 0.5 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.6"
  352
+HoleDrills=" 0.5 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.6"
  353
+TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
  354
+PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
  355
+PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  356
+MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
  357
+SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
  358
+WireBend=0
  359
+WireBendSet=0
  360
+WireCap=1
  361
+MiterStyle=0
  362
+PadShape=0
  363
+ViaShape=0
  364
+PolygonPour=0
  365
+PolygonRank=1
  366
+PolygonThermals=1
  367
+PolygonOrphans=0
  368
+TextRatio=8
  369
+PinDirection=3
  370
+PinFunction=0
  371
+PinLength=2
  372
+PinVisible=3
  373
+SwapLevel=0
  374
+ArcDirection=0
  375
+AddLevel=2
  376
+PadsSameType=0
  377
+Layer=16
  378
+
  379
+[Win_2]
  380
+Type="Schematic Editor"
  381
+Loc="0 0 599 399"
  382
+State=1
  383
+Number=2
  384
+File="stepper_driver.sch"
  385
+View="-74.8882 -29.4087 49.0571 77.3967"
  386
+WireWidths=" 0 0.3048 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0.4064 0.1524"
  387
+PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  388
+PadDrills=" 0.5 0.6 0.7 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.8"
  389
+ViaDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  390
+ViaDrills=" 0.5 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.6"
  391
+HoleDrills=" 0.5 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 2 2.2 2.8 3.2 0.6"
  392
+TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
  393
+PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
  394
+PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
  395
+MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
  396
+SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
  397
+WireBend=0
  398
+WireBendSet=31
  399
+WireCap=1
  400
+MiterStyle=0
  401
+PadShape=0
  402
+ViaShape=0
  403
+PolygonPour=0
  404
+PolygonRank=0
  405
+PolygonThermals=1
  406
+PolygonOrphans=0
  407
+TextRatio=8
  408
+PinDirection=3
  409
+PinFunction=0
  410
+PinLength=2
  411
+PinVisible=3
  412
+SwapLevel=0
  413
+ArcDirection=0
  414
+AddLevel=2
  415
+PadsSameType=0
  416
+Layer=91
  417
+Views=" 1: -74.8882 -29.4087 49.0571 77.3967"
  418
+Sheet=1
  419
+
  420
+[Win_3]
  421
+Type="Control Panel"
  422
+Loc="0 0 599 399"
  423
+State=2
  424
+Number=0
  425
+
  426
+[Desktop]
  427
+Screen="1366 768"
  428
+Window="Win_1"
  429
+Window="Win_2"
  430
+Window="Win_3"
4  eagle/brmscope/stepper_driver.brd
@@ -2184,6 +2184,8 @@ design rules under a new name.</description>
2184 2184
 <wire x1="31.75" y1="36.195" x2="31.115" y2="35.56" width="0.4064" layer="16"/>
2185 2185
 <wire x1="31.115" y1="35.56" x2="31.115" y2="33.02" width="0.4064" layer="16"/>
2186 2186
 <wire x1="31.115" y1="33.02" x2="32.385" y2="31.75" width="0.4064" layer="16"/>
  2187
+<contactref element="IC4" pad="2"/>
  2188
+<wire x1="37.6174" y1="41.84" x2="46.2026" y2="42.64" width="0" layer="19" extent="16-16"/>
2187 2189
 </signal>
2188 2190
 <signal name="N$3">
2189 2191
 <contactref element="IC4" pad="15"/>
@@ -2392,6 +2394,8 @@ design rules under a new name.</description>
2392 2394
 <wire x1="32.385" y1="35.56" x2="34.925" y2="35.56" width="0.4064" layer="16"/>
2393 2395
 <wire x1="34.925" y1="35.56" x2="36.195" y2="36.83" width="0.4064" layer="16"/>
2394 2396
 <wire x1="36.195" y1="36.83" x2="36.195" y2="39.37" width="0.4064" layer="16"/>
  2397
+<contactref element="IC4" pad="1"/>
  2398
+<wire x1="37.6174" y1="39.44" x2="46.2026" y2="43.44" width="0" layer="19" extent="16-16"/>
2395 2399
 </signal>
2396 2400
 <signal name="N$37">
2397 2401
 <contactref element="X5" pad="1"/>
14  eagle/brmscope/stepper_driver.sch
@@ -11101,10 +11101,15 @@ Source: www.kingbright.com</description>
11101 11101
 <net name="N$13" class="0">
11102 11102
 <segment>
11103 11103
 <pinref part="IC4" gate="G$1" pin="ADC7"/>
11104  
-<wire x1="-43.18" y1="22.86" x2="10.16" y2="22.86" width="0.1524" layer="91"/>
  11104
+<wire x1="-43.18" y1="22.86" x2="-33.02" y2="22.86" width="0.1524" layer="91"/>
11105 11105
 <pinref part="IC2" gate="A" pin="I1"/>
  11106
+<wire x1="-33.02" y1="22.86" x2="10.16" y2="22.86" width="0.1524" layer="91"/>
11106 11107
 <wire x1="10.16" y1="22.86" x2="10.16" y2="20.32" width="0.1524" layer="91"/>
11107 11108
 <wire x1="10.16" y1="20.32" x2="12.7" y2="20.32" width="0.1524" layer="91"/>
  11109
+<pinref part="IC4" gate="G$1" pin="PD4(XCK/T0)"/>
  11110
+<wire x1="-43.18" y1="7.62" x2="-33.02" y2="7.62" width="0.1524" layer="91"/>
  11111
+<wire x1="-33.02" y1="7.62" x2="-33.02" y2="22.86" width="0.1524" layer="91"/>
  11112
+<junction x="-33.02" y="22.86"/>
11108 11113
 </segment>
11109 11114
 </net>
11110 11115
 <net name="N$3" class="0">
@@ -11315,10 +11320,15 @@ Source: www.kingbright.com</description>
11315 11320
 <net name="N$12" class="0">
11316 11321
 <segment>
11317 11322
 <pinref part="IC4" gate="G$1" pin="ADC6"/>
11318  
-<wire x1="-43.18" y1="25.4" x2="5.08" y2="25.4" width="0.1524" layer="91"/>
  11323
+<wire x1="-43.18" y1="25.4" x2="-35.56" y2="25.4" width="0.1524" layer="91"/>
11319 11324
 <pinref part="IC2" gate="A" pin="I2"/>
  11325
+<wire x1="-35.56" y1="25.4" x2="5.08" y2="25.4" width="0.1524" layer="91"/>
11320 11326
 <wire x1="5.08" y1="25.4" x2="5.08" y2="12.7" width="0.1524" layer="91"/>
11321 11327
 <wire x1="5.08" y1="12.7" x2="12.7" y2="12.7" width="0.1524" layer="91"/>
  11328
+<pinref part="IC4" gate="G$1" pin="PD3(INT1)"/>
  11329
+<wire x1="-43.18" y1="10.16" x2="-35.56" y2="10.16" width="0.1524" layer="91"/>
  11330
+<wire x1="-35.56" y1="10.16" x2="-35.56" y2="25.4" width="0.1524" layer="91"/>
  11331
+<junction x="-35.56" y="25.4"/>
11322 11332
 </segment>
11323 11333
 </net>
11324 11334
 <net name="N$37" class="0">
75  firmware/Readme.txt
... ...
@@ -0,0 +1,75 @@
  1
+This is the Readme file for the hid-data example. In this example, we show
  2
+how blocks of data can be exchanged with the device using only functionality
  3
+compliant to the HID class. Since class drivers for HID are included with
  4
+Windows, you don't need to install drivers on Windows.
  5
+
  6
+
  7
+WHAT IS DEMONSTRATED?
  8
+=====================
  9
+This example demonstrates how the HID class can be misused to transfer fixed
  10
+size blocks of data (up to the driver's transfer size limit) over HID feature
  11
+reports. This technique is of great value on Windows because no driver DLLs
  12
+are needed (the hid-custom-rq example still requires the libusb-win32 DLL,
  13
+although it may be in the program's directory). The host side application
  14
+requires no installation, it can even be started directly from a CD. This
  15
+example also demonstrates how to transfer data using usbFunctionWrite() and
  16
+usbFunctionRead().
  17
+
  18
+
  19
+PREREQUISITES
  20
+=============
  21
+Target hardware: You need an AVR based circuit based on one of the examples
  22
+(see the "circuits" directory at the top level of this package), e.g. the
  23
+metaboard (http://www.obdev.at/goto.php?t=metaboard).
  24
+
  25
+AVR development environment: You need the gcc tool chain for the AVR, see
  26
+the Prerequisites section in the top level Readme file for how to obtain it.
  27
+
  28
+Host development environment: A C compiler and libusb on Unix. On Windows
  29
+you need the Driver Development Kit (DDK) Instead of libusb. MinGW ships
  30
+with a free version of the DDK.
  31
+
  32
+
  33
+BUILDING THE FIRMWARE
  34
+=====================
  35
+Change to the "firmware" directory and modify Makefile according to your
  36
+architecture (CPU clock, target device, fuse values) and ISP programmer. Then
  37
+edit usbconfig.h according to your pin assignments for D+ and D-. The default
  38
+settings are for the metaboard hardware.
  39
+
  40
+Type "make hex" to build main.hex, then "make flash" to upload the firmware
  41
+to the device. Don't forget to run "make fuse" once to program the fuses. If
  42
+you use a prototyping board with boot loader, follow the instructions of the
  43
+boot loader instead.
  44
+
  45
+Please note that the first "make hex" copies the driver from the top level
  46
+into the firmware directory. If you use a different build system than our
  47
+Makefile, you must copy the driver by hand.
  48
+
  49
+
  50
+BUILDING THE HOST SOFTWARE
  51
+==========================
  52
+Make sure that you have libusb (on Unix) or the DDK (on Windows) installed.
  53
+We recommend MinGW on Windows since it includes a free version of the DDK.
  54
+Then change to directory "commandline" and run "make" on Unix or
  55
+"make -f Makefile.windows" on Windows.
  56
+
  57
+
  58
+USING THE COMMAND LINE TOOL
  59
+===========================
  60
+The device implements a data store of 128 bytes in EEPROM. You can send a
  61
+block of 128 bytes to the device or read the block using the command line
  62
+tool.
  63
+
  64
+To send a block to the device, use e.g.
  65
+
  66
+    hidtool write 0x01,0x02,0x03,0x04,...
  67
+
  68
+and to receive the block, use
  69
+
  70
+    hidtool read
  71
+
  72
+
  73
+----------------------------------------------------------------------------
  74
+(c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
  75
+http://www.obdev.at/
42  firmware/commandline/Makefile
... ...
@@ -0,0 +1,42 @@
  1
+# Name: Makefile
  2
+# Project: hid-data example
  3
+# Author: Christian Starkjohann
  4
+# Creation Date: 2008-04-11
  5
+# Tabsize: 4
  6
+# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  7
+# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  8
+# This Revision: $Id$
  9
+
  10
+# Please read the definitions below and edit them as appropriate for your
  11
+# system:
  12
+
  13
+# Use the following 3 lines on Unix and Mac OS X:
  14
+USBFLAGS=   `libusb-config --cflags`
  15
+USBLIBS=    `libusb-config --libs`
  16
+EXE_SUFFIX=
  17
+
  18
+# Use the following 3 lines on Windows and comment out the 3 above:
  19
+#USBFLAGS=
  20
+#USBLIBS=    -lhid -lusb -lsetupapi
  21
+#EXE_SUFFIX= .exe
  22
+
  23
+CC=				gcc
  24
+CFLAGS=			-O -Wall $(USBFLAGS)
  25
+LIBS=			$(USBLIBS)
  26
+
  27
+OBJ=		hidtool.o hiddata.o
  28
+PROGRAM=	hidtool$(EXE_SUFFIX)
  29
+
  30
+all: $(PROGRAM)
  31
+
  32
+$(PROGRAM): $(OBJ)
  33
+	$(CC) -o $(PROGRAM) $(OBJ) $(LIBS)
  34
+
  35
+strip: $(PROGRAM)
  36
+	strip $(PROGRAM)
  37
+
  38
+clean:
  39
+	rm -f $(OBJ) $(PROGRAM)
  40
+
  41
+.c.o:
  42
+	$(CC) $(ARCH_COMPILE) $(CFLAGS) -c $*.c -o $*.o
18  firmware/commandline/Makefile.windows
... ...
@@ -0,0 +1,18 @@
  1
+# Name: Makefile.windows
  2
+# Project: hid-data example
  3
+# Author: Christian Starkjohann
  4
+# Creation Date: 2008-04-11
  5
+# Tabsize: 4
  6
+# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  7
+# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  8
+# This Revision: $Id$
  9
+
  10
+# You may use this file with
  11
+#   make -f Makefile.windows
  12
+# on Windows with MinGW instead of editing the main Makefile.
  13
+
  14
+include Makefile
  15
+
  16
+USBFLAGS=
  17
+USBLIBS=    -lhid -lsetupapi
  18
+EXE_SUFFIX= .exe
324  firmware/commandline/hiddata.c
... ...
@@ -0,0 +1,324 @@
  1
+/* Name: hiddata.c
  2
+ * Author: Christian Starkjohann
  3
+ * Creation Date: 2008-04-11
  4
+ * Tabsize: 4
  5
+ * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  6
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  7
+ * This Revision: $Id$
  8
+ */
  9
+
  10
+#include <stdio.h>
  11
+#include "hiddata.h"
  12
+
  13
+/* ######################################################################## */
  14
+#if defined(WIN32) /* ##################################################### */
  15
+/* ######################################################################## */
  16
+
  17
+#include <windows.h>
  18
+#include <setupapi.h>
  19
+#include "hidsdi.h"
  20
+#include <ddk/hidpi.h>
  21
+
  22
+#ifdef DEBUG
  23
+#define DEBUG_PRINT(arg)    printf arg
  24
+#else
  25
+#define DEBUG_PRINT(arg)
  26
+#endif
  27
+
  28
+/* ------------------------------------------------------------------------ */
  29
+
  30
+static void convertUniToAscii(char *buffer)
  31
+{
  32
+unsigned short  *uni = (void *)buffer;
  33
+char            *ascii = buffer;
  34
+
  35
+    while(*uni != 0){
  36
+        if(*uni >= 256){
  37
+            *ascii++ = '?';
  38
+        }else{
  39
+            *ascii++ = *uni++;
  40
+        }
  41
+    }
  42
+    *ascii++ = 0;
  43
+}
  44
+
  45
+int usbhidOpenDevice(usbDevice_t **device, int vendor, char *vendorName, int product, char *productName, int usesReportIDs)
  46
+{
  47
+GUID                                hidGuid;        /* GUID for HID driver */
  48
+HDEVINFO                            deviceInfoList;
  49
+SP_DEVICE_INTERFACE_DATA            deviceInfo;
  50
+SP_DEVICE_INTERFACE_DETAIL_DATA     *deviceDetails = NULL;
  51
+DWORD                               size;
  52
+int                                 i, openFlag = 0;  /* may be FILE_FLAG_OVERLAPPED */
  53
+int                                 errorCode = USBOPEN_ERR_NOTFOUND;
  54
+HANDLE                              handle = INVALID_HANDLE_VALUE;
  55
+HIDD_ATTRIBUTES                     deviceAttributes;
  56
+				
  57
+    HidD_GetHidGuid(&hidGuid);
  58
+    deviceInfoList = SetupDiGetClassDevs(&hidGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_INTERFACEDEVICE);
  59
+    deviceInfo.cbSize = sizeof(deviceInfo);
  60
+    for(i=0;;i++){
  61
+        if(handle != INVALID_HANDLE_VALUE){
  62
+            CloseHandle(handle);
  63
+            handle = INVALID_HANDLE_VALUE;
  64
+        }
  65
+        if(!SetupDiEnumDeviceInterfaces(deviceInfoList, 0, &hidGuid, i, &deviceInfo))
  66
+            break;  /* no more entries */
  67
+        /* first do a dummy call just to determine the actual size required */
  68
+        SetupDiGetDeviceInterfaceDetail(deviceInfoList, &deviceInfo, NULL, 0, &size, NULL);
  69
+        if(deviceDetails != NULL)
  70
+            free(deviceDetails);
  71
+        deviceDetails = malloc(size);
  72
+        deviceDetails->cbSize = sizeof(*deviceDetails);
  73
+        /* this call is for real: */
  74
+        SetupDiGetDeviceInterfaceDetail(deviceInfoList, &deviceInfo, deviceDetails, size, &size, NULL);
  75
+        DEBUG_PRINT(("checking HID path \"%s\"\n", deviceDetails->DevicePath));
  76
+#if 0
  77
+        /* If we want to access a mouse our keyboard, we can only use feature
  78
+         * requests as the device is locked by Windows. It must be opened
  79
+         * with ACCESS_TYPE_NONE.
  80
+         */
  81
+        handle = CreateFile(deviceDetails->DevicePath, ACCESS_TYPE_NONE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL);
  82
+#endif
  83
+        /* attempt opening for R/W -- we don't care about devices which can't be accessed */
  84
+        handle = CreateFile(deviceDetails->DevicePath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL);
  85
+        if(handle == INVALID_HANDLE_VALUE){
  86
+            DEBUG_PRINT(("opening failed: %d\n", (int)GetLastError()));
  87
+            /* errorCode = USBOPEN_ERR_ACCESS; opening will always fail for mouse -- ignore */
  88
+            continue;
  89
+        }
  90
+        deviceAttributes.Size = sizeof(deviceAttributes);
  91
+        HidD_GetAttributes(handle, &deviceAttributes);
  92
+        DEBUG_PRINT(("device attributes: vid=%d pid=%d\n", deviceAttributes.VendorID, deviceAttributes.ProductID));
  93
+        if(deviceAttributes.VendorID != vendor || deviceAttributes.ProductID != product)
  94
+            continue;   /* ignore this device */
  95
+        errorCode = USBOPEN_ERR_NOTFOUND;
  96
+        if(vendorName != NULL && productName != NULL){
  97
+            char    buffer[512];
  98
+            if(!HidD_GetManufacturerString(handle, buffer, sizeof(buffer))){
  99
+                DEBUG_PRINT(("error obtaining vendor name\n"));
  100
+                errorCode = USBOPEN_ERR_IO;
  101
+                continue;
  102
+            }
  103
+            convertUniToAscii(buffer);
  104
+            DEBUG_PRINT(("vendorName = \"%s\"\n", buffer));
  105
+            if(strcmp(vendorName, buffer) != 0)
  106
+                continue;
  107
+            if(!HidD_GetProductString(handle, buffer, sizeof(buffer))){
  108
+                DEBUG_PRINT(("error obtaining product name\n"));
  109
+                errorCode = USBOPEN_ERR_IO;
  110
+                continue;
  111
+            }
  112
+            convertUniToAscii(buffer);
  113
+            DEBUG_PRINT(("productName = \"%s\"\n", buffer));
  114
+            if(strcmp(productName, buffer) != 0)
  115
+                continue;
  116
+        }
  117
+        break;  /* we have found the device we are looking for! */
  118
+    }
  119
+    SetupDiDestroyDeviceInfoList(deviceInfoList);
  120
+    if(deviceDetails != NULL)
  121
+        free(deviceDetails);
  122
+    if(handle != INVALID_HANDLE_VALUE){
  123
+        *device = (usbDevice_t *)handle;
  124
+        errorCode = 0;
  125
+    }
  126
+    return errorCode;
  127
+}
  128
+
  129
+/* ------------------------------------------------------------------------ */
  130
+
  131
+void    usbhidCloseDevice(usbDevice_t *device)
  132
+{
  133
+    CloseHandle((HANDLE)device);
  134
+}
  135
+
  136
+/* ------------------------------------------------------------------------ */
  137
+
  138
+int usbhidSetReport(usbDevice_t *device, char *buffer, int len)
  139
+{
  140
+BOOLEAN rval;
  141
+
  142
+    rval = HidD_SetFeature((HANDLE)device, buffer, len);
  143
+    return rval == 0 ? USBOPEN_ERR_IO : 0;
  144
+}
  145
+
  146
+/* ------------------------------------------------------------------------ */
  147
+
  148
+int usbhidGetReport(usbDevice_t *device, int reportNumber, char *buffer, int *len)
  149
+{
  150
+BOOLEAN rval = 0;
  151
+
  152
+    buffer[0] = reportNumber;
  153
+    rval = HidD_GetFeature((HANDLE)device, buffer, *len);
  154
+    return rval == 0 ? USBOPEN_ERR_IO : 0;
  155
+}
  156
+
  157
+/* ------------------------------------------------------------------------ */
  158
+
  159
+/* ######################################################################## */
  160
+#else /* defined WIN32 #################################################### */
  161
+/* ######################################################################## */
  162
+
  163
+#include <string.h>
  164
+#include <usb.h>
  165
+
  166
+#define usbDevice   usb_dev_handle  /* use libusb's device structure */
  167
+
  168
+/* ------------------------------------------------------------------------- */
  169
+
  170
+#define USBRQ_HID_GET_REPORT    0x01
  171
+#define USBRQ_HID_SET_REPORT    0x09
  172
+
  173
+#define USB_HID_REPORT_TYPE_FEATURE 3
  174
+
  175
+
  176
+static int  usesReportIDs;
  177
+
  178
+/* ------------------------------------------------------------------------- */
  179
+
  180
+static int usbhidGetStringAscii(usb_dev_handle *dev, int index, char *buf, int buflen)
  181
+{
  182
+char    buffer[256];
  183
+int     rval, i;
  184
+
  185
+    if((rval = usb_get_string_simple(dev, index, buf, buflen)) >= 0) /* use libusb version if it works */
  186
+        return rval;
  187
+    if((rval = usb_control_msg(dev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR, (USB_DT_STRING << 8) + index, 0x0409, buffer, sizeof(buffer), 5000)) < 0)
  188
+        return rval;
  189
+    if(buffer[1] != USB_DT_STRING){
  190
+        *buf = 0;
  191
+        return 0;
  192
+    }
  193
+    if((unsigned char)buffer[0] < rval)
  194
+        rval = (unsigned char)buffer[0];
  195
+    rval /= 2;
  196
+    /* lossy conversion to ISO Latin1: */
  197
+    for(i=1;i<rval;i++){
  198
+        if(i > buflen)              /* destination buffer overflow */
  199
+            break;
  200
+        buf[i-1] = buffer[2 * i];
  201
+        if(buffer[2 * i + 1] != 0)  /* outside of ISO Latin1 range */
  202
+            buf[i-1] = '?';
  203
+    }
  204
+    buf[i-1] = 0;
  205
+    return i-1;
  206
+}
  207
+
  208
+int usbhidOpenDevice(usbDevice_t **device, int vendor, char *vendorName, int product, char *productName, int _usesReportIDs)
  209
+{
  210
+struct usb_bus      *bus;
  211
+struct usb_device   *dev;
  212
+usb_dev_handle      *handle = NULL;
  213
+int                 errorCode = USBOPEN_ERR_NOTFOUND;
  214
+static int          didUsbInit = 0;
  215
+
  216
+    if(!didUsbInit){
  217
+        usb_init();
  218
+        didUsbInit = 1;
  219
+    }
  220
+    usb_find_busses();
  221
+    usb_find_devices();
  222
+    for(bus=usb_get_busses(); bus; bus=bus->next){
  223
+        for(dev=bus->devices; dev; dev=dev->next){
  224
+            if(dev->descriptor.idVendor == vendor && dev->descriptor.idProduct == product){
  225
+                char    string[256];
  226
+                int     len;
  227
+                handle = usb_open(dev); /* we need to open the device in order to query strings */
  228
+                if(!handle){
  229
+                    errorCode = USBOPEN_ERR_ACCESS;
  230
+                    fprintf(stderr, "Warning: cannot open USB device: %s\n", usb_strerror());
  231
+                    continue;
  232
+                }
  233
+                if(vendorName == NULL && productName == NULL){  /* name does not matter */
  234
+                    break;
  235
+                }
  236
+                /* now check whether the names match: */
  237
+                len = usbhidGetStringAscii(handle, dev->descriptor.iManufacturer, string, sizeof(string));
  238
+                if(len < 0){
  239
+                    errorCode = USBOPEN_ERR_IO;
  240
+                    fprintf(stderr, "Warning: cannot query manufacturer for device: %s\n", usb_strerror());
  241
+                }else{
  242
+                    errorCode = USBOPEN_ERR_NOTFOUND;
  243
+                    /* fprintf(stderr, "seen device from vendor ->%s<-\n", string); */
  244
+                    if(strcmp(string, vendorName) == 0){
  245
+                        len = usbhidGetStringAscii(handle, dev->descriptor.iProduct, string, sizeof(string));
  246
+                        if(len < 0){
  247
+                            errorCode = USBOPEN_ERR_IO;
  248
+                            fprintf(stderr, "Warning: cannot query product for device: %s\n", usb_strerror());
  249
+                        }else{
  250
+                            errorCode = USBOPEN_ERR_NOTFOUND;
  251
+                            /* fprintf(stderr, "seen product ->%s<-\n", string); */
  252
+                            if(strcmp(string, productName) == 0)
  253
+                                break;
  254
+                        }
  255
+                    }
  256
+                }
  257
+                usb_close(handle);
  258
+                handle = NULL;
  259
+            }
  260
+        }
  261
+        if(handle)
  262
+            break;
  263
+    }
  264
+    if(handle != NULL){
  265
+        errorCode = 0;
  266
+        *device = (void *)handle;
  267
+        usesReportIDs = _usesReportIDs;
  268
+    }
  269
+    return errorCode;
  270
+}
  271
+
  272
+/* ------------------------------------------------------------------------- */
  273
+
  274
+void    usbhidCloseDevice(usbDevice_t *device)
  275
+{
  276
+    if(device != NULL)
  277
+        usb_close((void *)device);
  278
+}
  279
+
  280
+/* ------------------------------------------------------------------------- */
  281
+
  282
+int usbhidSetReport(usbDevice_t *device, char *buffer, int len)
  283
+{
  284
+int bytesSent, reportId = buffer[0];
  285
+
  286
+    if(!usesReportIDs){
  287
+        buffer++;   /* skip dummy report ID */
  288
+        len--;
  289
+    }
  290
+    bytesSent = usb_control_msg((void *)device, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_ENDPOINT_OUT, USBRQ_HID_SET_REPORT, USB_HID_REPORT_TYPE_FEATURE << 8 | (reportId & 0xff), 0, buffer, len, 5000);
  291
+    if(bytesSent != len){
  292
+        if(bytesSent < 0)
  293
+            fprintf(stderr, "Error sending message: %s\n", usb_strerror());
  294
+        return USBOPEN_ERR_IO;
  295
+    }
  296
+    return 0;
  297
+}
  298
+
  299
+/* ------------------------------------------------------------------------- */
  300
+
  301
+int usbhidGetReport(usbDevice_t *device, int reportNumber, char *buffer, int *len)
  302
+{
  303
+int bytesReceived, maxLen = *len;
  304
+
  305
+    if(!usesReportIDs){
  306
+        buffer++;   /* make room for dummy report ID */
  307
+        maxLen--;
  308
+    }
  309
+    bytesReceived = usb_control_msg((void *)device, USB_TYPE_CLASS | USB_RECIP_DEVICE | USB_ENDPOINT_IN, USBRQ_HID_GET_REPORT, USB_HID_REPORT_TYPE_FEATURE << 8 | reportNumber, 0, buffer, maxLen, 5000);
  310
+    if(bytesReceived < 0){
  311
+        fprintf(stderr, "Error sending message: %s\n", usb_strerror());
  312
+        return USBOPEN_ERR_IO;
  313
+    }
  314
+    *len = bytesReceived;
  315
+    if(!usesReportIDs){
  316
+        buffer[-1] = reportNumber;  /* add dummy report ID */
  317
+        (*len)++;
  318
+    }
  319
+    return 0;
  320
+}
  321
+
  322
+/* ######################################################################## */
  323
+#endif /* defined WIN32 ################################################### */
  324
+/* ######################################################################## */
71  firmware/commandline/hiddata.h
... ...
@@ -0,0 +1,71 @@
  1
+/* Name: hiddata.h
  2
+ * Author: Christian Starkjohann
  3
+ * Creation Date: 2008-04-11
  4
+ * Tabsize: 4
  5
+ * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  6
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  7
+ * This Revision: $Id$
  8
+ */
  9
+
  10
+#ifndef __HIDDATA_H_INCLUDED__
  11
+#define __HIDDATA_H_INCLUDED__
  12
+
  13
+/*
  14
+General Description:
  15
+This module implements an abstraction layer for data transfer over HID feature
  16
+requests. The implementation uses native Windows functions on Windows so that
  17
+no driver installation is required and libusb on Unix. You must link the
  18
+appropriate libraries in either case: "-lhid -lusb -lsetupapi" on Windows and
  19
+`libusb-config --libs` on Unix.
  20
+*/
  21
+
  22
+/* ------------------------------------------------------------------------ */
  23
+
  24
+#define USBOPEN_SUCCESS         0   /* no error */
  25
+#define USBOPEN_ERR_ACCESS      1   /* not enough permissions to open device */
  26
+#define USBOPEN_ERR_IO          2   /* I/O error */
  27
+#define USBOPEN_ERR_NOTFOUND    3   /* device not found */
  28
+
  29
+/* ------------------------------------------------------------------------ */
  30
+
  31
+typedef struct usbDevice    usbDevice_t;
  32
+/* Opaque data type representing the USB device. This can be a Windows handle
  33
+ * or a libusb handle, depending on the backend implementation.
  34
+ */
  35
+
  36
+/* ------------------------------------------------------------------------ */
  37
+
  38
+int usbhidOpenDevice(usbDevice_t **device, int vendorID, char *vendorName, int productID, char *productName, int usesReportIDs);
  39
+/* This function opens a USB device. 'vendorID' and 'productID' are the numeric
  40
+ * Vendor-ID and Product-ID of the device we want to open. If 'vendorName' and
  41
+ * 'productName' are both not NULL, only devices with matching manufacturer-
  42
+ * and product name strings are accepted. If the device uses report IDs,
  43
+ * 'usesReportIDs' must be set to a non-zero value.
  44
+ * Returns: If a matching device has been found, USBOPEN_SUCCESS is returned
  45
+ * and '*device' is set to an opaque pointer representing the device. The
  46
+ * device must be closed with usbhidCloseDevice(). If the device has not been
  47
+ * found or opening failed, an error code is returned.
  48
+ */
  49
+void    usbhidCloseDevice(usbDevice_t *device);
  50
+/* Every device opened with usbhidOpenDevice() must be closed with this function.
  51
+ */
  52
+int usbhidSetReport(usbDevice_t *device, char *buffer, int len);
  53
+/* This function sends a feature report to the device. The report ID must be
  54
+ * in the first byte of buffer and the length 'len' of the report is specified
  55
+ * including this report ID. If no report IDs are used, buffer[0] must be set
  56
+ * to 0 (dummy report ID).
  57
+ * Returns: 0 on success, an error code otherwise.
  58
+ */
  59
+int usbhidGetReport(usbDevice_t *device, int reportID, char *buffer, int *len);
  60
+/* This function obtains a feature report from the device. The requested
  61
+ * report-ID is passed in 'reportID'. The caller must pass a buffer of the size
  62
+ * of the expected report in 'buffer' and initialize the variable pointed to by
  63
+ * 'len' to the total size of this buffer. Upon successful return, the report
  64
+ * (prefixed with the report-ID) is in 'buffer' and the actual length of the
  65
+ * report is returned in '*len'.
  66
+ * Returns: 0 on success, an error code otherwise.
  67
+ */
  68
+
  69
+/* ------------------------------------------------------------------------ */
  70
+
  71
+#endif /* __HIDDATA_H_INCLUDED__ */
BIN  firmware/commandline/hiddata.o
Binary file not shown
49  firmware/commandline/hidsdi.h
... ...
@@ -0,0 +1,49 @@
  1
+/* Name: hidsdi.h
  2
+ * Author: Christian Starkjohann
  3
+ * Creation Date: 2006-02-02
  4
+ * Tabsize: 4
  5
+ * Copyright: (c) 2006-2008 by OBJECTIVE DEVELOPMENT Software GmbH
  6
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  7
+ * This Revision: $Id$
  8
+ */
  9
+
  10
+/*
  11
+General Description
  12
+This file is a replacement for hidsdi.h from the Windows DDK. It defines some
  13
+of the types and function prototypes of this header for our project. If you
  14
+have the Windows DDK version of this file or a version shipped with MinGW, use
  15
+that instead.
  16
+*/
  17
+
  18
+#ifndef _HIDSDI_H
  19
+#define _HIDSDI_H
  20
+
  21
+#include <pshpack4.h>
  22
+
  23
+#include <ddk/hidusage.h>
  24
+#include <ddk/hidpi.h>
  25
+
  26
+typedef struct{
  27
+    ULONG   Size;
  28
+    USHORT  VendorID;
  29
+    USHORT  ProductID;
  30
+    USHORT  VersionNumber;
  31
+}HIDD_ATTRIBUTES;
  32
+
  33
+void __stdcall      HidD_GetHidGuid(OUT LPGUID hidGuid);
  34
+
  35
+BOOLEAN __stdcall   HidD_GetAttributes(IN HANDLE device, OUT HIDD_ATTRIBUTES *attributes);
  36
+
  37
+BOOLEAN __stdcall   HidD_GetManufacturerString(IN HANDLE device, OUT void *buffer, IN ULONG bufferLen);
  38
+BOOLEAN __stdcall   HidD_GetProductString(IN HANDLE device, OUT void *buffer, IN ULONG bufferLen);
  39
+BOOLEAN __stdcall   HidD_GetSerialNumberString(IN HANDLE device, OUT void *buffer, IN ULONG bufferLen);
  40
+
  41
+BOOLEAN __stdcall   HidD_GetFeature(IN HANDLE device, OUT void *reportBuffer, IN ULONG bufferLen);
  42
+BOOLEAN __stdcall   HidD_SetFeature(IN HANDLE device, IN void *reportBuffer, IN ULONG bufferLen);
  43
+
  44
+BOOLEAN __stdcall   HidD_GetNumInputBuffers(IN HANDLE device, OUT ULONG *numBuffers);
  45
+BOOLEAN __stdcall   HidD_SetNumInputBuffers(IN HANDLE device, OUT ULONG numBuffers);
  46
+
  47
+#include <poppack.h>
  48
+
  49
+#endif
BIN  firmware/commandline/hidtool
Binary file not shown
127  firmware/commandline/hidtool.c
... ...
@@ -0,0 +1,127 @@
  1
+/* Name: hidtool.c
  2
+ * Project: hid-data example
  3
+ * Author: Christian Starkjohann
  4
+ * Creation Date: 2008-04-11
  5
+ * Tabsize: 4
  6
+ * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  7
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  8
+ * This Revision: $Id$
  9
+ */
  10
+
  11
+#include <stdio.h>
  12
+#include <string.h>
  13
+#include <stdlib.h>
  14
+#include "hiddata.h"
  15
+#include "../firmware/usbconfig.h"  /* for device VID, PID, vendor name and product name */
  16
+
  17
+/* ------------------------------------------------------------------------- */
  18
+
  19
+static char *usbErrorMessage(int errCode)
  20
+{
  21
+static char buffer[80];
  22
+
  23
+    switch(errCode){
  24
+        case USBOPEN_ERR_ACCESS:      return "Access to device denied";
  25
+        case USBOPEN_ERR_NOTFOUND:    return "The specified device was not found";
  26
+        case USBOPEN_ERR_IO:          return "Communication error with device";
  27
+        default:
  28
+            sprintf(buffer, "Unknown USB error %d", errCode);
  29
+            return buffer;
  30
+    }
  31
+    return NULL;    /* not reached */
  32
+}
  33
+
  34
+static usbDevice_t  *openDevice(void)
  35
+{
  36
+usbDevice_t     *dev = NULL;
  37
+unsigned char   rawVid[2] = {USB_CFG_VENDOR_ID}, rawPid[2] = {USB_CFG_DEVICE_ID};
  38
+char            vendorName[] = {USB_CFG_VENDOR_NAME, 0}, productName[] = {USB_CFG_DEVICE_NAME, 0};
  39
+int             vid = rawVid[0] + 256 * rawVid[1];
  40
+int             pid = rawPid[0] + 256 * rawPid[1];
  41
+int             err;
  42
+
  43
+    if((err = usbhidOpenDevice(&dev, vid, vendorName, pid, productName, 0)) != 0){
  44
+        fprintf(stderr, "error finding %s: %s\n", productName, usbErrorMessage(err));
  45
+        return NULL;
  46
+    }