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
bda.h
00001 /*************************************************************************************************/ 00002 /*! 00003 * \file bda.h 00004 * 00005 * \brief Bluetooth device address utilities. 00006 * 00007 * $Date: 2012-05-08 10:58:07 -0700 (Tue, 08 May 2012) $ 00008 * $Revision: 316 $ 00009 * 00010 * Copyright (c) 2009-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 BDA_H 00023 #define BDA_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 /************************************************************************************************** 00030 Macros 00031 **************************************************************************************************/ 00032 00033 /*! BD address length */ 00034 #define BDA_ADDR_LEN 6 00035 00036 /*! BD address string length */ 00037 #define BDA_ADDR_STR_LEN (BDA_ADDR_LEN * 2) 00038 00039 /************************************************************************************************** 00040 Data Types 00041 **************************************************************************************************/ 00042 00043 /*! BD address data type */ 00044 typedef uint8_t bdAddr_t [BDA_ADDR_LEN]; 00045 00046 /************************************************************************************************** 00047 Function Declarations 00048 **************************************************************************************************/ 00049 00050 /*************************************************************************************************/ 00051 /*! 00052 * \fn BdaCpy 00053 * 00054 * \brief Copy a BD address from source to destination. 00055 * 00056 * \param pDst Pointer to destination. 00057 * \param pSrc Pointer to source. 00058 * 00059 * \return None. 00060 */ 00061 /*************************************************************************************************/ 00062 void BdaCpy(uint8_t *pDst, uint8_t *pSrc); 00063 00064 00065 /*************************************************************************************************/ 00066 /*! 00067 * \fn BdaCmp 00068 * 00069 * \brief Compare two BD addresses. 00070 * 00071 * \param pAddr1 First address. 00072 * \param pAddr2 Second address. 00073 * 00074 * \return TRUE if addresses match, FALSE otherwise. 00075 */ 00076 /*************************************************************************************************/ 00077 bool_t BdaCmp(uint8_t *pAddr1, uint8_t *pAddr2); 00078 00079 /*************************************************************************************************/ 00080 /*! 00081 * \fn BdaClr 00082 * 00083 * \brief Set a BD address to all zeros. 00084 * 00085 * \param pDst Pointer to destination. 00086 * 00087 * \return pDst + BDA_ADDR_LEN 00088 */ 00089 /*************************************************************************************************/ 00090 uint8_t *BdaClr(uint8_t *pDst); 00091 00092 /*************************************************************************************************/ 00093 /*! 00094 * \fn Bda2Str 00095 * 00096 * \brief Convert a BD address to a string. 00097 * 00098 * \param pAddr Pointer to BD address. 00099 * 00100 * \return Pointer to string. 00101 */ 00102 /*************************************************************************************************/ 00103 char *Bda2Str(uint8_t *pAddr); 00104 00105 #ifdef __cplusplus 00106 }; 00107 #endif 00108 00109 #endif /* BDA_H */
Generated on Tue Jul 12 2022 19:59:22 by
1.7.2