![]() |
Selecting bits from an analog input
Hey everyone, we are going to be using the USB chicklet and for buttons 5-8 it uses 4 bits from the AUX port on the joystick but I can't figure out how to select the bits from the actual output. Is there a simple way to do this or will I just have to do some math and figure out which output is being pressed by removing 128, 64, 32 and 16 from the output? Thanks in advance!
|
Re: Selecting bits from an analog input
Quote:
Code:
void Buttons(void)(I wrote this to demonstrate the ?: operator to some students, you can also invert the logic test instead). |
Re: Selecting bits from an analog input
Thanks so much!
|
| All times are GMT -5. The time now is 23:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi