1 /****************************************************************************** 2 * Copyright (c) 2022 Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") 3 * All rights reserved. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 *****************************************************************************/ 18 19 #ifndef STACK_BLE_CONTROLLER_LL_ISO_ISO_TEST_H_ 20 #define STACK_BLE_CONTROLLER_LL_ISO_ISO_TEST_H_ 21 22 23 #define ISO_TESt_SUPPORT_MAX_NUM (2) 24 25 typedef struct{ 26 u32 successCnt; 27 u32 missedCnt; 28 u32 failedCnt; 29 u32 lastPkt; 30 }iso_test_receive_infor_t; 31 32 typedef struct{ 33 u32 send_pkt_cnt; 34 u32 isoTestSendTick; 35 }iso_test_trasmit_infor_t; 36 37 typedef struct{ 38 39 u8 occupy; 40 u8 isoTestMode; // 0: test mode disable, 1: transmit 2: receive 41 u8 isoTest_payload_type; 42 u8 rsvd1; 43 44 union{ 45 iso_test_receive_infor_t recMode; 46 iso_test_trasmit_infor_t tranMode; 47 }; 48 49 }iso_test_param_t; 50 51 typedef enum{ 52 ISO_TEST_ZERO, 53 ISO_TEST_VARIABLE, 54 ISO_TEST_MAXIMUM, 55 }iso_test_payload_type_t; 56 57 /** 58 * @brief This function is used to initialize LE ISO test mode. 59 * @param none 60 * @return none 61 */ 62 void blc_initIsoTestMode(void); 63 64 65 /** 66 * @brief This function is used to enter ISO test mode, only for testing purposes. 67 * @param *pCmdParam 68 * @return ble_sts_t 69 */ 70 ble_sts_t blc_hci_le_iso_transmit_test_cmd(hci_le_isoTransmitTestCmdParams_t *pCmdParam); 71 72 73 ble_sts_t blc_hci_le_iso_receive_test_cmd(hci_le_isoReceiveTestCmdParams_t *pCmdParam); 74 75 #endif /* STACK_BLE_CONTROLLER_LL_ISO_ISO_TEST_H_ */ 76