.

Dependents:  

Committer:
altb
Date:
Mon Feb 25 09:47:04 2019 +0000
Revision:
11:78e723ede0c6
Parent:
4:288253c4da29
2018

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 4:288253c4da29 1 /*
altb 4:288253c4da29 2 * Signal.h
altb 4:288253c4da29 3 * Copyright (c) 2017, ZHAW
altb 4:288253c4da29 4 * All rights reserved.
altb 4:288253c4da29 5 */
altb 4:288253c4da29 6
altb 4:288253c4da29 7 #ifndef SIGNAL_H_
altb 4:288253c4da29 8 #define SIGNAL_H_
altb 4:288253c4da29 9
altb 4:288253c4da29 10 #include <cstdlib>
altb 4:288253c4da29 11 #include <stdint.h>
altb 4:288253c4da29 12 #include <mbed.h>
altb 4:288253c4da29 13
altb 4:288253c4da29 14 /**
altb 4:288253c4da29 15 * This class manages the handling of unique signal flags to trigger rtos threads.
altb 4:288253c4da29 16 */
altb 4:288253c4da29 17 class Signal {
altb 4:288253c4da29 18
altb 4:288253c4da29 19 public:
altb 4:288253c4da29 20
altb 4:288253c4da29 21 Signal();
altb 4:288253c4da29 22 virtual ~Signal();
altb 4:288253c4da29 23 virtual int32_t read();
altb 4:288253c4da29 24 operator int32_t();
altb 4:288253c4da29 25
altb 4:288253c4da29 26 private:
altb 4:288253c4da29 27
altb 4:288253c4da29 28 static int32_t signals; // variable that holds all assigned signal flags
altb 4:288253c4da29 29 int32_t signal; // signal flag of this object
altb 4:288253c4da29 30 Mutex mutex; // mutex to lock critical sections
altb 4:288253c4da29 31 };
altb 4:288253c4da29 32
altb 4:288253c4da29 33 #endif /* SIGNAL_H_ */
altb 4:288253c4da29 34