@@ -51,16 +51,21 @@ extern "C" {
5151// Application API (Multiple Interfaces) i.e CFG_TUD_VENDOR > 1
5252//--------------------------------------------------------------------+
5353bool tud_vendor_n_mounted (uint8_t idx );
54+
55+ #if CFG_TUD_VENDOR_RX_BUFSIZE > 0
5456uint32_t tud_vendor_n_available (uint8_t idx );
5557bool tud_vendor_n_peek (uint8_t idx , uint8_t * ui8 );
56-
5758uint32_t tud_vendor_n_read (uint8_t idx , void * buffer , uint32_t bufsize );
5859uint32_t tud_vendor_n_read_discard (uint8_t idx , uint32_t count );
5960void tud_vendor_n_read_flush (uint8_t idx );
61+ #endif
6062
6163uint32_t tud_vendor_n_write (uint8_t idx , const void * buffer , uint32_t bufsize );
64+
65+ #if CFG_TUD_VENDOR_TX_BUFSIZE > 0
6266uint32_t tud_vendor_n_write_flush (uint8_t idx );
6367uint32_t tud_vendor_n_write_available (uint8_t idx );
68+ #endif
6469
6570TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_n_write_str (uint8_t idx , const char * str ) {
6671 return tud_vendor_n_write (idx , str , strlen (str ));
@@ -76,6 +81,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tud_vendor_mounted(void) {
7681 return tud_vendor_n_mounted (0 );
7782}
7883
84+ #if CFG_TUD_VENDOR_RX_BUFSIZE > 0
7985TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_available (void ) {
8086 return tud_vendor_n_available (0 );
8187}
@@ -95,6 +101,7 @@ TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_read_discard(uint32_t co
95101TU_ATTR_ALWAYS_INLINE static inline void tud_vendor_read_flush (void ) {
96102 tud_vendor_n_read_flush (0 );
97103}
104+ #endif
98105
99106TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_write (const void * buffer , uint32_t bufsize ) {
100107 return tud_vendor_n_write (0 , buffer , bufsize );
@@ -104,11 +111,11 @@ TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_write_str(const char *st
104111 return tud_vendor_n_write_str (0 , str );
105112}
106113
114+ #if CFG_TUD_VENDOR_TX_BUFSIZE > 0
107115TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_write_flush (void ) {
108116 return tud_vendor_n_write_flush (0 );
109117}
110118
111- #if CFG_TUD_VENDOR_TX_BUFSIZE > 0
112119TU_ATTR_ALWAYS_INLINE static inline uint32_t tud_vendor_write_available (void ) {
113120 return tud_vendor_n_write_available (0 );
114121}
0 commit comments