mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Child:
128:9bcdf88f62b0
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /*************************************************************************************************/
Kojto 122:f9eeca106725 2 /*!
Kojto 122:f9eeca106725 3 * \file wsf_os.h
Kojto 122:f9eeca106725 4 *
Kojto 122:f9eeca106725 5 * \brief Software foundation OS API.
Kojto 122:f9eeca106725 6 *
Kojto 122:f9eeca106725 7 * $Date: 2014-08-08 09:30:50 -0400 (Fri, 08 Aug 2014) $
Kojto 122:f9eeca106725 8 * $Revision: 1725 $
Kojto 122:f9eeca106725 9 *
Kojto 122:f9eeca106725 10 * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
Kojto 122:f9eeca106725 11 * SPDX-License-Identifier: LicenseRef-PBL
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * This file and the related binary are licensed under the
Kojto 122:f9eeca106725 14 * Permissive Binary License, Version 1.0 (the "License");
Kojto 122:f9eeca106725 15 * you may not use these files except in compliance with the License.
Kojto 122:f9eeca106725 16 *
Kojto 122:f9eeca106725 17 * You may obtain a copy of the License here:
Kojto 122:f9eeca106725 18 * LICENSE-permissive-binary-license-1.0.txt and at
Kojto 122:f9eeca106725 19 * https://www.mbed.com/licenses/PBL-1.0
Kojto 122:f9eeca106725 20 *
Kojto 122:f9eeca106725 21 * See the License for the specific language governing permissions and
Kojto 122:f9eeca106725 22 * limitations under the License.
Kojto 122:f9eeca106725 23 */
Kojto 122:f9eeca106725 24 /*************************************************************************************************/
Kojto 122:f9eeca106725 25 #ifndef WSF_OS_H
Kojto 122:f9eeca106725 26 #define WSF_OS_H
Kojto 122:f9eeca106725 27
Kojto 122:f9eeca106725 28 #include "wsf_os_int.h"
Kojto 122:f9eeca106725 29 #include "wsf_queue.h"
Kojto 122:f9eeca106725 30
Kojto 122:f9eeca106725 31 #ifdef __cplusplus
Kojto 122:f9eeca106725 32 extern "C" {
Kojto 122:f9eeca106725 33 #endif
Kojto 122:f9eeca106725 34
Kojto 122:f9eeca106725 35 /**************************************************************************************************
Kojto 122:f9eeca106725 36 Data Types
Kojto 122:f9eeca106725 37 **************************************************************************************************/
Kojto 122:f9eeca106725 38
Kojto 122:f9eeca106725 39 /*! Common message structure passed to event handler */
Kojto 122:f9eeca106725 40 typedef struct
Kojto 122:f9eeca106725 41 {
Kojto 122:f9eeca106725 42 uint16_t param; /*! General purpose parameter passed to event handler */
Kojto 122:f9eeca106725 43 uint8_t event; /*! General purpose event value passed to event handler */
Kojto 122:f9eeca106725 44 uint8_t status; /*! General purpose status value passed to event handler */
Kojto 122:f9eeca106725 45 } wsfMsgHdr_t;
Kojto 122:f9eeca106725 46
Kojto 122:f9eeca106725 47 /**************************************************************************************************
Kojto 122:f9eeca106725 48 Callback Function Types
Kojto 122:f9eeca106725 49 **************************************************************************************************/
Kojto 122:f9eeca106725 50
Kojto 122:f9eeca106725 51 /*************************************************************************************************/
Kojto 122:f9eeca106725 52 /*!
Kojto 122:f9eeca106725 53 * \fn wsfEventHandler_t
Kojto 122:f9eeca106725 54 *
Kojto 122:f9eeca106725 55 * \brief Event handler callback function.
Kojto 122:f9eeca106725 56 *
Kojto 122:f9eeca106725 57 * \param event Mask of events set for the event handler.
Kojto 122:f9eeca106725 58 * \param pMsg Pointer to message for the event handler.
Kojto 122:f9eeca106725 59 *
Kojto 122:f9eeca106725 60 * \return None.
Kojto 122:f9eeca106725 61 */
Kojto 122:f9eeca106725 62 /*************************************************************************************************/
Kojto 122:f9eeca106725 63 typedef void (*wsfEventHandler_t)(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
Kojto 122:f9eeca106725 64
Kojto 122:f9eeca106725 65 /**************************************************************************************************
Kojto 122:f9eeca106725 66 Function Declarations
Kojto 122:f9eeca106725 67 **************************************************************************************************/
Kojto 122:f9eeca106725 68
Kojto 122:f9eeca106725 69 /*************************************************************************************************/
Kojto 122:f9eeca106725 70 /*!
Kojto 122:f9eeca106725 71 * \fn WsfSetEvent
Kojto 122:f9eeca106725 72 *
Kojto 122:f9eeca106725 73 * \brief Set an event for an event handler.
Kojto 122:f9eeca106725 74 *
Kojto 122:f9eeca106725 75 * \param handlerId Handler ID.
Kojto 122:f9eeca106725 76 * \param event Event or events to set.
Kojto 122:f9eeca106725 77 *
Kojto 122:f9eeca106725 78 * \return None.
Kojto 122:f9eeca106725 79 */
Kojto 122:f9eeca106725 80 /*************************************************************************************************/
Kojto 122:f9eeca106725 81 void WsfSetEvent(wsfHandlerId_t handlerId, wsfEventMask_t event);
Kojto 122:f9eeca106725 82
Kojto 122:f9eeca106725 83 /*************************************************************************************************/
Kojto 122:f9eeca106725 84 /*!
Kojto 122:f9eeca106725 85 * \fn WsfTaskLock
Kojto 122:f9eeca106725 86 *
Kojto 122:f9eeca106725 87 * \brief Lock task scheduling.
Kojto 122:f9eeca106725 88 *
Kojto 122:f9eeca106725 89 * \return None.
Kojto 122:f9eeca106725 90 */
Kojto 122:f9eeca106725 91 /*************************************************************************************************/
Kojto 122:f9eeca106725 92 void WsfTaskLock(void);
Kojto 122:f9eeca106725 93
Kojto 122:f9eeca106725 94 /*************************************************************************************************/
Kojto 122:f9eeca106725 95 /*!
Kojto 122:f9eeca106725 96 * \fn WsfTaskUnlock
Kojto 122:f9eeca106725 97 *
Kojto 122:f9eeca106725 98 * \brief Unlock task scheduling.
Kojto 122:f9eeca106725 99 *
Kojto 122:f9eeca106725 100 * \return None.
Kojto 122:f9eeca106725 101 */
Kojto 122:f9eeca106725 102 /*************************************************************************************************/
Kojto 122:f9eeca106725 103 void WsfTaskUnlock(void);
Kojto 122:f9eeca106725 104
Kojto 122:f9eeca106725 105 /*************************************************************************************************/
Kojto 122:f9eeca106725 106 /*!
Kojto 122:f9eeca106725 107 * \fn WsfTaskSetReady
Kojto 122:f9eeca106725 108 *
Kojto 122:f9eeca106725 109 * \brief Set the task used by the given handler as ready to run.
Kojto 122:f9eeca106725 110 *
Kojto 122:f9eeca106725 111 * \param handlerId Event handler ID.
Kojto 122:f9eeca106725 112 * \param event Task event mask.
Kojto 122:f9eeca106725 113 *
Kojto 122:f9eeca106725 114 * \return None.
Kojto 122:f9eeca106725 115 */
Kojto 122:f9eeca106725 116 /*************************************************************************************************/
Kojto 122:f9eeca106725 117 void WsfTaskSetReady(wsfHandlerId_t handlerId, wsfTaskEvent_t event);
Kojto 122:f9eeca106725 118
Kojto 122:f9eeca106725 119 /*************************************************************************************************/
Kojto 122:f9eeca106725 120 /*!
Kojto 122:f9eeca106725 121 * \fn WsfTaskMsgQueue
Kojto 122:f9eeca106725 122 *
Kojto 122:f9eeca106725 123 * \brief Return the task message queue used by the given handler.
Kojto 122:f9eeca106725 124 *
Kojto 122:f9eeca106725 125 * \param handlerId Event handler ID.
Kojto 122:f9eeca106725 126 *
Kojto 122:f9eeca106725 127 * \return Task message queue.
Kojto 122:f9eeca106725 128 */
Kojto 122:f9eeca106725 129 /*************************************************************************************************/
Kojto 122:f9eeca106725 130 wsfQueue_t *WsfTaskMsgQueue(wsfHandlerId_t handlerId);
Kojto 122:f9eeca106725 131
Kojto 122:f9eeca106725 132 /*************************************************************************************************/
Kojto 122:f9eeca106725 133 /*!
Kojto 122:f9eeca106725 134 * \fn WsfOsSetNextHandler
Kojto 122:f9eeca106725 135 *
Kojto 122:f9eeca106725 136 * \brief Set the next WSF handler function in the WSF OS handler array. This function
Kojto 122:f9eeca106725 137 * should only be called as part of the OS initialization procedure.
Kojto 122:f9eeca106725 138 *
Kojto 122:f9eeca106725 139 * \param handler WSF handler function.
Kojto 122:f9eeca106725 140 *
Kojto 122:f9eeca106725 141 * \return WSF handler ID for this handler.
Kojto 122:f9eeca106725 142 */
Kojto 122:f9eeca106725 143 /*************************************************************************************************/
Kojto 122:f9eeca106725 144 wsfHandlerId_t WsfOsSetNextHandler(wsfEventHandler_t handler);
Kojto 122:f9eeca106725 145
Kojto 122:f9eeca106725 146 #ifdef __cplusplus
Kojto 122:f9eeca106725 147 };
Kojto 122:f9eeca106725 148 #endif
Kojto 122:f9eeca106725 149
Kojto 122:f9eeca106725 150 #endif /* WSF_OS_H */