Controller HCI transport API. More...
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... | |
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.
#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 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.
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.
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.
void ChciTrHandler | ( | wsfEventMask_t | event, |
wsfMsgHdr_t * | pMsg | ||
) |
Controller HCI transport message dispatch handler.
event | WSF event. |
pMsg | WSF message. |
void ChciTrHandlerInit | ( | wsfHandlerId_t | handlerId, |
uint16_t | maxAclLen, | ||
uint16_t | maxIsoSduLen | ||
) |
Initialize the transport handler.
handlerId | Handler ID. |
maxAclLen | Maximum ACL data length. |
maxIsoSduLen | Maximum ISO data length. |
void ChciTrNeedsService | ( | uint8_t | prot | ) |
Flag protocol for needing service.
prot | Protocol. |
void ChciTrSetCbacks | ( | uint8_t | prot, |
ChciTrRecvCback_t | recvCback, | ||
ChciTrSendCompleteCback_t | sendCompleteCback, | ||
ChciTrServiceCback_t | serviceCback | ||
) |
Set callbacks for a protocol.
prot | Protocol. |
recvCback | Message received callback. |
sendCompleteCback | Message send complete callback. |
serviceCback | Service callback. |
void ChciTrSetSendHwErrorCback | ( | ChciTrSendHwErrorCback_t | sendHwErrorCback | ) |
Set send hardware error callback.
sendHwErrorCback | Send hardware error callback. |