BLE UART example
Fork of Nucleo_BLE_BlueNRG by
platform/inc/osal.h@3:104f1bba39ca, 2016-01-03 (annotated)
- Committer:
- sjallouli
- Date:
- Sun Jan 03 16:05:38 2016 +0000
- Revision:
- 3:104f1bba39ca
- Parent:
- 0:a948f5f3904c
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sjallouli | 0:a948f5f3904c | 1 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
sjallouli | 0:a948f5f3904c | 2 | * File Name : osal.h |
sjallouli | 0:a948f5f3904c | 3 | * Author : AMS - HEA&RF BU |
sjallouli | 0:a948f5f3904c | 4 | * Version : V1.0.0 |
sjallouli | 0:a948f5f3904c | 5 | * Date : 19-July-2012 |
sjallouli | 0:a948f5f3904c | 6 | * Description : This header file defines the OS abstraction layer used by |
sjallouli | 0:a948f5f3904c | 7 | * the BLE stack. OSAL defines the set of functions |
sjallouli | 0:a948f5f3904c | 8 | * which needs to be ported to target operating system and |
sjallouli | 0:a948f5f3904c | 9 | * target platform. |
sjallouli | 0:a948f5f3904c | 10 | ******************************************************************************** |
sjallouli | 0:a948f5f3904c | 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
sjallouli | 0:a948f5f3904c | 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
sjallouli | 0:a948f5f3904c | 13 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
sjallouli | 0:a948f5f3904c | 14 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
sjallouli | 0:a948f5f3904c | 15 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
sjallouli | 0:a948f5f3904c | 16 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
sjallouli | 0:a948f5f3904c | 17 | *******************************************************************************/ |
sjallouli | 0:a948f5f3904c | 18 | |
sjallouli | 0:a948f5f3904c | 19 | #ifndef __OSAL_H__ |
sjallouli | 0:a948f5f3904c | 20 | #define __OSAL_H__ |
sjallouli | 0:a948f5f3904c | 21 | |
sjallouli | 0:a948f5f3904c | 22 | /****************************************************************************** |
sjallouli | 0:a948f5f3904c | 23 | * Includes |
sjallouli | 0:a948f5f3904c | 24 | *****************************************************************************/ |
sjallouli | 0:a948f5f3904c | 25 | #include <hal_types.h> |
sjallouli | 0:a948f5f3904c | 26 | #ifdef __ICCARM__ |
sjallouli | 0:a948f5f3904c | 27 | #include <intrinsics.h> |
sjallouli | 0:a948f5f3904c | 28 | #endif |
sjallouli | 0:a948f5f3904c | 29 | |
sjallouli | 0:a948f5f3904c | 30 | /****************************************************************************** |
sjallouli | 0:a948f5f3904c | 31 | * Macros |
sjallouli | 0:a948f5f3904c | 32 | *****************************************************************************/ |
sjallouli | 0:a948f5f3904c | 33 | |
sjallouli | 0:a948f5f3904c | 34 | |
sjallouli | 0:a948f5f3904c | 35 | /****************************************************************************** |
sjallouli | 0:a948f5f3904c | 36 | * Function Prototypes |
sjallouli | 0:a948f5f3904c | 37 | *****************************************************************************/ |
sjallouli | 0:a948f5f3904c | 38 | |
sjallouli | 0:a948f5f3904c | 39 | /** |
sjallouli | 0:a948f5f3904c | 40 | * This function copies size number of bytes from a |
sjallouli | 0:a948f5f3904c | 41 | * memory location pointed by src to a destination |
sjallouli | 0:a948f5f3904c | 42 | * memory location pointed by dest |
sjallouli | 0:a948f5f3904c | 43 | * |
sjallouli | 0:a948f5f3904c | 44 | * @param[in] dest Destination address |
sjallouli | 0:a948f5f3904c | 45 | * @param[in] src Source address |
sjallouli | 0:a948f5f3904c | 46 | * @param[in] size size in the bytes |
sjallouli | 0:a948f5f3904c | 47 | * |
sjallouli | 0:a948f5f3904c | 48 | * @return Address of the destination |
sjallouli | 0:a948f5f3904c | 49 | */ |
sjallouli | 0:a948f5f3904c | 50 | |
sjallouli | 0:a948f5f3904c | 51 | extern void* Osal_MemCpy(void *dest,const void *src,tHalUint size); |
sjallouli | 0:a948f5f3904c | 52 | |
sjallouli | 0:a948f5f3904c | 53 | |
sjallouli | 0:a948f5f3904c | 54 | /** |
sjallouli | 0:a948f5f3904c | 55 | * This function sets first number of bytes, specified |
sjallouli | 0:a948f5f3904c | 56 | * by size, to the destination memory pointed by ptr |
sjallouli | 0:a948f5f3904c | 57 | * to the specified value |
sjallouli | 0:a948f5f3904c | 58 | * |
sjallouli | 0:a948f5f3904c | 59 | * @param[in] ptr Destination address |
sjallouli | 0:a948f5f3904c | 60 | * @param[in] value Value to be set |
sjallouli | 0:a948f5f3904c | 61 | * @param[in] size Size in the bytes |
sjallouli | 0:a948f5f3904c | 62 | * |
sjallouli | 0:a948f5f3904c | 63 | * @return Address of the destination |
sjallouli | 0:a948f5f3904c | 64 | */ |
sjallouli | 0:a948f5f3904c | 65 | |
sjallouli | 0:a948f5f3904c | 66 | extern void* Osal_MemSet(void *ptr, tHalInt value,tHalUint size); |
sjallouli | 0:a948f5f3904c | 67 | |
sjallouli | 0:a948f5f3904c | 68 | |
sjallouli | 0:a948f5f3904c | 69 | #endif /* __OSAL_H__ */ |
sjallouli | 0:a948f5f3904c | 70 | |
sjallouli | 0:a948f5f3904c | 71 |