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