Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lypinator 0:bb348c97df44 1 /*---------------------------------------------------------------------------
lypinator 0:bb348c97df44 2 * Copyright (c) 2016, u-blox Malmö, All Rights Reserved
lypinator 0:bb348c97df44 3 * SPDX-License-Identifier: LicenseRef-PBL
lypinator 0:bb348c97df44 4 *
lypinator 0:bb348c97df44 5 * This file and the related binary are licensed under the
lypinator 0:bb348c97df44 6 * Permissive Binary License, Version 1.0 (the "License");
lypinator 0:bb348c97df44 7 * you may not use these files except in compliance with the License.
lypinator 0:bb348c97df44 8 *
lypinator 0:bb348c97df44 9 * You may obtain a copy of the License here:
lypinator 0:bb348c97df44 10 * LICENSE-permissive-binary-license-1.0.txt and at
lypinator 0:bb348c97df44 11 * https://www.mbed.com/licenses/PBL-1.0
lypinator 0:bb348c97df44 12 *
lypinator 0:bb348c97df44 13 * See the License for the specific language governing permissions and
lypinator 0:bb348c97df44 14 * limitations under the License.
lypinator 0:bb348c97df44 15 *
lypinator 0:bb348c97df44 16 * Component : Bluetooth utility
lypinator 0:bb348c97df44 17 * File : cb_bt_utils.h
lypinator 0:bb348c97df44 18 *
lypinator 0:bb348c97df44 19 * Description :
lypinator 0:bb348c97df44 20 *-------------------------------------------------------------------------*/
lypinator 0:bb348c97df44 21
lypinator 0:bb348c97df44 22 #ifndef _CB_BT_UTILS_H_
lypinator 0:bb348c97df44 23 #define _CB_BT_UTILS_H_
lypinator 0:bb348c97df44 24
lypinator 0:bb348c97df44 25 #include "cb_comdefs.h"
lypinator 0:bb348c97df44 26 #include "bt_types.h"
lypinator 0:bb348c97df44 27
lypinator 0:bb348c97df44 28 #ifdef __cplusplus
lypinator 0:bb348c97df44 29 extern "C" {
lypinator 0:bb348c97df44 30 #endif
lypinator 0:bb348c97df44 31
lypinator 0:bb348c97df44 32 /*===========================================================================
lypinator 0:bb348c97df44 33 * FUNCTIONS
lypinator 0:bb348c97df44 34 *=========================================================================
lypinator 0:bb348c97df44 35 */
lypinator 0:bb348c97df44 36
lypinator 0:bb348c97df44 37 /**
lypinator 0:bb348c97df44 38 * Compare two Bluetooth addresses
lypinator 0:bb348c97df44 39 *
lypinator 0:bb348c97df44 40 * @param addr1 Pointer to first address to compare
lypinator 0:bb348c97df44 41 * @param addr2 Pointer to second address to compare
lypinator 0:bb348c97df44 42 * @returns TRUE if equal otherwise FALSE
lypinator 0:bb348c97df44 43 */
lypinator 0:bb348c97df44 44 extern cb_boolean cbBT_UTILS_cmpBdAddr(
lypinator 0:bb348c97df44 45 TBdAddr* addr1,
lypinator 0:bb348c97df44 46 TBdAddr* addr2);
lypinator 0:bb348c97df44 47
lypinator 0:bb348c97df44 48 /**
lypinator 0:bb348c97df44 49 * Check if address in invalid i.e. {{0,0,0,0,0,0},BT_PUBLIC_ADDRESS}
lypinator 0:bb348c97df44 50 *
lypinator 0:bb348c97df44 51 * @param addr Pointer to address to check
lypinator 0:bb348c97df44 52 * @returns TRUE if invalid otherwise FALSE
lypinator 0:bb348c97df44 53 */
lypinator 0:bb348c97df44 54 extern cb_boolean cbBT_UTILS_isInvalidBdAddr(
lypinator 0:bb348c97df44 55 TBdAddr* addr);
lypinator 0:bb348c97df44 56
lypinator 0:bb348c97df44 57 /**
lypinator 0:bb348c97df44 58 * Set invalid address i.e. {{0,0,0,0,0,0},BT_PUBLIC_ADDRESS}
lypinator 0:bb348c97df44 59 *
lypinator 0:bb348c97df44 60 * @param addr Pointer where to put the address
lypinator 0:bb348c97df44 61 */
lypinator 0:bb348c97df44 62 extern void cbBT_UTILS_setInvalidBdAddr(
lypinator 0:bb348c97df44 63 TBdAddr* addr);
lypinator 0:bb348c97df44 64
lypinator 0:bb348c97df44 65 /**
lypinator 0:bb348c97df44 66 * Get invalid address
lypinator 0:bb348c97df44 67 *
lypinator 0:bb348c97df44 68 * @returns Pointer to the invalid address
lypinator 0:bb348c97df44 69 */
lypinator 0:bb348c97df44 70 extern const TBdAddr* cbBT_UTILS_getInvalidBdAddr(void);
lypinator 0:bb348c97df44 71
lypinator 0:bb348c97df44 72 /**
lypinator 0:bb348c97df44 73 * Copy Bluetooth address
lypinator 0:bb348c97df44 74 *
lypinator 0:bb348c97df44 75 * @param dest Pointer to destination address
lypinator 0:bb348c97df44 76 * @param src Pointer to source address
lypinator 0:bb348c97df44 77 */
lypinator 0:bb348c97df44 78 extern void cbBT_UTILS_cpyBdAddr(
lypinator 0:bb348c97df44 79 TBdAddr* dest,
lypinator 0:bb348c97df44 80 TBdAddr* src);
lypinator 0:bb348c97df44 81
lypinator 0:bb348c97df44 82 #ifdef __cplusplus
lypinator 0:bb348c97df44 83 }
lypinator 0:bb348c97df44 84 #endif
lypinator 0:bb348c97df44 85
lypinator 0:bb348c97df44 86 #endif /* _CB_BT_UTILS_H_ */