-
Notifications
You must be signed in to change notification settings - Fork 6
/
adapter.h
63 lines (53 loc) · 1.32 KB
/
adapter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
/* SPDX-License-Identifier: GPL-2.0 OR Apache-2.0 */
#ifndef __ESP_NETWORK_ADAPTER__H
#define __ESP_NETWORK_ADAPTER__H
struct esp_payload_header {
uint8_t if_type:4;
uint8_t if_num:4;
uint8_t reserved1;
uint16_t len;
uint16_t offset;
uint8_t reserved2;
union {
uint8_t reserved3;
uint8_t hci_pkt_type; /* Packet type for HCI interface */
uint8_t priv_pkt_type; /* Packet type for priv interface */
};
} __attribute__((packed));
typedef enum {
ESP_STA_IF,
ESP_AP_IF,
ESP_SERIAL_IF,
ESP_HCI_IF,
ESP_PRIV_IF,
} ESP_INTERFACE_TYPE;
typedef enum {
ESP_OPEN_DATA_PATH,
ESP_CLOSE_DATA_PATH,
ESP_RESET,
} ESP_HOST_INTERRUPT;
typedef enum {
ESP_WLAN_SDIO_SUPPORT = (1 << 0),
ESP_BT_UART_SUPPORT = (1 << 1),
ESP_BT_SDIO_SUPPORT = (1 << 2),
ESP_BLE_ONLY_SUPPORT = (1 << 3),
ESP_BR_EDR_ONLY_SUPPORT = (1 << 4),
ESP_WLAN_SPI_SUPPORT = (1 << 5),
ESP_BT_SPI_SUPPORT = (1 << 6),
} ESP_CAPABILITIES;
typedef enum {
ESP_PACKET_TYPE_EVENT,
} ESP_PRIV_PACKET_TYPE;
typedef enum {
ESP_PRIV_EVENT_INIT,
} ESP_PRIV_EVENT_TYPE;
typedef enum {
ESP_PRIV_CAPABILITY,
} ESP_PRIV_TAG_TYPE;
struct esp_priv_event {
uint8_t event_type;
uint8_t event_len;
uint8_t event_data[0];
}__attribute__((packed));
#endif