×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

USB 3-button footpedal programming in C++

USB 3-button footpedal programming in C++

USB 3-button footpedal programming in C++

(OP)
I'm currently in a project that involves recieving information with a usb footpedal, modeled like a dictaphone transcriptionist pedal.  The language I was thinking of using was C++, for lack of any better ideas.  I've perused the USB site and haven't found too much help there.  I'm just looking for some kind of sample code or something to help point me in the right direction.  Any help would be greatly appriciated.

RE: USB 3-button footpedal programming in C++

Using P's printer port & any interpreted or compiled BASIC:

10 defint i-x: defseg=0: i=&H408 ' get from 0000:0408  HEX
20 pport= peek(i)+ peek(i+1)*256 ' the addr of printer port
30 sense= pport+1:' Sense inp. port = Output 8 bit port + 1
40 ' Sense port has only bits 3 to 7 but bit 7 is inverted
50 ' so use e.g. bits 4,5,6 for the three switches
60'===================================================
70  i=inp(sense) and &H40 '  i= bit 6 of the sense ... etc.
80 if i   ... etc ....

<nbucska@pcperipherals.com>

RE: USB 3-button footpedal programming in C++

What OS where you targeting? Where you looking to write a miniport driver for the USB device?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources