The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_EFM32PG_STK3401/TARGET_Silicon_Labs/TARGET_EFM32/pinmap_function.h@143:86740a56073b, 2017-05-26 (annotated)
- Committer:
- AnnaBridge
- Date:
- Fri May 26 12:30:20 2017 +0100
- Revision:
- 143:86740a56073b
- Parent:
- 122:f9eeca106725
Release 143 of the mbed library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 119:aae6fcc7d9bb | 1 | /***************************************************************************//** |
Kojto | 119:aae6fcc7d9bb | 2 | * @file pinmap_function.h |
Kojto | 119:aae6fcc7d9bb | 3 | ******************************************************************************* |
Kojto | 119:aae6fcc7d9bb | 4 | * @section License |
Kojto | 119:aae6fcc7d9bb | 5 | * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b> |
Kojto | 119:aae6fcc7d9bb | 6 | ******************************************************************************* |
Kojto | 119:aae6fcc7d9bb | 7 | * |
Kojto | 122:f9eeca106725 | 8 | * SPDX-License-Identifier: Apache-2.0 |
Kojto | 119:aae6fcc7d9bb | 9 | * |
Kojto | 122:f9eeca106725 | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
Kojto | 122:f9eeca106725 | 11 | * not use this file except in compliance with the License. |
Kojto | 122:f9eeca106725 | 12 | * You may obtain a copy of the License at |
Kojto | 119:aae6fcc7d9bb | 13 | * |
Kojto | 122:f9eeca106725 | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
Kojto | 119:aae6fcc7d9bb | 15 | * |
Kojto | 122:f9eeca106725 | 16 | * Unless required by applicable law or agreed to in writing, software |
Kojto | 122:f9eeca106725 | 17 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
Kojto | 122:f9eeca106725 | 18 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Kojto | 122:f9eeca106725 | 19 | * See the License for the specific language governing permissions and |
Kojto | 122:f9eeca106725 | 20 | * limitations under the License. |
Kojto | 119:aae6fcc7d9bb | 21 | * |
Kojto | 119:aae6fcc7d9bb | 22 | ******************************************************************************/ |
Kojto | 119:aae6fcc7d9bb | 23 | |
Kojto | 119:aae6fcc7d9bb | 24 | #ifndef MBED_PINMAP_FUNCTION_H |
Kojto | 119:aae6fcc7d9bb | 25 | #define MBED_PINMAP_FUNCTION_H |
Kojto | 119:aae6fcc7d9bb | 26 | |
Kojto | 119:aae6fcc7d9bb | 27 | #include "PinNames.h" |
Kojto | 119:aae6fcc7d9bb | 28 | #include "pinmap.h" |
Kojto | 119:aae6fcc7d9bb | 29 | |
Kojto | 119:aae6fcc7d9bb | 30 | #ifdef __cplusplus |
Kojto | 119:aae6fcc7d9bb | 31 | extern "C" { |
Kojto | 119:aae6fcc7d9bb | 32 | #endif |
Kojto | 119:aae6fcc7d9bb | 33 | |
Kojto | 119:aae6fcc7d9bb | 34 | /** |
Kojto | 119:aae6fcc7d9bb | 35 | * Get the value of the function field for a pin in a pinmap |
Kojto | 119:aae6fcc7d9bb | 36 | * @param pin A pin |
Kojto | 119:aae6fcc7d9bb | 37 | * @param map A pinmap for a given peripheral |
Kojto | 119:aae6fcc7d9bb | 38 | * @return Content of function field in pinmap for the given pin |
Kojto | 119:aae6fcc7d9bb | 39 | */ |
Kojto | 119:aae6fcc7d9bb | 40 | uint32_t pinmap_get_function_field(PinName pin, const PinMap* map); |
Kojto | 119:aae6fcc7d9bb | 41 | |
Kojto | 119:aae6fcc7d9bb | 42 | /** |
Kojto | 119:aae6fcc7d9bb | 43 | * Get the location a given peripheral is routed to from pin |
Kojto | 119:aae6fcc7d9bb | 44 | * This is stored in the function field of the pinmap |
Kojto | 119:aae6fcc7d9bb | 45 | * @param pin The pin |
Kojto | 119:aae6fcc7d9bb | 46 | * @param map Pinmap for the given peripheral |
Kojto | 119:aae6fcc7d9bb | 47 | * @return uint32 describing location (0, 1, 2, ...) |
Kojto | 119:aae6fcc7d9bb | 48 | */ |
Kojto | 119:aae6fcc7d9bb | 49 | uint32_t pin_location(PinName pin, const PinMap* map); |
Kojto | 119:aae6fcc7d9bb | 50 | |
Kojto | 119:aae6fcc7d9bb | 51 | #ifdef __cplusplus |
Kojto | 119:aae6fcc7d9bb | 52 | } |
Kojto | 119:aae6fcc7d9bb | 53 | #endif |
Kojto | 119:aae6fcc7d9bb | 54 | |
Kojto | 119:aae6fcc7d9bb | 55 | #endif |