BLE_API wrapper library for STMicroelectronics' BlueNRG Bluetooth Low Energy expansion board shield (Component)
Dependents: Nucleo_Zumo_BLE_IDB04A1 contest_IOT5 contest_IOT6 contest_IOT_10 ... more
Fork of X_NUCLEO_IDB0XA1 by
ble_osal.c
00001 /** 00002 ****************************************************************************** 00003 * @file ble_osal.c 00004 * @author AMS - HEA&RF BU / CL 00005 * @version V1.0.0 00006 * @date 04-July-2014 00007 * @brief Implementation of OS abstraction layer functions used by the 00008 * library. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> 00013 * 00014 * Redistribution and use in source and binary forms, with or without modification, 00015 * are permitted provided that the following conditions are met: 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright notice, 00019 * this list of conditions and the following disclaimer in the documentation 00020 * and/or other materials provided with the distribution. 00021 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00026 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00028 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00031 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00033 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00034 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************** 00037 */ 00038 00039 /* Includes ------------------------------------------------------------------*/ 00040 #include <string.h> 00041 #include <ble_osal.h> 00042 00043 /** 00044 * @brief Osal_MemCpy 00045 * @param dest: Pointer to the destination buffer 00046 * @param src : Pointer to the source buffer 00047 * @param size: Number of bytes to copy from the source to the destination 00048 * buffer 00049 * @retval Pointer to the destination buffer 00050 */ 00051 void* Osal_MemCpy(void *dest, const void *src, unsigned int size) 00052 { 00053 return(memcpy(dest,src,size)); 00054 } 00055 00056 /** 00057 * @brief Osal_MemSet 00058 * @param ptr : Pointer to block of memory to fill 00059 * @param value: Value to assign to each byte of the memory block 00060 * @param size : Number of bytes to be set to "value" 00061 * @retval Pointer to the filled block of memory 00062 */ 00063 void* Osal_MemSet(void *ptr, int value, unsigned int size) 00064 { 00065 return(memset(ptr,value,size)); 00066 } 00067 00068 /****************************************************************************** 00069 * local Functions 00070 *****************************************************************************/ 00071 00072 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 18:15:59 by 1.7.2