From 4f2e504de144204171c6d7b907357a13a26baf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20H=C3=BCbner?= Date: Mon, 27 Nov 2017 17:44:51 +0100 Subject: [PATCH] Update bc_usb_cdc header --- bcl/inc/bc_usb_cdc.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/bcl/inc/bc_usb_cdc.h b/bcl/inc/bc_usb_cdc.h index 810901f5..45efa57b 100644 --- a/bcl/inc/bc_usb_cdc.h +++ b/bcl/inc/bc_usb_cdc.h @@ -3,9 +3,29 @@ #include +//! @addtogroup bc_usb_cdc bc_usb_cdc +//! @brief USB CDC communication library +//! @{ + +//! @brief Initialize USB CDC library + void bc_usb_cdc_init(void); -void bc_usb_cdc_start(void); + +//! @brief Write buffer to USB CDC (non-blocking call) +//! @param[in] buffer Pointer to buffer to be written +//! @param[in] length Number of bytes to be written +//! @return true On success +//! @return false On failure + bool bc_usb_cdc_write(const void *buffer, size_t length); + +//! @brief Read buffer from USB CDC (non-blocking call) +//! @param[out] buffer Pointer to buffer to be read +//! @param[in] length Number of bytes to be read +//! @return Number of bytes read + size_t bc_usb_cdc_read(void *buffer, size_t length); +//! @} + #endif // _BC_USB_CDC_H