USBUS descriptor generator function pointers. More...
#include <usbus.h>
Data Fields | ||
size_t(* | fmt_pre_descriptor )(usbus_t *usbus, void *arg) | |
function pointer to format the descriptor content of this descriptor generator. | ||
size_t(* | fmt_post_descriptor )(usbus_t *usbus, void *arg) | |
function pointer to format the descriptor content of this descriptor generator. | ||
union { | ||
size_t(* get_descriptor_len )(usbus_t *usbus, void *arg) | ||
USBUS generic descriptor generator generated length. More... | ||
size_t fixed_len | ||
Fixed total length of the generated descriptors. More... | ||
} | len | |
Fixed or generated length of the descriptor. | ||
usbus_descr_len_type_t | len_type | |
Either USBUS_DESCR_LEN_FIXED or USBUS_DESCR_LEN_FUNC. | ||
size_t usbus_descr_gen_funcs_t::fixed_len |
Fixed total length of the generated descriptors.
Must return the total length of the descriptors that will be generated by the fmt_pre_descriptor and fmt_post_descriptor. This value is used when len_type is set to USBUS_DESCR_LEN_FIXED.
function pointer to format the descriptor content of this descriptor generator.
The content of this descriptor is appended after the descriptor of the object it is part of.
usbus | The usbus context |
arg | Additional argument for the descriptor generator |
function pointer to format the descriptor content of this descriptor generator.
The content of this descriptor is prefixes before the descriptor of the object it is part of.
usbus | The usbus context |
arg | Additional argument for the descriptor generator |
USBUS generic descriptor generator generated length.
Must return the total length of the descriptors that will be generated by fmt_pre_descriptor and fmt_post_descriptor This function is used when len_type is set to USBUS_DESCR_LEN_FUNC.
usbus | The usbus context |
arg | Additional argument for the descriptor generators |
usbus_descr_len_type_t usbus_descr_gen_funcs_t::len_type |