/*************************************************************************************************/ /*! * \file * * \brief HCI driver interface. * * Copyright (c) 2012-2018 Arm Ltd. * * Copyright (c) 2019 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. */ /*************************************************************************************************/ #ifndef HCI_DRV_H #define HCI_DRV_H #ifdef __cplusplus extern "C" { #endif /************************************************************************************************** Function Declarations **************************************************************************************************/ /*************************************************************************************************/ /*! * \brief Write data the driver. * * \param type HCI packet type * \param len Number of bytes to write. * \param pData Byte array to write. * * \return Return actual number of data bytes written. * * \note The type parameter allows the driver layer to prepend the data with a header on the * same write transaction. */ /*************************************************************************************************/ uint16_t hciDrvWrite(uint8_t type, uint16_t len, uint8_t *pData); /*************************************************************************************************/ /*! * \brief Read data bytes from the driver. * * \param len Number of bytes to read. * \param pData Byte array to store data. * * \return Return actual number of data bytes read. */ /*************************************************************************************************/ uint16_t hciDrvRead(uint16_t len, uint8_t *pData); /*************************************************************************************************/ /*! * \brief Returns TRUE if driver allows MCU to enter low power sleep mode. * * \return TRUE if ready to sleep, FALSE otherwise. */ /*************************************************************************************************/ bool_t hciDrvReadyToSleep(void); #ifdef __cplusplus }; #endif #endif /* HCI_DRV_H */