15#define JOYBUS_TARGET(target) ((struct joybus_target *)(target))
62 return target->api->
byte_received(target, command, byte_idx, send_response, user_data);
void(* joybus_target_response_cb_t)(const uint8_t *response, uint8_t len, void *user_data)
Callback type for sending responses from target command handlers.
Definition target.h:24
static int joybus_target_byte_received(struct joybus_target *target, const uint8_t *command, uint8_t byte_idx, joybus_target_response_cb_t send_response, void *user_data)
Handle a received command byte for a Joybus target.
Definition target.h:59
int(* byte_received)(struct joybus_target *target, const uint8_t *command, uint8_t byte_idx, joybus_target_response_cb_t send_response, void *user_data)
Handle a received command byte.
Definition target.h:38
A Joybus target, a device on the Joybus that can respond to commands.
Definition target.h:45