Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BLE_Thermometer MAXWSNENV_demo
hci_drv.h
00001 /*************************************************************************************************/ 00002 /*! 00003 * \file hci_drv.h 00004 * 00005 * \brief HCI driver interface. 00006 * 00007 * $Date: 2013-01-02 22:19:17 -0800 (Wed, 02 Jan 2013) $ 00008 * $Revision: 405 $ 00009 * 00010 * Copyright (c) 2012-2016 ARM Limited. All rights reserved. 00011 * 00012 * SPDX-License-Identifier: LicenseRef-PBL 00013 * 00014 * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use 00015 * this file except in compliance with the License. You may obtain a copy of the License at 00016 * 00017 * https://www.mbed.com/licenses/PBL-1.0 00018 * 00019 * See the License for the specific language governing permissions and limitations under the License. 00020 */ 00021 /*************************************************************************************************/ 00022 #ifndef HCI_DRV_H 00023 #define HCI_DRV_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 #include "PinNames.h" 00030 00031 /************************************************************************************************** 00032 Function Declarations 00033 **************************************************************************************************/ 00034 00035 /*************************************************************************************************/ 00036 /*! 00037 * \fn hciDrvInit 00038 * 00039 * \brief Initialize the driver. 00040 * 00041 * \param csn name of the pin connected to CSN 00042 * \param irq name of the pin conntected to IRQ 00043 */ 00044 /*************************************************************************************************/ 00045 void hciDrvInit(PinName csn, PinName rst, PinName irq); 00046 00047 /*************************************************************************************************/ 00048 /*! 00049 * \fn hciDrvWrite 00050 * 00051 * \brief Write data to the driver. 00052 * 00053 * \param type HCI packet type 00054 * \param len Number of bytes to write. 00055 * \param pData Byte array to write. 00056 * 00057 * \return Return actual number of data bytes written. 00058 * 00059 * \note The type parameter allows the driver layer to prepend the data with a header on the 00060 * same write transaction. 00061 */ 00062 /*************************************************************************************************/ 00063 uint16_t hciDrvWrite(uint8_t type, uint16_t len, uint8_t *pData); 00064 00065 /*************************************************************************************************/ 00066 /*! 00067 * \fn hciDrvRead 00068 * 00069 * \brief Read data bytes from the driver. 00070 * 00071 * \param len Number of bytes to read. 00072 * \param pData Byte array to store data. 00073 * 00074 * \return Return actual number of data bytes read. 00075 */ 00076 /*************************************************************************************************/ 00077 uint16_t hciDrvRead(uint16_t len, uint8_t *pData, bool_t last); 00078 00079 /*************************************************************************************************/ 00080 /*! 00081 * \fn hciDrvIsr 00082 * 00083 * \brief Interrupt service routine for IRQ 00084 */ 00085 /*************************************************************************************************/ 00086 void hciDrvIsr(void); 00087 00088 /*************************************************************************************************/ 00089 /*! 00090 * \fn hciDrvReadyToSleep 00091 * 00092 * \brief Returns TRUE if driver allows MCU to enter low power sleep mode. 00093 * 00094 * \return TRUE if ready to sleep, FALSE otherwise. 00095 */ 00096 /*************************************************************************************************/ 00097 bool_t hciDrvReadyToSleep(void); 00098 00099 void hciDrvResume(void); 00100 00101 /*************************************************************************************************/ 00102 /*! 00103 * \fn hciDrvReset 00104 * 00105 * \brief Resets the controller 00106 */ 00107 /*************************************************************************************************/ 00108 void hciDrvReset(void); 00109 00110 #ifdef __cplusplus 00111 }; 00112 #endif 00113 00114 #endif /* HCI_DRV_H */
Generated on Tue Jul 12 2022 19:59:22 by
1.7.2