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.
Fork of mbed-src by
Diff: common/pinmap_common.c
- Revision:
- 227:7bd0639b8911
- Parent:
- 221:8276e3a4886f
- Child:
- 250:a49055e7a707
diff -r b062af740e40 -r 7bd0639b8911 common/pinmap_common.c --- a/common/pinmap_common.c Wed Jun 11 09:45:09 2014 +0100 +++ b/common/pinmap_common.c Wed Jun 11 16:00:09 2014 +0100 @@ -17,7 +17,8 @@ #include "error.h" void pinmap_pinout(PinName pin, const PinMap *map) { - if (pin == NC) return; + if (pin == NC) + return; while (map->pin != NC) { if (map->pin == pin) { @@ -33,11 +34,14 @@ uint32_t pinmap_merge(uint32_t a, uint32_t b) { // both are the same (inc both NC) - if (a == b) return a; + if (a == b) + return a; // one (or both) is not connected - if (a == (uint32_t)NC) return b; - if (b == (uint32_t)NC) return a; + if (a == (uint32_t)NC) + return b; + if (b == (uint32_t)NC) + return a; // mis-match error case error("pinmap mis-match");