flipperzero-firmware/firmware/targets/api-hal-include/api-hal-vcp.h
DrZlo13 1f761d7fbb
[FL-84] iButton app, dallas emulate + cyfral read, cyfral emulate (#253)
* maxim crc function
* one wire template device and ds1990 classes
* 3 fields for addr
* cyfral emulator lib
* add cyfral read mode, refract rendering and events
* add ADC1_IN14, add adc interrupt
* cyfral read mode
* rename and move api-hal includes folder
* build onewire libs only if we build app
* start in mode 0
2020-11-25 10:25:13 +03:00

25 lines
567 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
/* 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(uint8_t* buffer, size_t size);