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 * Created on: 08.02.2017 00007 * Author: Marcel Honegger 00008 */ 00009 00010 #ifndef SIGNAL_H_ 00011 #define SIGNAL_H_ 00012 00013 #include <cstdlib> 00014 #include <stdint.h> 00015 #include <mbed.h> 00016 00017 /** 00018 * This class manages the handling of unique signal flags to trigger rtos threads. 00019 */ 00020 class Signal { 00021 00022 public: 00023 00024 Signal(); 00025 virtual ~Signal(); 00026 virtual int32_t read(); 00027 operator int32_t(); 00028 00029 private: 00030 00031 static int32_t signals; // variable that holds all assigned signal flags 00032 int32_t signal; // signal flag of this object 00033 Mutex mutex; // mutex to lock critical sections 00034 }; 00035 00036 #endif /* SIGNAL_H_ */ 00037 00038
Generated on Tue Jul 12 2022 18:18:49 by
1.7.2