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.
Dependencies: LSM9DS1 RangeFinder FastPWM
Dependents: PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board PM2_Example_PES_board ... more
ThreadFlag.h
00001 /* 00002 * ThreadFlag.h 00003 * Copyright (c) 2020, ZHAW 00004 * All rights reserved. 00005 */ 00006 00007 #ifndef THREAD_FLAG_H_ 00008 #define THREAD_FLAG_H_ 00009 00010 #include <cstdlib> 00011 #include <mbed.h> 00012 00013 /** 00014 * This class manages the handling of unique thread flags to trigger rtos threads. 00015 */ 00016 class ThreadFlag 00017 { 00018 00019 public: 00020 00021 ThreadFlag(); 00022 virtual ~ThreadFlag(); 00023 virtual unsigned int read(); 00024 operator unsigned int(); 00025 00026 private: 00027 00028 static unsigned int threadFlags; // variable that holds all assigned thread flags 00029 unsigned int threadFlag; // thread flag of this object 00030 Mutex mutex; // mutex to lock critical sections 00031 }; 00032 00033 #endif /* THREAD_FLAG_H_ */ 00034
Generated on Tue Jul 12 2022 21:20:55 by
1.7.2
