diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -562,6 +562,20 @@ int main() { usb.write(1, (uint32_t*)&report, sizeof(report)); + uint32_t ps_state = (1 << 5) | (1 << 6) | (1 << 7); + ps_state |= buttons & (1 << 0) ? 1 << 12 : 0; // B1 + ps_state |= buttons & (1 << 1) ? 1 << 13 : 0; // B2 + ps_state |= buttons & (1 << 2) ? 1 << 11 : 0; // B3 + ps_state |= buttons & (1 << 3) ? 1 << 14 : 0; // B4 + ps_state |= buttons & (1 << 4) ? 1 << 10 : 0; // B5 + ps_state |= buttons & (1 << 5) ? 1 << 15 : 0; // B6 + ps_state |= buttons & (1 << 6) ? 1 << 9 : 0; // B7 + ps_state |= buttons & (1 << 6) ? 1 << 4 : 0; // B8 + ps_state |= buttons & (1 << 6) ? 1 << 8 : 0; // B9 + ps_state |= buttons & (1 << 10) ? 1 << 0 : 0; // select + ps_state |= buttons & (1 << 9) ? 1 << 3 : 0; // start + + /* uint32_t ps_state = 0; ps_state |= buttons & (1 << 0) ? 1 << 15 : 0; // B1 ps_state |= buttons & (1 << 1) ? 1 << 10 : 0; // B2 @@ -572,6 +586,7 @@ int main() { ps_state |= buttons & (1 << 6) ? 1 << 7 : 0; // B7 ps_state |= buttons & (1 << 10) ? 1 << 0 : 0; // select ps_state |= buttons & (1 << 9) ? 1 << 3 : 0; // start + */ spi_ps.set_state(ps_state); } |