mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-18 11:42:25 +00:00
clean up
This commit is contained in:
parent
08ea1c35cb
commit
078f600055
@ -55,47 +55,26 @@
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// APPLICATION API (Multiple Ports)
|
// APPLICATION API (Multiple Ports)
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
bool tud_n_cdc_connected(uint8_t port);
|
bool tud_n_cdc_connected (uint8_t port);
|
||||||
uint32_t tud_n_cdc_available(uint8_t port);
|
uint32_t tud_n_cdc_available (uint8_t port);
|
||||||
|
|
||||||
int tud_n_cdc_read_char(uint8_t port);
|
int tud_n_cdc_read_char (uint8_t port);
|
||||||
uint32_t tud_n_cdc_read(uint8_t port, void* buffer, uint32_t bufsize);
|
uint32_t tud_n_cdc_read (uint8_t port, void* buffer, uint32_t bufsize);
|
||||||
|
|
||||||
uint32_t tud_n_cdc_write_char(uint8_t port, char ch);
|
uint32_t tud_n_cdc_write_char (uint8_t port, char ch);
|
||||||
uint32_t tud_n_cdc_write(uint8_t port, void const* buffer, uint32_t bufsize);
|
uint32_t tud_n_cdc_write (uint8_t port, void const* buffer, uint32_t bufsize);
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// APPLICATION API (Single Port)
|
// APPLICATION API (Single Port)
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
static inline bool tud_cdc_connected(void)
|
static inline bool tud_cdc_connected (void) { return tud_n_cdc_connected(0); }
|
||||||
{
|
static inline uint32_t tud_cdc_available (void) { return tud_n_cdc_available(0); }
|
||||||
return tud_n_cdc_connected(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t tud_cdc_available(void)
|
static inline int tud_cdc_read_char (void) { return tud_n_cdc_read_char(0); }
|
||||||
{
|
static inline uint32_t tud_cdc_read (void* buffer, uint32_t bufsize) { return tud_n_cdc_read(0, buffer, bufsize); }
|
||||||
return tud_n_cdc_available(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int tud_cdc_read_char(void)
|
static inline uint32_t tud_cdc_write_char (char ch) { return tud_n_cdc_write_char(0, ch); }
|
||||||
{
|
static inline uint32_t tud_cdc_write (void const* buffer, uint32_t bufsize) { return tud_n_cdc_write(0, buffer, bufsize); }
|
||||||
return tud_n_cdc_read_char(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t tud_cdc_read(void* buffer, uint32_t bufsize)
|
|
||||||
{
|
|
||||||
return tud_n_cdc_read(0, buffer, bufsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t tud_cdc_write_char(char ch)
|
|
||||||
{
|
|
||||||
return tud_n_cdc_write_char(0, ch);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t tud_cdc_write(void const* buffer, uint32_t bufsize)
|
|
||||||
{
|
|
||||||
return tud_n_cdc_write(0, buffer, bufsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// APPLICATION CALLBACK API
|
// APPLICATION CALLBACK API
|
||||||
|
Loading…
x
Reference in New Issue
Block a user