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.
Signal.h
00001 /* 00002 * Signal.h 00003 * Copyright (c) 2017, ZHAW 00004 * All rights reserved. 00005 */ 00006 00007 #ifndef SIGNAL_H_ 00008 #define SIGNAL_H_ 00009 00010 #include <cstdlib> 00011 #include <stdint.h> 00012 #include <mbed.h> 00013 00014 /** 00015 * This class manages the handling of unique signal flags to trigger rtos threads. 00016 */ 00017 class Signal { 00018 00019 public: 00020 00021 Signal(); 00022 virtual ~Signal(); 00023 virtual int32_t read(); 00024 operator int32_t(); 00025 00026 private: 00027 00028 static int32_t signals; // variable that holds all assigned signal flags 00029 int32_t signal; // signal flag of this object 00030 Mutex mutex; // mutex to lock critical sections 00031 }; 00032 00033 #endif /* SIGNAL_H_ */ 00034
Generated on Wed Jul 13 2022 23:05:32 by
1.7.2