flipperzero-firmware/firmware/targets/api-hal-include/api-hal-vcp.h
gornekich 610f4f5d73
[FL-41] api-hal doxygen documentation (#387)
* targets/api-hal: rework documentation in doxygen style
* core/api-hal: rework documentation in doxygen style
* core/furi: rework documentation in doxygen style
* drivers: rework documentation in doxygen style

Co-authored-by: あく <alleteam@gmail.com>
2021-03-24 12:35:33 +03:00

36 lines
654 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Init VCP HAL
* Allocates ring buffer and initializes state
*/
void api_hal_vcp_init();
/**
* Recieve data from VCP
* Waits till some data arrives, never returns 0
* @param buffer - pointer to buffer
* @param size - buffer size
* @return items copied in buffer, 0 if channel closed
*/
size_t api_hal_vcp_rx(uint8_t* buffer, size_t size);
/**
* Transmit data to VCP
* @param buffer - pointer to buffer
* @param size - buffer size
*/
void api_hal_vcp_tx(const uint8_t* buffer, size_t size);
#ifdef __cplusplus
}
#endif