You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Source: http://www.developerfusion.com/article/84338/making-usb-c-friendly/ and https://github.com/torvalds/linux/blob/master/drivers/hid/hid-sony.c
* Used to call your own function when the device is successfully initialized.
64
+
* @param funcOnInit Function to call.
65
+
*/
66
+
voidattachOnInit(void (*funcOnInit)(void)) {
67
+
pFuncOnInit = funcOnInit;
68
+
};
69
+
70
+
/** @name PS Buzzer Controller functions */
71
+
/**
72
+
* getButtonPress(ButtonEnum b) will return true as long as the button is held down.
73
+
*
74
+
* While getButtonClick(ButtonEnum b) will only return it once.
75
+
*
76
+
* So you instance if you need to increase a variable once you would use getButtonClick(ButtonEnum b),
77
+
* but if you need to drive a robot forward you would use getButtonPress(ButtonEnum b).
78
+
* @param b ::ButtonEnum to read.
79
+
* @param controller The controller to read from. Default to 0.
80
+
* @return getButtonPress(ButtonEnum b) will return a true as long as a button is held down, while getButtonClick(ButtonEnum b) will return true once for each button press.
* Developer of the [BTD](#bluetooth-libraries), [BTHID](#bthid-library), [SPP](#spp-library), [PS4](#ps4-library), [PS3](#ps3-library), [Wii](#wii-library), and [Xbox](#xbox-library) libraries
25
+
* Developer of the [BTD](#bluetooth-libraries), [BTHID](#bthid-library), [SPP](#spp-library), [PS4](#ps4-library), [PS3](#ps3-library), [Wii](#wii-library), [Xbox](#xbox-library), and [PSBuzz](#ps-buzz-library) libraries
26
26
*__Andrew Kroll__ - <xxxajk@gmail.com>
27
27
* Major contributor to mass storage code
28
28
@@ -240,6 +240,17 @@ All the information about the Wii controllers are from these sites:
* The old library created by _Tomoyuki Tanaka_: <https://github.com/moyuchin/WiiRemote_on_Arduino> also helped a lot.
242
242
243
+
### [PS Buzz Library](PSBuzz.cpp)
244
+
245
+
This library implements support for the Playstation Buzz controllers via USB.
246
+
247
+
It is essentially just a wrapper around the [HIDUniversal](hiduniversal.cpp) which takes care of the initializing and reading of the controllers. The [PSBuzz](PSBuzz.cpp) class simply inherits this and parses the data, so it is easy for users to read the buttons and turn the big red button on the controllers on and off.
248
+
249
+
More information about the controller can be found at the following sites:
0 commit comments