File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,8 +28,26 @@ class GamecubeController {
2828 */
2929 ~GamecubeController ();
3030
31+ /* *
32+ * @brief Send a poll to the GameCube controller. Delay will be added if necessary to conform
33+ * with the chosen polling rate.
34+ *
35+ * @param report The report buffer to write the controller's response into
36+ * @param rumble True to enable rumble, false to disable
37+ *
38+ * @return true if the controller responded, false otherwise
39+ */
3140 bool Poll (gc_report_t *report, bool rumble);
3241
42+ /* *
43+ * @brief Get the offset at which the PIO program was installed. Useful if you want to
44+ * communicate with multiple joybus devices without having to load multiple copies of the PIO
45+ * program.
46+ *
47+ * @return The offset at which the PIO program was installed
48+ */
49+ int GetOffset ();
50+
3351 private:
3452 static constexpr uint incoming_bit_length_us = 4 ;
3553 // Give a whole 5 bytes of leniency on receive so the controller has time to do processing
Original file line number Diff line number Diff line change @@ -104,3 +104,7 @@ bool __no_inline_not_in_flash_func(GamecubeController::Poll)(gc_report_t *report
104104
105105 return true ;
106106}
107+
108+ int GamecubeController::GetOffset () {
109+ return _port.offset ;
110+ }
You can’t perform that action at this time.
0 commit comments