Wouter van Kleunen / X_NUCLEO_IDB0XA1

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
Wolfgang Betz
Date:
Tue Oct 06 14:25:08 2015 +0200
Revision:
130:770ce14d3d15
Include mbed-classic version

Derived from
- repo (on Codex): gitolite@codex.cro.st.com:x-nucleodev/X-NUCLEO-IKC01A1-MBED.git
- branch: ble_wb
- SHA1 ID: 5ccc73e35868169e42132c0d1c056f908a6d70c0

Who changed what in which revision?

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