Caching the advertising data and the scan response.

Fork of MaximBLE by Maxim Integrated

Committer:
kgills
Date:
Tue Mar 22 18:16:10 2016 +0000
Revision:
1:4e764337d5c5
Parent:
0:b562096246b3
Caching the advertising data and scan response.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
enginerd 0:b562096246b3 1 /*************************************************************************************************/
enginerd 0:b562096246b3 2 /*!
enginerd 0:b562096246b3 3 * \file wsf_os_int.h
enginerd 0:b562096246b3 4 *
enginerd 0:b562096246b3 5 * \brief Software foundation OS platform-specific interface file.
enginerd 0:b562096246b3 6 *
enginerd 0:b562096246b3 7 * $Date: 2012-10-01 13:53:07 -0700 (Mon, 01 Oct 2012) $
enginerd 0:b562096246b3 8 * $Revision: 357 $
enginerd 0:b562096246b3 9 *
enginerd 0:b562096246b3 10 * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
enginerd 0:b562096246b3 11 *
enginerd 0:b562096246b3 12 * SPDX-License-Identifier: LicenseRef-PBL
enginerd 0:b562096246b3 13 *
enginerd 0:b562096246b3 14 * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use
enginerd 0:b562096246b3 15 * this file except in compliance with the License. You may obtain a copy of the License at
enginerd 0:b562096246b3 16 *
enginerd 0:b562096246b3 17 * https://www.mbed.com/licenses/PBL-1.0
enginerd 0:b562096246b3 18 *
enginerd 0:b562096246b3 19 * See the License for the specific language governing permissions and limitations under the License.
enginerd 0:b562096246b3 20 */
enginerd 0:b562096246b3 21 /*************************************************************************************************/
enginerd 0:b562096246b3 22 #ifndef WSF_OS_INT_H
enginerd 0:b562096246b3 23 #define WSF_OS_INT_H
enginerd 0:b562096246b3 24
enginerd 0:b562096246b3 25 #ifdef __cplusplus
enginerd 0:b562096246b3 26 extern "C" {
enginerd 0:b562096246b3 27 #endif
enginerd 0:b562096246b3 28
enginerd 0:b562096246b3 29 /**************************************************************************************************
enginerd 0:b562096246b3 30 Macros
enginerd 0:b562096246b3 31 **************************************************************************************************/
enginerd 0:b562096246b3 32
enginerd 0:b562096246b3 33 /* Task events */
enginerd 0:b562096246b3 34 #define WSF_MSG_QUEUE_EVENT 0x01 /* Message queued for event handler */
enginerd 0:b562096246b3 35 #define WSF_TIMER_EVENT 0x02 /* Timer expired for event handler */
enginerd 0:b562096246b3 36 #define WSF_HANDLER_EVENT 0x04 /* Event set for event handler */
enginerd 0:b562096246b3 37
enginerd 0:b562096246b3 38 /* Derive task from handler ID */
enginerd 0:b562096246b3 39 #define WSF_TASK_FROM_ID(handlerID) (((handlerID) >> 4) & 0x0F)
enginerd 0:b562096246b3 40
enginerd 0:b562096246b3 41 /* Derive handler from handler ID */
enginerd 0:b562096246b3 42 #define WSF_HANDLER_FROM_ID(handlerID) ((handlerID) & 0x0F)
enginerd 0:b562096246b3 43
enginerd 0:b562096246b3 44 /**************************************************************************************************
enginerd 0:b562096246b3 45 Data Types
enginerd 0:b562096246b3 46 **************************************************************************************************/
enginerd 0:b562096246b3 47
enginerd 0:b562096246b3 48 /* Event handler ID data type */
enginerd 0:b562096246b3 49 typedef uint8_t wsfHandlerId_t;
enginerd 0:b562096246b3 50
enginerd 0:b562096246b3 51 /* Event handler event mask data type */
enginerd 0:b562096246b3 52 typedef uint8_t wsfEventMask_t;
enginerd 0:b562096246b3 53
enginerd 0:b562096246b3 54 /* Task ID data type */
enginerd 0:b562096246b3 55 typedef wsfHandlerId_t wsfTaskId_t;
enginerd 0:b562096246b3 56
enginerd 0:b562096246b3 57 /* Task event mask data type */
enginerd 0:b562096246b3 58 typedef uint8_t wsfTaskEvent_t;
enginerd 0:b562096246b3 59
enginerd 0:b562096246b3 60 /**************************************************************************************************
enginerd 0:b562096246b3 61 Function Declarations
enginerd 0:b562096246b3 62 **************************************************************************************************/
enginerd 0:b562096246b3 63
enginerd 0:b562096246b3 64 /*************************************************************************************************/
enginerd 0:b562096246b3 65 /*!
enginerd 0:b562096246b3 66 * \fn wsfOsReadyToSleep
enginerd 0:b562096246b3 67 *
enginerd 0:b562096246b3 68 * \brief Check if WSF is ready to sleep.
enginerd 0:b562096246b3 69 *
enginerd 0:b562096246b3 70 * \param None.
enginerd 0:b562096246b3 71 *
enginerd 0:b562096246b3 72 * \return Return TRUE if there are no pending WSF task events set, FALSE otherwise.
enginerd 0:b562096246b3 73 */
enginerd 0:b562096246b3 74 /*************************************************************************************************/
enginerd 0:b562096246b3 75 bool_t wsfOsReadyToSleep(void);
enginerd 0:b562096246b3 76
enginerd 0:b562096246b3 77 /*************************************************************************************************/
enginerd 0:b562096246b3 78 /*!
enginerd 0:b562096246b3 79 * \fn wsfOsDispatcher
enginerd 0:b562096246b3 80 *
enginerd 0:b562096246b3 81 * \brief Event dispatched. Designed to be called repeatedly from infinite loop.
enginerd 0:b562096246b3 82 *
enginerd 0:b562096246b3 83 * \param None.
enginerd 0:b562096246b3 84 *
enginerd 0:b562096246b3 85 * \return None.
enginerd 0:b562096246b3 86 */
enginerd 0:b562096246b3 87 /*************************************************************************************************/
enginerd 0:b562096246b3 88 void wsfOsDispatcher(void);
enginerd 0:b562096246b3 89
enginerd 0:b562096246b3 90 /*************************************************************************************************/
enginerd 0:b562096246b3 91 /*!
enginerd 0:b562096246b3 92 * \fn WsfOsShutdown
enginerd 0:b562096246b3 93 *
enginerd 0:b562096246b3 94 * \brief Shutdown OS.
enginerd 0:b562096246b3 95 *
enginerd 0:b562096246b3 96 * \return None.
enginerd 0:b562096246b3 97 */
enginerd 0:b562096246b3 98 /*************************************************************************************************/
enginerd 0:b562096246b3 99 void WsfOsShutdown(void);
enginerd 0:b562096246b3 100
enginerd 0:b562096246b3 101 #ifdef __cplusplus
enginerd 0:b562096246b3 102 };
enginerd 0:b562096246b3 103 #endif
enginerd 0:b562096246b3 104
enginerd 0:b562096246b3 105 #endif /* WSF_OS_INT_H */