27#ifndef _TUSB_VENDOR_DEVICE_H_
28#define _TUSB_VENDOR_DEVICE_H_
30#include "common/tusb_common.h"
32#ifndef CFG_TUD_VENDOR_EPSIZE
33#define CFG_TUD_VENDOR_EPSIZE 64
43bool tud_vendor_n_mounted (uint8_t itf);
45uint32_t tud_vendor_n_available (uint8_t itf);
46uint32_t tud_vendor_n_read (uint8_t itf,
void* buffer, uint32_t bufsize);
47bool tud_vendor_n_peek (uint8_t itf, uint8_t* ui8);
48void tud_vendor_n_read_flush (uint8_t itf);
50uint32_t tud_vendor_n_write (uint8_t itf,
void const* buffer, uint32_t bufsize);
51uint32_t tud_vendor_n_write_flush (uint8_t itf);
52uint32_t tud_vendor_n_write_available (uint8_t itf);
54static inline uint32_t tud_vendor_n_write_str (uint8_t itf,
char const* str);
57#define tud_vendor_n_flush(itf) tud_vendor_n_write_flush(itf)
62static inline bool tud_vendor_mounted (
void);
63static inline uint32_t tud_vendor_available (
void);
64static inline uint32_t tud_vendor_read (
void* buffer, uint32_t bufsize);
65static inline bool tud_vendor_peek (uint8_t* ui8);
66static inline void tud_vendor_read_flush (
void);
67static inline uint32_t tud_vendor_write (
void const* buffer, uint32_t bufsize);
68static inline uint32_t tud_vendor_write_str (
char const* str);
69static inline uint32_t tud_vendor_write_available (
void);
70static inline uint32_t tud_vendor_write_flush (
void);
73#define tud_vendor_flush() tud_vendor_write_flush()
80TU_ATTR_WEAK
void tud_vendor_rx_cb(uint8_t itf);
82TU_ATTR_WEAK
void tud_vendor_tx_cb(uint8_t itf, uint32_t sent_bytes);
88static inline uint32_t tud_vendor_n_write_str (uint8_t itf,
char const* str)
90 return tud_vendor_n_write(itf, str, strlen(str));
93static inline bool tud_vendor_mounted (
void)
95 return tud_vendor_n_mounted(0);
98static inline uint32_t tud_vendor_available (
void)
100 return tud_vendor_n_available(0);
103static inline uint32_t tud_vendor_read (
void* buffer, uint32_t bufsize)
105 return tud_vendor_n_read(0, buffer, bufsize);
108static inline bool tud_vendor_peek (uint8_t* ui8)
110 return tud_vendor_n_peek(0, ui8);
113static inline void tud_vendor_read_flush(
void)
115 tud_vendor_n_read_flush(0);
118static inline uint32_t tud_vendor_write (
void const* buffer, uint32_t bufsize)
120 return tud_vendor_n_write(0, buffer, bufsize);
123static inline uint32_t tud_vendor_write_flush (
void)
125 return tud_vendor_n_write_flush(0);
128static inline uint32_t tud_vendor_write_str (
char const* str)
130 return tud_vendor_n_write_str(0, str);
133static inline uint32_t tud_vendor_write_available (
void)
135 return tud_vendor_n_write_available(0);
141void vendord_init(
void);
142void vendord_reset(uint8_t rhport);
144bool vendord_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647