BLE test

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
Wolfgang Betz
Date:
Wed Oct 07 08:39:04 2015 +0200
Revision:
132:51056160fa4a
Andrea's version as of mail from 10/06/2015 05:56 PM

From: Andrea PALMIERI <andrea.palmieri@st.com>
To: Wolfgang BETZ <wolfgang.betz@st.com>, Rohit Grover <rohit.grover@arm.com>,
Antonio VILEI <antonio.vilei@st.com>, Mihail Stoyanov
<Mihail.Stoyanov@arm.com>
CC: Nicola CAPOVILLA <nicola.capovilla@st.com>, Silvio Lucio OLIVA
<silvio.oliva@st.com>, "jonathan.austin@arm.com" <jonathan.austin@arm.com>
Content-Class: urn:content-classes:message
Date: Tue, 6 Oct 2015 17:56:34 +0200
Subject: RE: Arduino Compatibility of X-NUCLEO-IDB04A1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wolfgang Betz 132:51056160fa4a 1 /**
Wolfgang Betz 132:51056160fa4a 2 ******************************************************************************
Wolfgang Betz 132:51056160fa4a 3 * @file osal.c
Wolfgang Betz 132:51056160fa4a 4 * @author AMS - HEA&RF BU / CL
Wolfgang Betz 132:51056160fa4a 5 * @version V1.0.0
Wolfgang Betz 132:51056160fa4a 6 * @date 04-July-2014
Wolfgang Betz 132:51056160fa4a 7 * @brief Implementation of OS abstraction layer functions used by the
Wolfgang Betz 132:51056160fa4a 8 * library.
Wolfgang Betz 132:51056160fa4a 9 ******************************************************************************
Wolfgang Betz 132:51056160fa4a 10 * @attention
Wolfgang Betz 132:51056160fa4a 11 *
Wolfgang Betz 132:51056160fa4a 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Wolfgang Betz 132:51056160fa4a 13 *
Wolfgang Betz 132:51056160fa4a 14 * Redistribution and use in source and binary forms, with or without modification,
Wolfgang Betz 132:51056160fa4a 15 * are permitted provided that the following conditions are met:
Wolfgang Betz 132:51056160fa4a 16 * 1. Redistributions of source code must retain the above copyright notice,
Wolfgang Betz 132:51056160fa4a 17 * this list of conditions and the following disclaimer.
Wolfgang Betz 132:51056160fa4a 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Wolfgang Betz 132:51056160fa4a 19 * this list of conditions and the following disclaimer in the documentation
Wolfgang Betz 132:51056160fa4a 20 * and/or other materials provided with the distribution.
Wolfgang Betz 132:51056160fa4a 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Wolfgang Betz 132:51056160fa4a 22 * may be used to endorse or promote products derived from this software
Wolfgang Betz 132:51056160fa4a 23 * without specific prior written permission.
Wolfgang Betz 132:51056160fa4a 24 *
Wolfgang Betz 132:51056160fa4a 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Wolfgang Betz 132:51056160fa4a 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Wolfgang Betz 132:51056160fa4a 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Wolfgang Betz 132:51056160fa4a 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Wolfgang Betz 132:51056160fa4a 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Wolfgang Betz 132:51056160fa4a 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Wolfgang Betz 132:51056160fa4a 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Wolfgang Betz 132:51056160fa4a 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Wolfgang Betz 132:51056160fa4a 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Wolfgang Betz 132:51056160fa4a 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wolfgang Betz 132:51056160fa4a 35 *
Wolfgang Betz 132:51056160fa4a 36 ******************************************************************************
Wolfgang Betz 132:51056160fa4a 37 */
Wolfgang Betz 132:51056160fa4a 38
Wolfgang Betz 132:51056160fa4a 39 /* Includes ------------------------------------------------------------------*/
Wolfgang Betz 132:51056160fa4a 40 #include <string.h>
Wolfgang Betz 132:51056160fa4a 41 #include <osal.h>
Wolfgang Betz 132:51056160fa4a 42
Wolfgang Betz 132:51056160fa4a 43 /**
Wolfgang Betz 132:51056160fa4a 44 * @brief Osal_MemCpy
Wolfgang Betz 132:51056160fa4a 45 * @param dest: Pointer to the destination buffer
Wolfgang Betz 132:51056160fa4a 46 * @param src : Pointer to the source buffer
Wolfgang Betz 132:51056160fa4a 47 * @param size: Number of bytes to copy from the source to the destination
Wolfgang Betz 132:51056160fa4a 48 * buffer
Wolfgang Betz 132:51056160fa4a 49 * @retval Pointer to the destination buffer
Wolfgang Betz 132:51056160fa4a 50 */
Wolfgang Betz 132:51056160fa4a 51 void* Osal_MemCpy(void *dest, const void *src, unsigned int size)
Wolfgang Betz 132:51056160fa4a 52 {
Wolfgang Betz 132:51056160fa4a 53 return(memcpy(dest,src,size));
Wolfgang Betz 132:51056160fa4a 54 }
Wolfgang Betz 132:51056160fa4a 55
Wolfgang Betz 132:51056160fa4a 56 /**
Wolfgang Betz 132:51056160fa4a 57 * @brief Osal_MemSet
Wolfgang Betz 132:51056160fa4a 58 * @param ptr : Pointer to block of memory to fill
Wolfgang Betz 132:51056160fa4a 59 * @param value: Value to assign to each byte of the memory block
Wolfgang Betz 132:51056160fa4a 60 * @param size : Number of bytes to be set to "value"
Wolfgang Betz 132:51056160fa4a 61 * @retval Pointer to the filled block of memory
Wolfgang Betz 132:51056160fa4a 62 */
Wolfgang Betz 132:51056160fa4a 63 void* Osal_MemSet(void *ptr, int value, unsigned int size)
Wolfgang Betz 132:51056160fa4a 64 {
Wolfgang Betz 132:51056160fa4a 65 return(memset(ptr,value,size));
Wolfgang Betz 132:51056160fa4a 66 }
Wolfgang Betz 132:51056160fa4a 67
Wolfgang Betz 132:51056160fa4a 68 /******************************************************************************
Wolfgang Betz 132:51056160fa4a 69 * local Functions
Wolfgang Betz 132:51056160fa4a 70 *****************************************************************************/
Wolfgang Betz 132:51056160fa4a 71
Wolfgang Betz 132:51056160fa4a 72 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/