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: target-freescale
Fork of mbed-hal by
api/FunctionPointer.h@7:4fdb3a44f646, 2016-03-31 (annotated)
- Committer:
- Christopher Haster
- Date:
- Thu Mar 31 12:35:07 2016 -0500
- Revision:
- 7:4fdb3a44f646
- Parent:
- 6:c2a3aa792960
- Child:
- 11:f08e03081748
Integrated Function throughout the api
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:9c59db1fbc9e | 1 | /* mbed Microcontroller Library |
screamer | 0:9c59db1fbc9e | 2 | * Copyright (c) 2006-2015 ARM Limited |
screamer | 0:9c59db1fbc9e | 3 | * |
screamer | 0:9c59db1fbc9e | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
screamer | 0:9c59db1fbc9e | 5 | * you may not use this file except in compliance with the License. |
screamer | 0:9c59db1fbc9e | 6 | * You may obtain a copy of the License at |
screamer | 0:9c59db1fbc9e | 7 | * |
screamer | 0:9c59db1fbc9e | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
screamer | 0:9c59db1fbc9e | 9 | * |
screamer | 0:9c59db1fbc9e | 10 | * Unless required by applicable law or agreed to in writing, software |
screamer | 0:9c59db1fbc9e | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
screamer | 0:9c59db1fbc9e | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
screamer | 0:9c59db1fbc9e | 13 | * See the License for the specific language governing permissions and |
screamer | 0:9c59db1fbc9e | 14 | * limitations under the License. |
screamer | 0:9c59db1fbc9e | 15 | */ |
Christopher Haster |
7:4fdb3a44f646 | 16 | #ifndef MBED_FUNCTIONPOINTER_H |
Christopher Haster |
7:4fdb3a44f646 | 17 | #define MBED_FUNCTIONPOINTER_H |
screamer | 0:9c59db1fbc9e | 18 | |
Christopher Haster |
7:4fdb3a44f646 | 19 | #include "Function.h" |
screamer | 0:9c59db1fbc9e | 20 | |
screamer | 0:9c59db1fbc9e | 21 | namespace mbed { |
screamer | 0:9c59db1fbc9e | 22 | |
Christopher Haster |
6:c2a3aa792960 | 23 | // Overloads for backwards compatibility |
Christopher Haster |
6:c2a3aa792960 | 24 | template <typename R, typename A1> |
Christopher Haster |
7:4fdb3a44f646 | 25 | class FunctionArg1 : public Function<R(A1)> {}; |
Christopher Haster |
6:c2a3aa792960 | 26 | |
Christopher Haster |
6:c2a3aa792960 | 27 | template <typename R> |
Christopher Haster |
7:4fdb3a44f646 | 28 | class FunctionArg1<R, void> : public Function<R()> {}; |
Christopher Haster |
6:c2a3aa792960 | 29 | |
Christopher Haster |
6:c2a3aa792960 | 30 | typedef Function<void()> FunctionPointer; |
Christopher Haster |
6:c2a3aa792960 | 31 | typedef Function<void(int)> event_callback_t; |
screamer | 0:9c59db1fbc9e | 32 | |
screamer | 0:9c59db1fbc9e | 33 | } // namespace mbed |
screamer | 0:9c59db1fbc9e | 34 | |
screamer | 0:9c59db1fbc9e | 35 | #endif |