Exactly the same.

Wow, I got *exactly* the same code as you (down to the brackets even). Same shift, same AND with 0x03. Nice job.

Anyways, the only thing you want to do different is that c_button code. Right now it'll assign the value 0x02 to c_button if it's true and you want 1. Just use:

c_button = (outbuf[5] >> 1) & 0x01;

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.