libjoybus
Joybus implementation for 32-bit MCUs
Loading...
Searching...
No Matches
N64 Rumble Pak Commands

Functions

int joybus_n64_rumble_pak_init (struct joybus *bus)
 Initialize a rumble pak.
int joybus_n64_rumble_pak_init_async (struct joybus *bus, joybus_transfer_cb callback, void *user_data)
 Initialize a rumble pak, asynchronously.
int joybus_n64_rumble_pak_start (struct joybus *bus)
 Start the motor on a rumble pak.
int joybus_n64_rumble_pak_start_async (struct joybus *bus, joybus_transfer_cb callback, void *user_data)
 Start the motor on a rumble pak, asynchronously.
int joybus_n64_rumble_pak_stop (struct joybus *bus)
 Stop the motor on a rumble pak.
int joybus_n64_rumble_pak_stop_async (struct joybus *bus, joybus_transfer_cb callback, void *user_data)
 Stop the motor on a rumble pak, asynchronously.

Detailed Description

Function Documentation

◆ joybus_n64_rumble_pak_init()

int joybus_n64_rumble_pak_init ( struct joybus * bus)

Initialize a rumble pak.

Parameters
busthe bus with a controller with a rumble pak attached
Returns
0 on success, a negative joybus_error on failure

◆ joybus_n64_rumble_pak_init_async()

int joybus_n64_rumble_pak_init_async ( struct joybus * bus,
joybus_transfer_cb callback,
void * user_data )

Initialize a rumble pak, asynchronously.

Parameters
busthe bus with a controller with a rumble pak attached
callbacka callback function to call when the transfer is complete
user_datauser data to pass to the callback function
Returns
0 if the transfer was started, a negative joybus_error otherwise

◆ joybus_n64_rumble_pak_start()

int joybus_n64_rumble_pak_start ( struct joybus * bus)

Start the motor on a rumble pak.

Parameters
busthe bus with a controller with a rumble pak attached
Returns
0 on success, a negative joybus_error on failure

◆ joybus_n64_rumble_pak_start_async()

int joybus_n64_rumble_pak_start_async ( struct joybus * bus,
joybus_transfer_cb callback,
void * user_data )

Start the motor on a rumble pak, asynchronously.

Parameters
busthe bus with a controller with a rumble pak attached
callbacka callback function to call when the transfer is complete
user_datauser data to pass to the callback function
Returns
0 if the transfer was started, a negative joybus_error otherwise

◆ joybus_n64_rumble_pak_stop()

int joybus_n64_rumble_pak_stop ( struct joybus * bus)

Stop the motor on a rumble pak.

Parameters
busthe bus with a controller with a rumble pak attached
Returns
0 on success, a negative joybus_error on failure

◆ joybus_n64_rumble_pak_stop_async()

int joybus_n64_rumble_pak_stop_async ( struct joybus * bus,
joybus_transfer_cb callback,
void * user_data )

Stop the motor on a rumble pak, asynchronously.

Parameters
busthe bus with a controller with a rumble pak attached
callbacka callback function to call when the transfer is complete
user_datauser data to pass to the callback function
Returns
0 if the transfer was started, a negative joybus_error otherwise