|
KallistiOS
##version##
|
Definitions for using the controller device. More...
Go to the source code of this file.
Data Structures | |
| struct | cont_cond_t |
| struct | cont_state_t |
| Controller status structure. More... | |
Typedefs | |
| typedef void(* | cont_btn_callback_t )(uint8 addr, uint32 btns) |
| Controller automatic callback type. More... | |
Functions | |
| void | cont_btn_callback (uint8 addr, uint32 btns, cont_btn_callback_t cb) |
| Set an automatic button press callback. More... | |
Definitions for using the controller device.
This file contains the definitions needed to access the Maple controller device. Obviously, this corresponds to the MAPLE_FUNC_CONTROLLER function code.
Controller automatic callback type.
Functions of this type can be set with cont_btn_callback() to respond automatically to the specified set of buttons being pressed. This can be used, for instance, to implement the standard A+B+X+Y+Start method of ending the program running.
| void cont_btn_callback | ( | uint8 | addr, |
| uint32 | btns, | ||
| cont_btn_callback_t | cb | ||
| ) |
Set an automatic button press callback.
This function sets a callback function to be called when the specified controller has the set of buttons given pressed.
| addr | The controller to listen on. This value can be obtained by using maple_addr(). |
| btns | The buttons bitmask to match. |
| cb | The callback to call when the buttons are pressed. |
1.8.7