We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b8ed37 commit c8401c3Copy full SHA for c8401c3
1 file changed
src/main.rs
@@ -21,11 +21,11 @@ use rp_pico::{self as bsp, hal::gpio::SioInput};
21
22
use bsp::hal::{
23
self,
24
+ Sio,
25
clocks::init_clocks_and_plls,
26
pac::{self},
27
// prelude::*,
28
watchdog::Watchdog,
- Sio,
29
};
30
use embedded_hal::digital::InputPin;
31
@@ -214,11 +214,11 @@ fn main() -> ! {
214
}
215
if index < 2 {
216
// Actual buttons
217
- report.buttons = 1 << index;
+ report.buttons |= 1 << index;
218
} else if index < 2 + 4 {
219
- report.buttons = 1 << (index + 2);
+ report.buttons |= 1 << (index + 2);
220
} else if index < 2 + 4 + 1 {
221
- report.misc_buttons = 1 << 4;
+ report.misc_buttons |= 1 << 4;
222
} else if index < 2 + 4 + 1 + 4 {
223
// Joysticks
224
let value = if index & 1 == 1 { i16::MAX } else { i16::MIN };
0 commit comments