|
libjoybus
Joybus implementation for 32-bit MCUs
|
API for implementing an N64 pak. More...
#include <n64_pak.h>
Data Fields | |
| void(* | read_block )(struct joybus_target_n64_pak *pak, uint16_t addr, uint8_t buf[JOYBUS_PAK_BLOCK_SIZE]) |
| Called when a host requests to read a 32-byte block from the pak. | |
| void(* | write_block )(struct joybus_target_n64_pak *pak, uint16_t addr, const uint8_t buf[JOYBUS_PAK_BLOCK_SIZE]) |
| Called when a host requests to write a 32-byte block to the pak. | |
API for implementing an N64 pak.
| void(* joybus_target_n64_pak_api::read_block) (struct joybus_target_n64_pak *pak, uint16_t addr, uint8_t buf[JOYBUS_PAK_BLOCK_SIZE]) |
Called when a host requests to read a 32-byte block from the pak.
Runs in interrupt context, on the response critical path, so it must return quickly.
| pak | the pak being read from |
| addr | block-aligned address (low 5 bits are zero) |
| buf | destination buffer, exactly 32 bytes |
| void(* joybus_target_n64_pak_api::write_block) (struct joybus_target_n64_pak *pak, uint16_t addr, const uint8_t buf[JOYBUS_PAK_BLOCK_SIZE]) |
Called when a host requests to write a 32-byte block to the pak.
Runs in interrupt context, AFTER the CRC response has been sent, but still on the command handling path, so must return before the next command byte is received.
| pak | the pak being written to |
| addr | block-aligned address (low 5 bits are zero) |
| buf | source buffer, exactly 32 bytes |