libjoybus
Joybus implementation for 32-bit MCUs
Loading...
Searching...
No Matches
joybus_target_api Struct Reference

Data Fields

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.

Field Documentation

◆ byte_received

int(* joybus_target_api::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.

Parameters
targetthe target to handle the command
commandthe command buffer
byte_idxthe index of the byte that was just received
send_responsea callback function to send the response
user_datauser data to pass to the response callback
Returns
positive number of bytes still expected, 0 if no more bytes expected, negative error code on failure

The documentation for this struct was generated from the following file: