Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
lhci_int.h File Reference

LL HCI main module interface file. More...

#include "lhci_api.h"
#include "hci_defs.h"
#include "ll_api.h"
#include "wsf_os.h"
#include "wsf_queue.h"
#include "util/bstream.h"

Go to the source code of this file.

Data Structures

struct  lhciPersistCb_t
 Control block of the LL HCI subsystem (persists with resets). More...
 
struct  lhciCb_t
 Control block of the LL HCI subsystem (cleared with resets). More...
 
struct  lhciIsoCb_t
 Control block for ISO data generator. More...
 

Macros

#define LHCI_LEN_SET_EVENT_MASK_EVT   1
 
#define LHCI_LEN_RESET_EVT   1
 
#define LHCI_LEN_READ_PWR_LVL_EVT   4
 
#define LHCI_LEN_READ_AUTH_PAYLOAD_TO_EVT   5
 
#define LHCI_LEN_WRITE_AUTH_PAYLOAD_TO_EVT   3
 
#define LHCI_LEN_READ_LOCAL_VER_EVT   9
 
#define LHCI_LEN_READ_LOCAL_SUP_CMDS_EVT   65
 
#define LHCI_LEN_READ_LOCAL_SUP_FEAT_EVT   9
 
#define LHCI_LEN_READ_BUF_SIZE_EVT   8
 
#define LHCI_LEN_READ_BD_ADDR_EVT   7
 
#define LHCI_LEN_LE_SET_EVENT_MASK_EVT   1
 
#define LHCI_LEN_LE_READ_BUF_SIZE_EVT   4
 
#define LHCI_LEN_LE_READ_LOCAL_SUP_FEAT_EVT   9
 
#define LHCI_LEN_LE_SET_RAND_ADDR_EVT   1
 
#define LHCI_LEN_LE_SET_ADV_PARAM_EVT   1
 
#define LHCI_LEN_LE_READ_ADV_TX_POWER_EVT   2
 
#define LHCI_LEN_LE_SET_ADV_DATA_EVT   1
 
#define LHCI_LEN_LE_SET_SCAN_RESP_DATA_EVT   1
 
#define LHCI_LEN_LE_SET_ADV_ENABLE_EVT   1
 
#define LHCI_LEN_LE_SET_SCAN_PARAM_EVT   1
 
#define LHCI_LEN_LE_SET_SCAN_ENABLE_EVT   1
 
#define LHCI_LEN_LE_CREATE_CONN_CANCEL_EVT   1
 
#define LHCI_LEN_LE_READ_WL_SIZE_EVT   2
 
#define LHCI_LEN_LE_CLEAR_WHITE_LIST_EVT   1
 
#define LHCI_LEN_LE_ADD_DEV_WHITE_LIST_EVT   1
 
#define LHCI_LEN_LE_REMOVE_DEV_WHITE_LIST_EVT   1
 
#define LHCI_LEN_LE_SET_HOST_CHAN_CLASS   1
 
#define LHCI_LEN_LE_READ_CHAN_MAP_EVT   8
 
#define LHCI_LEN_LE_ENCRYPT_EVT   17
 
#define LHCI_LEN_LE_LTK_REQ_REPL_EVT   3
 
#define LHCI_LEN_LE_LTK_REQ_NEG_REPL_EVT   3
 
#define LHCI_LEN_LE_RAND_EVT   9
 
#define LHCI_LEN_LE_READ_SUP_STATES_EVT   9
 
#define LHCI_LEN_LE_RECEIVER_TEST_EVT   1
 
#define LHCI_LEN_LE_TRANSMITTER_TEST_EVT   1
 
#define LHCI_LEN_LE_TEST_END_EVT   3
 
#define LHCI_LEN_LE_REM_CONN_PARAM_REP   3
 
#define LHCI_LEN_LE_REM_CONN_PARAM_NEG_REP   3
 
#define LHCI_LEN_LE_SET_DATA_LEN   3
 
#define LHCI_LEN_LE_READ_DEF_DATA_LEN   5
 
#define LHCI_LEN_LE_WRITE_DEF_DATA_LEN   1
 
#define LHCI_LEN_LE_ADD_DEV_RES_LIST_EVT   1
 
#define LHCI_LEN_LE_REMOVE_DEV_RES_LIST_EVT   1
 
#define LHCI_LEN_LE_CLEAR_RES_LIST_EVT   1
 
#define LHCI_LEN_LE_READ_RES_LIST_SIZE_EVT   2
 
#define LHCI_LEN_LE_READ_PEER_RES_ADDR_EVT   7
 
#define LHCI_LEN_LE_READ_LOCAL_RES_ADDR_EVT   7
 
#define LHCI_LEN_LE_SET_ADDR_RES_ENABLE_EVT   1
 
#define LHCI_LEN_LE_SET_RES_PRIV_ADDR_TO_EVT   1
 
#define LHCI_LEN_LE_READ_MAX_DATA_LEN   9
 
#define LHCI_LEN_LE_SET_PRIVACY_MODE   1
 
#define LHCI_LEN_LE_SET_ADV_SET_RAND_ADDR   1
 
#define LHCI_LEN_LE_SET_EXT_ADV_PARAM   2
 
#define LHCI_LEN_LE_SET_EXT_ADV_DATA   1
 
#define LHCI_LEN_LE_SET_EXT_SCAN_RESP_DATA   1
 
#define LHCI_LEN_LE_SET_EXT_ADV_ENABLE   1
 
#define LHCI_LEN_LE_READ_MAX_ADV_DATA_LEN   3
 
#define LHCI_LEN_LE_READ_NUM_OF_SUP_ADV_SETS   2
 
#define LHCI_LEN_LE_REMOVE_ADV_SET   1
 
#define LHCI_LEN_LE_CLEAR_ADV_SETS   1
 
#define LHCI_LEN_LE_SET_PER_ADV_PARAM   1
 
#define LHCI_LEN_LE_SET_PER_ADV_DATA   1
 
#define LHCI_LEN_LE_SET_PER_ADV_ENABLE   1
 
#define LHCI_LEN_LE_SET_EXT_SCAN_PARAM   1
 
#define LHCI_LEN_LE_SET_EXT_SCAN_ENABLE   1
 
#define LHCI_LEN_LE_PER_ADV_CREATE_SYNC_CANCEL   1
 
#define LHCI_LEN_LE_PER_ADV_TERMINATE_SYNC   1
 
#define LHCI_LEN_LE_ADD_DEV_PER_ADV_LIST   1
 
#define LHCI_LEN_LE_REM_DEV_PER_ADV_LIST   1
 
#define LHCI_LEN_LE_CLEAR_PER_ADV_LIST   1
 
#define LHCI_LEN_LE_READ_PER_ADV_LIST_SIZE   2
 
#define LHCI_LEN_LE_READ_SUP_TX_POWER   3
 
#define LHCI_LEN_LE_WRITE_RF_PATH_COMP   1
 
#define LHCI_LEN_LE_READ_RF_PATH_COMP   5
 
#define LHCI_LEN_LE_SET_EXT_SCAN_ENABLE_EVT   1
 
#define LHCI_LEN_LE_READ_PHY_EVT   5
 
#define LHCI_LEN_LE_SET_DEF_PHY_EVT   1
 
#define LHCI_LEN_LE_ENHANCED_RECEIVER_TEST_EVT   1
 
#define LHCI_LEN_LE_ENHANCED_TRANSMITTER_TEST_EVT   1
 
#define LHCI_LEN_LE_SET_PER_ADV_RCV_ENABLE   1
 
#define LHCI_LEN_LE_PER_ADV_SYNC_TRANSFER   3
 
#define LHCI_LEN_LE_PER_ADV_SET_INFO_TRANSFER   3
 
#define LHCI_LEN_LE_SET_PAST_PARAM   3
 
#define LHCI_LEN_LE_SET_DEFAULT_PAST_PARAM   1
 
#define LHCI_LEN_LE_MODIFY_SCA_EVT   1
 
#define LHCI_LEN_LE_READ_BUF_SIZE_V2   7
 
#define LHCI_LEN_LE_READ_TX_SYNC   12
 
#define LHCI_LEN_LE_REMOVE_CIG   1
 
#define LHCI_LEN_LE_REJECT_CIS_REQ   1
 
#define LHCI_LEN_LE_BIG_TERMINATE_SYNC   2
 
#define LHCI_LEN_LE_SETUP_ISO_DATA_PATH   3
 
#define LHCI_LEN_LE_REMOVE_ISO_DATA_PATH   3
 
#define LHCI_LEN_LE_ISO_TX_TEST   1
 
#define LHCI_LEN_LE_ISO_RX_TEST   1
 
#define LHCI_LEN_LE_ISO_READ_TEST_COUNTER   15
 
#define LHCI_LEN_LE_ISO_TEST_END   15
 
#define LHCI_LEN_LE_SET_HOST_FEATURE   1
 
#define LHCI_LEN_LE_READ_ISO_LINK_QUAL   31
 
#define LHCI_LEN_LE_READ_ENH_TX_POWER_EVT   6
 
#define LHCI_LEN_LE_SET_TX_POWER_REPORT_EVT   3
 
#define LHCI_LEN_LE_SET_PATH_LOSS_REPORTING_PARAMS   3
 
#define LHCI_LEN_LE_SET_PATH_LOSS_REPORTING_ENABLE   3
 
#define LHCI_LEN_CONFIG_DATA_PATH   1
 
#define LHCI_LEN_READ_LOCAL_SUP_CODECS   3
 
#define LHCI_LEN_READ_LOCAL_SUP_CODEC_CAP   2
 
#define LHCI_LEN_READ_LOCAL_SUP_CONTROLLER_DLY   7
 
#define LHCI_DEF_EVT_MASK   UINT64_C(0x00001FFFFFFFFFFF);
 Mandatory event mask. More...
 
#define LHCI_DEF_EVT_PG2_MASK   UINT64_C(0x0000000000000000);
 Default page 2 event mask. More...
 
#define LHCI_DEF_LE_EVT_MASK   UINT64_C(0x000000000000001F);
 Default LE specific event mask. More...
 
#define LHCI_LOCAL_SUP_FEAT_VAL   UINT64_C(0x0000006000000000)
 Local supported features value. More...
 
#define LHCI_BYTE_TO_BITS(x)    (8 * x)
 Convert bytes to bits. More...
 
#define LHCI_LEN_VS_EVT   2
 Vendor specific event length. More...
 
#define LHCI_LEN_CMD_STATUS_EVT   0xFF
 Indicate command status event shall be returned. More...
 
#define LHCI_OPCODE_VS_SET_SCAN_CH_MAP   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E0)
 
#define LHCI_OPCODE_VS_SET_EVENT_MASK   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E1)
 
#define LHCI_OPCODE_VS_SET_RSRC_MGR_MODE   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E2)
 
#define LHCI_OPCODE_VS_ENA_ACL_SINK   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E3)
 
#define LHCI_OPCODE_VS_GENERATE_ACL   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E4)
 
#define LHCI_OPCODE_VS_ENA_AUTO_GEN_ACL   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E5)
 
#define LHCI_OPCODE_VS_SET_TX_TEST_ERR_PATT   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E6)
 
#define LHCI_OPCODE_VS_SET_CONN_OP_FLAGS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E7)
 
#define LHCI_OPCODE_VS_SET_P256_PRIV_KEY   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E8)
 
#define LHCI_OPCODE_VS_GET_PER_CHAN_MAP   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DE)
 
#define LHCI_OPCODE_VS_SET_HCI_SUP_CMD   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DF)
 
#define LHCI_OPCODE_VS_GET_ACL_TEST_REPORT   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3E9)
 
#define LHCI_OPCODE_VS_SET_LOCAL_MIN_USED_CHAN   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EA)
 
#define LHCI_OPCODE_VS_GET_PEER_MIN_USED_CHAN   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EB)
 
#define LHCI_OPCODE_VS_VALIDATE_PUB_KEY_MODE   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3EC)
 
#define LHCI_OPCODE_VS_SET_BD_ADDR   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F0)
 
#define LHCI_OPCODE_VS_GET_RAND_ADDR   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F1)
 
#define LHCI_OPCODE_VS_SET_LOCAL_FEAT   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F2)
 
#define LHCI_OPCODE_VS_SET_OP_FLAGS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F3)
 
#define LHCI_OPCODE_VS_SET_ADV_TX_PWR   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F5)
 
#define LHCI_OPCODE_VS_SET_CONN_TX_PWR   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F6)
 
#define LHCI_OPCODE_VS_SET_ENC_MODE   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F7)
 
#define LHCI_OPCODE_VS_SET_CHAN_MAP   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F8)
 
#define LHCI_OPCODE_VS_SET_DIAG_MODE   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F9)
 
#define LHCI_OPCODE_VS_SET_SNIFFER_ENABLE   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3CD)
 
#define LHCI_OPCODE_VS_GET_PDU_FILT_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3F4)
 
#define LHCI_OPCODE_VS_GET_SYS_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FA)
 
#define LHCI_OPCODE_VS_GET_ADV_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FB)
 
#define LHCI_OPCODE_VS_GET_SCAN_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FC)
 
#define LHCI_OPCODE_VS_GET_CONN_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FD)
 
#define LHCI_OPCODE_VS_GET_TEST_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FE)
 
#define LHCI_OPCODE_VS_GET_POOL_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3FF)
 
#define LHCI_OPCODE_VS_SET_AUX_DELAY   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D0)
 
#define LHCI_OPCODE_VS_SET_EXT_ADV_FRAG_LEN   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D1)
 
#define LHCI_OPCODE_VS_SET_EXT_ADV_PHY_OPTS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D2)
 
#define LHCI_OPCODE_VS_SET_EXT_ADV_DEF_PHY_OPTS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D3)
 
#define LHCI_OPCODE_VS_SET_EXT_SCAN_PHY_OPTS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D4)
 
#define LHCI_OPCODE_VS_GENERATE_ISO   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D5)
 
#define LHCI_OPCODE_VS_GET_ISO_TEST_REPORT   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D6)
 
#define LHCI_OPCODE_VS_ENA_ISO_SINK   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D7)
 
#define LHCI_OPCODE_VS_ENA_AUTO_GEN_ISO   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D8)
 
#define LHCI_OPCODE_VS_GET_CIS_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3D9)
 
#define LHCI_OPCODE_VS_GET_AUX_ADV_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DA)
 
#define LHCI_OPCODE_VS_GET_AUX_SCAN_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DB)
 
#define LHCI_OPCODE_VS_GET_PER_SCAN_STATS   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DC)
 
#define LHCI_OPCODE_VS_SET_CONN_PHY_TX_PWR   HCI_OPCODE(HCI_OGF_VENDOR_SPEC, 0x3DD)
 
#define LHCI_VS_EVT_MASK_SCAN_REPORT_EVT   0x01
 
#define LHCI_VS_EVT_MASK_DIAG_TRACE_EVT   0x02
 
#define LHCI_VS_EVT_MASK_ISO_EVENT_CMPL_EVT   0x04
 

Typedefs

typedef bool_t(* lhciEvtHandler_t) (LlEvt_t *pEvt)
 Event handler call signature. More...
 
typedef uint8_t *(* lhciServiceAcl_t) (void)
 Service ACL call signature. More...
 
typedef uint8_t *(* lhciServiceIso_t) (void)
 Service SCO call signature. More...
 

Enumerations

Functions

static uint8_t lhciPackEvtHdr (uint8_t *pBuf, uint8_t evtCode, uint8_t paramLen)
 Pack an event packet header. More...
 
static uint8_t lhciPackCmdStatusEvt (uint8_t *pBuf, uint8_t status, uint16_t opCode)
 Pack a command status event packet. More...
 
static uint8_t lhciPackCmdCompleteEvt (uint8_t *pBuf, uint16_t opCode)
 Pack a command complete event packet. More...
 
static uint8_t lhciPackCmdCompleteEvtStatus (uint8_t *pBuf, uint8_t status)
 Pack a command complete status parameter. More...
 
static uint8_t lhciPackVsEvt (uint8_t *pBuf, uint16_t vsEvtCode)
 Pack a vendor specific event packet. More...
 
static void lhciSendEvt (uint8_t *pEvtBuf)
 Send an event. More...
 
static void lhciSendCmdCmplEvt (uint8_t *pEvtBuf)
 Send a command complete event. More...
 

Variables

lhciCmdHandler_t lhciCmdTbl [LHCI_MSG_TOTAL]
 Command handler table. More...
 
lhciEvtHandler_t lhciEvtTbl [LHCI_MSG_TOTAL]
 Event handler table. More...
 
lhciServiceAcl_t lhciServiceAcl
 Receive pending handler. More...
 
lhciServiceIso_t lhciServiceIso
 Receive pending handler. More...
 

Detailed Description

LL HCI main module interface file.

Copyright (c) 2013-2019 Arm Ltd. All Rights Reserved.

Copyright (c) 2019-2020 Packetcraft, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file lhci_int.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.