MCPcopy Create free account
hub / github.com/SmingHub/Sming / sendReport

Method sendReport

Sming/Libraries/SwitchJoycon/src/SwitchJoycon.cpp:243–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void 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
262bool SwitchJoycon::isPressed(uint8_t button)
263{

Callers

nothing calls this directly

Calls 4

resetAddrMethod · 0.80
setValueMethod · 0.80
printMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected