Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/lib/amp.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2010-2011 Code Aurora Forum. All rights reserved.5* Copyright (C) 2012 Intel Corporation.6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 and9* only version 2 as published by the Free Software Foundation.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16*/1718#ifndef __AMP_H19#define __AMP_H2021#ifdef __cplusplus22extern "C" {23#endif2425#define AMP_MGR_CID 0x032627/* AMP manager codes */28#define AMP_COMMAND_REJ 0x0129#define AMP_DISCOVER_REQ 0x0230#define AMP_DISCOVER_RSP 0x0331#define AMP_CHANGE_NOTIFY 0x0432#define AMP_CHANGE_RSP 0x0533#define AMP_INFO_REQ 0x0634#define AMP_INFO_RSP 0x0735#define AMP_ASSOC_REQ 0x0836#define AMP_ASSOC_RSP 0x0937#define AMP_LINK_REQ 0x0a38#define AMP_LINK_RSP 0x0b39#define AMP_DISCONN_REQ 0x0c40#define AMP_DISCONN_RSP 0x0d4142typedef struct {43uint8_t code;44uint8_t ident;45uint16_t len;46} __attribute__ ((packed)) amp_mgr_hdr;47#define AMP_MGR_HDR_SIZE 44849/* AMP ASSOC structure */50typedef struct {51uint8_t type_id;52uint16_t len;53uint8_t data[0];54} __attribute__ ((packed)) amp_assoc_tlv;5556typedef struct {57uint16_t reason;58} __attribute__ ((packed)) amp_cmd_rej_parms;5960typedef struct {61uint16_t mtu;62uint16_t mask;63} __attribute__ ((packed)) amp_discover_req_parms;6465typedef struct {66uint16_t mtu;67uint16_t mask;68uint8_t controller_list[0];69} __attribute__ ((packed)) amp_discover_rsp_parms;7071typedef struct {72uint8_t id;73} __attribute__ ((packed)) amp_info_req_parms;7475typedef struct {76uint8_t id;77uint8_t status;78uint32_t total_bandwidth;79uint32_t max_bandwidth;80uint32_t min_latency;81uint16_t pal_caps;82uint16_t assoc_size;83} __attribute__ ((packed)) amp_info_rsp_parms;8485typedef struct {86uint8_t id;87uint8_t status;88amp_assoc_tlv assoc;89} __attribute__ ((packed)) amp_assoc_rsp_parms;9091typedef struct {92uint8_t local_id;93uint8_t remote_id;94amp_assoc_tlv assoc;95} __attribute__ ((packed)) amp_link_req_parms;9697typedef struct {98uint8_t local_id;99uint8_t remote_id;100uint8_t status;101} __attribute__ ((packed)) amp_link_rsp_parms;102103typedef struct {104uint8_t local_id;105uint8_t remote_id;106} __attribute__ ((packed)) amp_disconn_req_parms;107108#define A2MP_MAC_ADDR_TYPE 1109#define A2MP_PREF_CHANLIST_TYPE 2110#define A2MP_CONNECTED_CHAN 3111#define A2MP_PAL_CAP_TYPE 4112#define A2MP_PAL_VER_INFO 5113114struct amp_tlv {115uint8_t type;116uint16_t len;117uint8_t val[0];118} __attribute__ ((packed));119120struct amp_pal_ver {121uint8_t ver;122uint16_t company_id;123uint16_t sub_ver;124} __attribute__ ((packed));125126struct amp_country_triplet {127union {128struct {129uint8_t first_channel;130uint8_t num_channels;131int8_t max_power;132} __attribute__ ((packed)) chans;133struct {134uint8_t reg_extension_id;135uint8_t reg_class;136uint8_t coverage_class;137} __attribute__ ((packed)) ext;138};139} __attribute__ ((packed));140141struct amp_chan_list {142uint8_t country_code[3];143struct amp_country_triplet triplets[0];144} __attribute__ ((packed));145146#define AMP_COMMAND_NOT_RECOGNIZED 0x0000147148/* AMP controller status */149#define AMP_CT_POWERED_DOWN 0x00150#define AMP_CT_BLUETOOTH_ONLY 0x01151#define AMP_CT_NO_CAPACITY 0x02152#define AMP_CT_LOW_CAPACITY 0x03153#define AMP_CT_MEDIUM_CAPACITY 0x04154#define AMP_CT_HIGH_CAPACITY 0x05155#define AMP_CT_FULL_CAPACITY 0x06156157/* AMP response status */158#define AMP_STATUS_SUCCESS 0x00159#define AMP_STATUS_INVALID_CTRL_ID 0x01160#define AMP_STATUS_UNABLE_START_LINK_CREATION 0x02161#define AMP_STATUS_NO_PHYSICAL_LINK_EXISTS 0x02162#define AMP_STATUS_COLLISION_OCCURED 0x03163#define AMP_STATUS_DISCONN_REQ_RECVD 0x04164#define AMP_STATUS_PHYS_LINK_EXISTS 0x05165#define AMP_STATUS_SECURITY_VIOLATION 0x06166167#ifdef __cplusplus168}169#endif170171#endif /* __AMP_H */172173174