|
libjoybus
Joybus implementation for 32-bit MCUs
|
Topics | |
| N64 Rumble Pak Commands | |
Functions | |
| int | joybus_n64_read (struct joybus *bus, struct joybus_n64_controller_state *response) |
| Read the current input state of an N64 controller or mouse. | |
| int | joybus_n64_read_async (struct joybus *bus, struct joybus_n64_controller_state *response, joybus_transfer_cb callback, void *user_data) |
| Read the current input state of an N64 controller or mouse, asynchronously. | |
| int | joybus_n64_pak_write (struct joybus *bus, uint16_t addr, const void *data, uint8_t response[JOYBUS_CMD_N64_PAK_WRITE_RX]) |
| Write a block of data to the pak attached to an N64 controller. | |
| int | joybus_n64_pak_write_async (struct joybus *bus, uint16_t addr, const uint8_t data[JOYBUS_PAK_BLOCK_SIZE], uint8_t response[JOYBUS_CMD_N64_PAK_WRITE_RX], joybus_transfer_cb callback, void *user_data) |
| Write a block of data to the pak attached to an N64 controller, asynchronously. | |
| int | joybus_n64_pak_read (struct joybus *bus, uint16_t addr, uint8_t response[JOYBUS_CMD_N64_PAK_READ_RX]) |
| Read a block of data from the pak attached to an N64 controller. | |
| int | joybus_n64_pak_read_async (struct joybus *bus, uint16_t addr, uint8_t response[JOYBUS_CMD_N64_PAK_READ_RX], joybus_transfer_cb callback, void *user_data) |
| Read a block of data from the pak attached to an N64 controller, asynchronously. | |
| int joybus_n64_pak_read | ( | struct joybus * | bus, |
| uint16_t | addr, | ||
| uint8_t | response[JOYBUS_CMD_N64_PAK_READ_RX] ) |
Read a block of data from the pak attached to an N64 controller.
The response buffer will be populated with 32 bytes of data read from the pak, followed by a checksum.
| bus | the Joybus instance to use |
| addr | the address to read from, must be 32-byte aligned |
| response | buffer to store the response in |
| int joybus_n64_pak_read_async | ( | struct joybus * | bus, |
| uint16_t | addr, | ||
| uint8_t | response[JOYBUS_CMD_N64_PAK_READ_RX], | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Read a block of data from the pak attached to an N64 controller, asynchronously.
The response buffer will be populated with 32 bytes of data read from the pak, followed by a checksum.
| bus | the Joybus to use |
| addr | the address to read from, must be 32-byte aligned |
| response | buffer to store the response in, must be at least JOYBUS_CMD_N64_PAK_READ_RX bytes |
| callback | a callback function to call when the transfer is complete |
| user_data | user data to pass to the callback function |
| int joybus_n64_pak_write | ( | struct joybus * | bus, |
| uint16_t | addr, | ||
| const void * | data, | ||
| uint8_t | response[JOYBUS_CMD_N64_PAK_WRITE_RX] ) |
Write a block of data to the pak attached to an N64 controller.
The response buffer will be populated with a checksum of the written data (see joybus_data_checksum)
| bus | the Joybus instance to use |
| addr | the address to read from, must be 32-byte aligned |
| data | buffer to store the data in |
| response | buffer to store the response in |
| int joybus_n64_pak_write_async | ( | struct joybus * | bus, |
| uint16_t | addr, | ||
| const uint8_t | data[JOYBUS_PAK_BLOCK_SIZE], | ||
| uint8_t | response[JOYBUS_CMD_N64_PAK_WRITE_RX], | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Write a block of data to the pak attached to an N64 controller, asynchronously.
The response buffer will be populated with a checksum of the written data (see joybus_data_checksum).
| bus | the Joybus instance to use |
| addr | the address to write to, must be 32-byte aligned |
| data | the data to write |
| 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_n64_read | ( | struct joybus * | bus, |
| struct joybus_n64_controller_state * | response ) |
Read the current input state of an N64 controller or mouse.
| bus | the Joybus instance to use |
| response | buffer to store the response in |
Read the current input state of an N64 controller or mouse.
| int joybus_n64_read_async | ( | struct joybus * | bus, |
| struct joybus_n64_controller_state * | response, | ||
| joybus_transfer_cb | callback, | ||
| void * | user_data ) |
Read the current input state of an N64 controller or mouse, 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 |