|
libjoybus
Joybus implementation for 32-bit MCUs
|
Joybus target implementation for standard N64 controllers. More...
Topics | |
| N64 Pak | |
| Interface for implementing N64 "Pak" behavior (Rumble Pak, Controller Pak, etc.) when attached to an N64 controller target. | |
Data Structures | |
| struct | joybus_target_n64_controller |
| N64 controller Joybus target. More... | |
Macros | |
| #define | JOYBUS_TARGET_N64_CONTROLLER(target) |
| Macro to cast from a generic Joybus target to an N64 controller target. | |
Typedefs | |
| typedef void(* | joybus_target_n64_controller_reset_cb) (struct joybus_target_n64_controller *controller) |
| Callback type for N64 controller reset events. | |
Functions | |
| void | joybus_target_n64_controller_init (struct joybus_target_n64_controller *controller) |
| Initialize an N64 controller. | |
| void | joybus_target_n64_controller_set_reset_cb (struct joybus_target_n64_controller *controller, joybus_target_n64_controller_reset_cb callback) |
| Set the reset callback for the controller. | |
| void | joybus_target_n64_controller_attach_pak (struct joybus_target_n64_controller *controller, struct joybus_target_n64_pak *pak) |
| Attach an pak to the controller. | |
| void | joybus_target_n64_controller_detach_pak (struct joybus_target_n64_controller *controller) |
| Detach the currently attached pak from the controller. | |
| void | joybus_target_n64_controller_calibrate (struct joybus_target_n64_controller *controller) |
| Sample the current stick position as the controller's neutral origin. | |
Joybus target implementation for standard N64 controllers.
| #define JOYBUS_TARGET_N64_CONTROLLER | ( | target | ) |
Macro to cast from a generic Joybus target to an N64 controller target.
| typedef void(* joybus_target_n64_controller_reset_cb) (struct joybus_target_n64_controller *controller) |
Callback type for N64 controller reset events.
| controller | the controller that was reset |
| void joybus_target_n64_controller_attach_pak | ( | struct joybus_target_n64_controller * | controller, |
| struct joybus_target_n64_pak * | pak ) |
Attach an pak to the controller.
| controller | the controller to attach the pak to |
| pak | the pak to attach |
| void joybus_target_n64_controller_calibrate | ( | struct joybus_target_n64_controller * | controller | ) |
Sample the current stick position as the controller's neutral origin.
| controller | the controller to calibrate |
| void joybus_target_n64_controller_detach_pak | ( | struct joybus_target_n64_controller * | controller | ) |
Detach the currently attached pak from the controller.
| controller | the controller to detach the pak from |
| void joybus_target_n64_controller_init | ( | struct joybus_target_n64_controller * | controller | ) |
Initialize an N64 controller.
This function sets up the initial state, and registers Joybus command handlers for OEM N64 controller commands.
| controller | the controller to initialize |
| void joybus_target_n64_controller_set_reset_cb | ( | struct joybus_target_n64_controller * | controller, |
| joybus_target_n64_controller_reset_cb | callback ) |
Set the reset callback for the controller.
| controller | the controller to set the callback for |
| callback | the callback function |