Loading...
Searching...
No Matches
furi_hal_usb_cdc.h
1#pragma once
2
3#include <stdint.h>
4#include "usb_cdc.h"
5
6#define CDC_DATA_SZ 64
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct {
13 void (*tx_ep_callback)(void* context);
14 void (*rx_ep_callback)(void* context);
15 void (*state_callback)(void* context, uint8_t state);
16 void (*ctrl_line_callback)(void* context, uint8_t state);
17 void (*config_callback)(void* context, struct usb_cdc_line_coding* config);
19
20void furi_hal_cdc_set_callbacks(uint8_t if_num, CdcCallbacks* cb, void* context);
21
22struct usb_cdc_line_coding* furi_hal_cdc_get_port_settings(uint8_t if_num);
23
24uint8_t furi_hal_cdc_get_ctrl_line_state(uint8_t if_num);
25
26void furi_hal_cdc_send(uint8_t if_num, uint8_t* buf, uint16_t len);
27
28int32_t furi_hal_cdc_receive(uint8_t if_num, uint8_t* buf, uint16_t max_len);
29
30#ifdef __cplusplus
31}
32#endif
Definition furi_hal_usb_cdc.h:12