mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-24 03:33:08 +00:00
3749eb0eed
* Core: ring buffer. * Api: usb vcp. F3: vcp glue code. * Applications: cli draft version. * Cli: basic working version, includes help and version commands * HAL: vcp on f2 * Makefile: update openocd conf * F3: vcp rx with freertos stream * Cli: help * Cli: standard commands, api-hal-uid * Power: cli poweroff.
24 lines
567 B
C
24 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);
|