1 /* 2 * Copyright 2012-2020,2022 NXP 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _PHNXPUCIHAL_ADAPTATION_H_ 18 #define _PHNXPUCIHAL_ADAPTATION_H_ 19 20 //#include <android/hardware/uwb/1.0/IUwb.h> 21 //#include <android/hardware/uwb/1.0/types.h> 22 23 typedef uint8_t uwb_event_t; 24 typedef uint8_t uwb_status_t; 25 26 /*` 27 * The callback passed in from the UWB stack that the HAL 28 * can use to pass events back to the stack. 29 */ 30 typedef void(uwb_stack_callback_t)(uwb_event_t event, 31 uwb_status_t event_status); 32 33 /* 34 * The callback passed in from the UWB stack that the HAL 35 * can use to pass incomming data to the stack. 36 */ 37 typedef void(uwb_stack_data_callback_t)(uint16_t data_len, uint8_t* p_data); 38 39 /* NXP HAL functions */ 40 uint16_t phNxpUciHal_open(uwb_stack_callback_t* p_cback, 41 uwb_stack_data_callback_t* p_data_cback); 42 uint16_t phNxpUciHal_write(uint16_t data_len, const uint8_t* p_data); 43 uint16_t phNxpUciHal_close(); 44 uint16_t phNxpUciHal_coreInitialization(); 45 uint16_t phNxpUciHal_sessionInitialization(uint32_t sessionId); 46 47 #endif /* _PHNXPUCIHAL_ADAPTATION_H_ */ 48