Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Mecatro_Gyro_Programme_Codeur_HC06
rtos/rtos.h@0:a8ed743bc1e1, 2021-04-16 (annotated)
- Committer:
- daoyu_sofiane
- Date:
- Fri Apr 16 09:25:33 2021 +0000
- Revision:
- 0:a8ed743bc1e1
Projet Gyropode
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
daoyu_sofiane | 0:a8ed743bc1e1 | 1 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 2 | /** \addtogroup rtos */ |
daoyu_sofiane | 0:a8ed743bc1e1 | 3 | /** @{*/ |
daoyu_sofiane | 0:a8ed743bc1e1 | 4 | /* mbed Microcontroller Library |
daoyu_sofiane | 0:a8ed743bc1e1 | 5 | * Copyright (c) 2006-2012 ARM Limited |
daoyu_sofiane | 0:a8ed743bc1e1 | 6 | * |
daoyu_sofiane | 0:a8ed743bc1e1 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
daoyu_sofiane | 0:a8ed743bc1e1 | 8 | * of this software and associated documentation files (the "Software"), to deal |
daoyu_sofiane | 0:a8ed743bc1e1 | 9 | * in the Software without restriction, including without limitation the rights |
daoyu_sofiane | 0:a8ed743bc1e1 | 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
daoyu_sofiane | 0:a8ed743bc1e1 | 11 | * copies of the Software, and to permit persons to whom the Software is |
daoyu_sofiane | 0:a8ed743bc1e1 | 12 | * furnished to do so, subject to the following conditions: |
daoyu_sofiane | 0:a8ed743bc1e1 | 13 | * |
daoyu_sofiane | 0:a8ed743bc1e1 | 14 | * The above copyright notice and this permission notice shall be included in |
daoyu_sofiane | 0:a8ed743bc1e1 | 15 | * all copies or substantial portions of the Software. |
daoyu_sofiane | 0:a8ed743bc1e1 | 16 | * |
daoyu_sofiane | 0:a8ed743bc1e1 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
daoyu_sofiane | 0:a8ed743bc1e1 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
daoyu_sofiane | 0:a8ed743bc1e1 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
daoyu_sofiane | 0:a8ed743bc1e1 | 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
daoyu_sofiane | 0:a8ed743bc1e1 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
daoyu_sofiane | 0:a8ed743bc1e1 | 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
daoyu_sofiane | 0:a8ed743bc1e1 | 23 | * SOFTWARE. |
daoyu_sofiane | 0:a8ed743bc1e1 | 24 | */ |
daoyu_sofiane | 0:a8ed743bc1e1 | 25 | #ifndef RTOS_H |
daoyu_sofiane | 0:a8ed743bc1e1 | 26 | #define RTOS_H |
daoyu_sofiane | 0:a8ed743bc1e1 | 27 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 28 | #include "rtos/Thread.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 29 | #include "rtos/Mutex.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 30 | #include "rtos/RtosTimer.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 31 | #include "rtos/Semaphore.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 32 | #include "rtos/Mail.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 33 | #include "rtos/MemoryPool.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 34 | #include "rtos/Queue.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 35 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 36 | using namespace rtos; |
daoyu_sofiane | 0:a8ed743bc1e1 | 37 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 38 | /* Get mbed lib version number, as RTOS depends on mbed lib features |
daoyu_sofiane | 0:a8ed743bc1e1 | 39 | like mbed_error, Callback and others. |
daoyu_sofiane | 0:a8ed743bc1e1 | 40 | */ |
daoyu_sofiane | 0:a8ed743bc1e1 | 41 | #include "mbed.h" |
daoyu_sofiane | 0:a8ed743bc1e1 | 42 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 43 | #if (MBED_LIBRARY_VERSION < 122) |
daoyu_sofiane | 0:a8ed743bc1e1 | 44 | #error "This version of RTOS requires mbed library version > 121" |
daoyu_sofiane | 0:a8ed743bc1e1 | 45 | #endif |
daoyu_sofiane | 0:a8ed743bc1e1 | 46 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 47 | #endif |
daoyu_sofiane | 0:a8ed743bc1e1 | 48 | |
daoyu_sofiane | 0:a8ed743bc1e1 | 49 | /** @}*/ |