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.
mbed-dev/targets/TARGET_NUVOTON/nu_miscutil.h@60:8399756e1ba1, 2021-01-22 (annotated)
- Committer:
- MartinGurtner
- Date:
- Fri Jan 22 13:10:37 2021 +0000
- Revision:
- 60:8399756e1ba1
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MartinGurtner | 60:8399756e1ba1 | 1 | /* mbed Microcontroller Library |
MartinGurtner | 60:8399756e1ba1 | 2 | * Copyright (c) 2015-2016 Nuvoton |
MartinGurtner | 60:8399756e1ba1 | 3 | * |
MartinGurtner | 60:8399756e1ba1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MartinGurtner | 60:8399756e1ba1 | 5 | * you may not use this file except in compliance with the License. |
MartinGurtner | 60:8399756e1ba1 | 6 | * You may obtain a copy of the License at |
MartinGurtner | 60:8399756e1ba1 | 7 | * |
MartinGurtner | 60:8399756e1ba1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MartinGurtner | 60:8399756e1ba1 | 9 | * |
MartinGurtner | 60:8399756e1ba1 | 10 | * Unless required by applicable law or agreed to in writing, software |
MartinGurtner | 60:8399756e1ba1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MartinGurtner | 60:8399756e1ba1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MartinGurtner | 60:8399756e1ba1 | 13 | * See the License for the specific language governing permissions and |
MartinGurtner | 60:8399756e1ba1 | 14 | * limitations under the License. |
MartinGurtner | 60:8399756e1ba1 | 15 | */ |
MartinGurtner | 60:8399756e1ba1 | 16 | |
MartinGurtner | 60:8399756e1ba1 | 17 | #ifndef NU_MISC_UTIL_H |
MartinGurtner | 60:8399756e1ba1 | 18 | #define NU_MISC_UTIL_H |
MartinGurtner | 60:8399756e1ba1 | 19 | |
MartinGurtner | 60:8399756e1ba1 | 20 | #ifdef __cplusplus |
MartinGurtner | 60:8399756e1ba1 | 21 | extern "C" { |
MartinGurtner | 60:8399756e1ba1 | 22 | #endif |
MartinGurtner | 60:8399756e1ba1 | 23 | |
MartinGurtner | 60:8399756e1ba1 | 24 | #define NU_MAX(a,b) ((a)>(b)?(a):(b)) |
MartinGurtner | 60:8399756e1ba1 | 25 | #define NU_MIN(a,b) ((a)<(b)?(a):(b)) |
MartinGurtner | 60:8399756e1ba1 | 26 | #define NU_CLAMP(x, min, max) NU_MIN(NU_MAX((x), (min)), (max)) |
MartinGurtner | 60:8399756e1ba1 | 27 | #define NU_ALIGN_DOWN(X, ALIGN) ((X) & ~((ALIGN) - 1)) |
MartinGurtner | 60:8399756e1ba1 | 28 | #define NU_ALIGN_UP(X, ALIGN) (((X) + (ALIGN) - 1) & ~((ALIGN) - 1)) |
MartinGurtner | 60:8399756e1ba1 | 29 | |
MartinGurtner | 60:8399756e1ba1 | 30 | void nu_nop(uint32_t n); |
MartinGurtner | 60:8399756e1ba1 | 31 | |
MartinGurtner | 60:8399756e1ba1 | 32 | |
MartinGurtner | 60:8399756e1ba1 | 33 | #ifdef __cplusplus |
MartinGurtner | 60:8399756e1ba1 | 34 | } |
MartinGurtner | 60:8399756e1ba1 | 35 | #endif |
MartinGurtner | 60:8399756e1ba1 | 36 | |
MartinGurtner | 60:8399756e1ba1 | 37 | #endif |