|
libjoybus
Joybus implementation for 32-bit MCUs
|
Functions | |
| int | joybus_gcn_read (struct joybus *bus, enum joybus_gcn_analog_mode analog_mode, enum joybus_gcn_motor_state motor_state, struct joybus_gcn_controller_state *response) |
| Read the current input state of a GameCube controller. | |
| int | joybus_gcn_read_async (struct joybus *bus, enum joybus_gcn_analog_mode analog_mode, enum joybus_gcn_motor_state motor_state, struct joybus_gcn_controller_state *response, joybus_transfer_cb callback, void *user_data) |
| Read the current input state of a GameCube controller, asynchronously. | |
| int | joybus_gcn_read_origin (struct joybus *bus, struct joybus_gcn_controller_state *response) |
| Read the origin (neutral) state of a GameCube controller. | |
| int | joybus_gcn_read_origin_async (struct joybus *bus, struct joybus_gcn_controller_state *response, joybus_transfer_cb callback, void *user_data) |
| Read the origin (neutral) state of a GameCube controller, asynchronously. | |
| int | joybus_gcn_calibrate (struct joybus *bus, struct joybus_gcn_controller_state *response) |
| Calibrate a GameCube controller, setting its current input state as the origin. | |
| int | joybus_gcn_calibrate_async (struct joybus *bus, struct joybus_gcn_controller_state *response, joybus_transfer_cb callback, void *user_data) |
| Calibrate a GameCube controller, setting its current input state as the origin, asynchronously. | |
| int | joybus_gcn_read_long (struct joybus *bus, enum joybus_gcn_motor_state motor_state, struct joybus_gcn_controller_state *response) |
| Read the current input state of a GameCube controller, with full precision. | |
| int | joybus_gcn_read_long_async (struct joybus *bus, enum joybus_gcn_motor_state motor_state, struct joybus_gcn_controller_state *response, joybus_transfer_cb callback, void *user_data) |
| Read the current input state of a GameCube controller, with full precision, asynchronously. | |
| int | joybus_gcn_probe_device (struct joybus *bus, uint8_t response[JOYBUS_CMD_GCN_PROBE_DEVICE_RX]) |
| Send a "probe device" command to a WaveBird controller. | |
| int | joybus_gcn_probe_device_async (struct joybus *bus, uint8_t response[JOYBUS_CMD_GCN_PROBE_DEVICE_RX], joybus_transfer_cb callback, void *user_data) |
| Send a "probe device" command to a WaveBird controller, asynchronously. | |
| int | joybus_gcn_fix_device (struct joybus *bus, uint16_t wireless_id, struct joybus_id *response) |
| Send a "fix device" command to a WaveBird controller. | |
| int | joybus_gcn_fix_device_async (struct joybus *bus, uint16_t wireless_id, struct joybus_id *response, joybus_transfer_cb callback, void *user_data) |
| Send a "fix device" command to a WaveBird controller, asynchronously. | |
| int joybus_gcn_calibrate | ( | struct joybus * | bus, |
| struct joybus_gcn_controller_state * | response ) |
Calibrate a GameCube controller, setting its current input state as the origin.
| bus | the Joybus instance to use |
| response | buffer to store the origin state response in |
| int joybus_gcn_calibrate_async | ( | struct joybus * | bus, |
| struct joybus_gcn_controller_state * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Calibrate a GameCube controller, setting its current input state as the origin, asynchronously.
| bus | the Joybus instance to use |
| response | buffer to store the origin state response |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_gcn_fix_device | ( | struct joybus * | bus, |
| uint16_t | wireless_id, | ||
| struct joybus_id * | response ) |
Send a "fix device" command to a WaveBird controller.
Non-wireless controllers will ignore this command. If successful, the response buffer will contain the updated controller ID.
| bus | the Joybus instance to use |
| wireless_id | the 10-bit wireless ID to fix the controller to |
| response | buffer to store the identity response in |
| int joybus_gcn_fix_device_async | ( | struct joybus * | bus, |
| uint16_t | wireless_id, | ||
| struct joybus_id * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Send a "fix device" command to a WaveBird controller, asynchronously.
Non-wireless controllers will ignore this command. If successful, the response buffer will contain the updated controller ID.
| bus | the Joybus instance to use |
| wireless_id | the 10-bit wireless ID to fix the controller to |
| response | buffer to store the identity response in |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_gcn_probe_device | ( | struct joybus * | bus, |
| uint8_t | response[JOYBUS_CMD_GCN_PROBE_DEVICE_RX] ) |
Send a "probe device" command to a WaveBird controller.
| bus | the Joybus instance to use |
| response | buffer to store the response in |
| int joybus_gcn_probe_device_async | ( | struct joybus * | bus, |
| uint8_t | response[JOYBUS_CMD_GCN_PROBE_DEVICE_RX], | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Send a "probe device" command to a WaveBird controller, asynchronously.
| bus | the Joybus instance to use |
| response | buffer to store the response in |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_gcn_read | ( | struct joybus * | bus, |
| enum joybus_gcn_analog_mode | analog_mode, | ||
| enum joybus_gcn_motor_state | motor_state, | ||
| struct joybus_gcn_controller_state * | response ) |
Read the current input state of a GameCube controller.
| bus | the Joybus instance to use |
| analog_mode | the analog mode to use |
| motor_state | the motor state to use |
| response | buffer to store the input state response in |
| int joybus_gcn_read_async | ( | struct joybus * | bus, |
| enum joybus_gcn_analog_mode | analog_mode, | ||
| enum joybus_gcn_motor_state | motor_state, | ||
| struct joybus_gcn_controller_state * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Read the current input state of a GameCube controller, asynchronously.
| bus | the Joybus instance to use |
| analog_mode | the analog mode to use |
| motor_state | the motor state to use |
| response | buffer to store the input state response in |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_gcn_read_long | ( | struct joybus * | bus, |
| enum joybus_gcn_motor_state | motor_state, | ||
| struct joybus_gcn_controller_state * | response ) |
Read the current input state of a GameCube controller, with full precision.
| bus | the Joybus instance to use |
| motor_state | the motor state to use (one of JOYBUS_GCN_MOTOR_*) |
| response | buffer to store the input state response |
| int joybus_gcn_read_long_async | ( | struct joybus * | bus, |
| enum joybus_gcn_motor_state | motor_state, | ||
| struct joybus_gcn_controller_state * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Read the current input state of a GameCube controller, with full precision, asynchronously.
| bus | the Joybus instance to use |
| motor_state | the motor state to use (one of JOYBUS_GCN_MOTOR_*) |
| response | buffer to store the input state response |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_gcn_read_origin | ( | struct joybus * | bus, |
| struct joybus_gcn_controller_state * | response ) |
Read the origin (neutral) state of a GameCube controller.
| bus | the Joybus instance to use |
| response | buffer to store the origin state response in |
| int joybus_gcn_read_origin_async | ( | struct joybus * | bus, |
| struct joybus_gcn_controller_state * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Read the origin (neutral) state of a GameCube controller, asynchronously.
| bus | the Joybus instance to use |
| response | buffer to store the origin state response in |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |