MCPcopy Create free account
hub / github.com/dmadison/ArduinoXInput / XInputMap_Button

Class XInputMap_Button

src/XInput.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62// --------------------------------------------------------
63
64struct XInputMap_Button {
65 constexpr XInputMap_Button(uint8_t i, uint8_t o)
66 : index(i), mask(BuildMask(o)) {}
67 const uint8_t index;
68 const uint8_t mask;
69
70private:
71 constexpr static uint8_t BuildMask(uint8_t offset) {
72 return (1 << offset); // Bitmask of bit to flip
73 }
74};
75
76static const XInputMap_Button Map_DpadUp(2, 0);
77static const XInputMap_Button Map_DpadDown(2, 1);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected