| 241 | } |
| 242 | |
| 243 | void SwitchJoycon::sendReport(void) |
| 244 | { |
| 245 | if(!isConnected()) { |
| 246 | return; |
| 247 | } |
| 248 | |
| 249 | debug_d("Sending report ...."); |
| 250 | |
| 251 | #if DEBUG_VERBOSE_LEVEL == 3 |
| 252 | dump.resetAddr(); |
| 253 | dump.print(reinterpret_cast<uint8_t*>(&state), sizeof(state)); |
| 254 | #endif |
| 255 | |
| 256 | debug_d("================="); |
| 257 | |
| 258 | this->inputGamepad->setValue(state); |
| 259 | this->inputGamepad->notify(); |
| 260 | } |
| 261 | |
| 262 | bool SwitchJoycon::isPressed(uint8_t button) |
| 263 | { |