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

Controller HCI transport API. More...

#include "wsf_types.h"
#include "wsf_os.h"
#include "cfg_mac.h"

Go to the source code of this file.

Macros

#define CHCI_15P4_CMD_TYPE   0x80
 802.15.4 protocol command type. More...
 
#define CHCI_15P4_DATA_TYPE   0x81
 802.15.4 protocol data type. More...
 
#define CHCI_CAL_CMD_TYPE   0xF1
 Radio calibration command type. More...
 
#define CHCI_CAL_SIG_TYPE   0xF2
 Radio calibration signal type. More...
 
#define CHCI_CAL_EVT_TYPE   0xF4
 Radio calibration event type. More...
 
#define CHCI_15P4_HDR_LEN   3
 802.15.4 protocol header length. More...
 
#define CHCI_CAL_HDR_LEN   3
 Radio calibration header length. More...
 

Typedefs

typedef void(* ChciTrRecvCback_t) (uint8_t type, uint8_t *pBuf)
 Message received callback. More...
 
typedef void(* ChciTrSendCompleteCback_t) (uint8_t type, uint8_t *pBuf)
 Message send complete callback. More...
 
typedef bool_t(* ChciTrServiceCback_t) (uint8_t *pType, uint16_t *pLen, uint8_t **pBuf)
 Service callback. More...
 
typedef void(* ChciTrSendHwErrorCback_t) (uint8_t code)
 Send hardware error callback. More...
 

Enumerations

Functions

void ChciTrHandlerInit (wsfHandlerId_t handlerId, uint16_t maxAclLen, uint16_t maxIsoSduLen)
 Initialize the transport handler. More...
 
void ChciTrHandler (wsfEventMask_t event, wsfMsgHdr_t *pMsg)
 Controller HCI transport message dispatch handler. More...
 
void ChciTrSetCbacks (uint8_t prot, ChciTrRecvCback_t recvCback, ChciTrSendCompleteCback_t sendCompleteCback, ChciTrServiceCback_t serviceCback)
 Set callbacks for a protocol. More...
 
void ChciTrSetSendHwErrorCback (ChciTrSendHwErrorCback_t sendHwErrorCback)
 Set send hardware error callback. More...
 
void ChciTrNeedsService (uint8_t prot)
 Flag protocol for needing service. More...
 

Detailed Description

Controller HCI transport API.

Copyright (c) 2013-2018 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 chci_api.h.

Macro Definition Documentation

#define CHCI_15P4_CMD_TYPE   0x80

802.15.4 protocol command type.

Definition at line 65 of file chci_api.h.

#define CHCI_15P4_DATA_TYPE   0x81

802.15.4 protocol data type.

Definition at line 68 of file chci_api.h.

#define CHCI_15P4_HDR_LEN   3

802.15.4 protocol header length.

Definition at line 80 of file chci_api.h.

#define CHCI_CAL_CMD_TYPE   0xF1

Radio calibration command type.

Definition at line 71 of file chci_api.h.

#define CHCI_CAL_EVT_TYPE   0xF4

Radio calibration event type.

Definition at line 77 of file chci_api.h.

#define CHCI_CAL_HDR_LEN   3

Radio calibration header length.

Definition at line 83 of file chci_api.h.

#define CHCI_CAL_SIG_TYPE   0xF2

Radio calibration signal type.

Definition at line 74 of file chci_api.h.

Typedef Documentation

typedef void(* ChciTrRecvCback_t) (uint8_t type, uint8_t *pBuf)

Message received callback.

Definition at line 86 of file chci_api.h.

typedef void(* ChciTrSendCompleteCback_t) (uint8_t type, uint8_t *pBuf)

Message send complete callback.

Definition at line 89 of file chci_api.h.

typedef void(* ChciTrSendHwErrorCback_t) (uint8_t code)

Send hardware error callback.

Definition at line 95 of file chci_api.h.

typedef bool_t(* ChciTrServiceCback_t) (uint8_t *pType, uint16_t *pLen, uint8_t **pBuf)

Service callback.

Definition at line 92 of file chci_api.h.

Enumeration Type Documentation

anonymous enum

Protocols that source and sink messages.

Enumerator
CHCI_TR_PROT_BLE 

BLE protocol.

CHCI_TR_PROT_BOOT 

Boot protocol.

CHCI_TR_PROT_15P4 

802.15.4 protocol

CHCI_TR_PROT_CAL 

Radio Calibration protocol

CHCI_TR_PROT_NUM 

Number of protocols.

Definition at line 37 of file chci_api.h.

anonymous enum

Type of message.

Enumerator
CHCI_TR_TYPE_CMD 

Command message (receive only).

CHCI_TR_TYPE_ACL 

ACL data message (send or receive).

CHCI_TR_TYPE_EVT 

Event message (send only).

CHCI_TR_TYPE_ISO 

ISO data message (send or receive).

CHCI_TR_TYPE_NUM 

Number of types.

Definition at line 47 of file chci_api.h.

anonymous enum

Error codes.

Enumerator
CHCI_TR_CODE_INVALID_DATA 

Invalid data received.

CHCI_TR_CODE_INVALID_DATA_LEN 

Invalid data length.

CHCI_TR_CODE_OUT_OF_MEMORY 

Out of memory.

Definition at line 57 of file chci_api.h.

Function Documentation

void ChciTrHandler ( wsfEventMask_t  event,
wsfMsgHdr_t pMsg 
)

Controller HCI transport message dispatch handler.

Parameters
eventWSF event.
pMsgWSF message.
void ChciTrHandlerInit ( wsfHandlerId_t  handlerId,
uint16_t  maxAclLen,
uint16_t  maxIsoSduLen 
)

Initialize the transport handler.

Parameters
handlerIdHandler ID.
maxAclLenMaximum ACL data length.
maxIsoSduLenMaximum ISO data length.
void ChciTrNeedsService ( uint8_t  prot)

Flag protocol for needing service.

Parameters
protProtocol.
void ChciTrSetCbacks ( uint8_t  prot,
ChciTrRecvCback_t  recvCback,
ChciTrSendCompleteCback_t  sendCompleteCback,
ChciTrServiceCback_t  serviceCback 
)

Set callbacks for a protocol.

Parameters
protProtocol.
recvCbackMessage received callback.
sendCompleteCbackMessage send complete callback.
serviceCbackService callback.
void ChciTrSetSendHwErrorCback ( ChciTrSendHwErrorCback_t  sendHwErrorCback)

Set send hardware error callback.

Parameters
sendHwErrorCbackSend hardware error callback.
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.