From Ben Katz mbed-dev library. Removed unnecessary target files to reduce the overall size by a factor of 10 to make it easier to import into the online IDE.
Dependents: motor_driver motor_driver_screaming_fix
hal/pinmap.h@0:083111ae2a11, 2020-11-26 (annotated)
- Committer:
- saloutos
- Date:
- Thu Nov 26 04:08:56 2020 +0000
- Revision:
- 0:083111ae2a11
first commit of leaned mbed dev lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
saloutos | 0:083111ae2a11 | 1 | |
saloutos | 0:083111ae2a11 | 2 | /** \addtogroup hal */ |
saloutos | 0:083111ae2a11 | 3 | /** @{*/ |
saloutos | 0:083111ae2a11 | 4 | /* mbed Microcontroller Library |
saloutos | 0:083111ae2a11 | 5 | * Copyright (c) 2006-2013 ARM Limited |
saloutos | 0:083111ae2a11 | 6 | * |
saloutos | 0:083111ae2a11 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
saloutos | 0:083111ae2a11 | 8 | * you may not use this file except in compliance with the License. |
saloutos | 0:083111ae2a11 | 9 | * You may obtain a copy of the License at |
saloutos | 0:083111ae2a11 | 10 | * |
saloutos | 0:083111ae2a11 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
saloutos | 0:083111ae2a11 | 12 | * |
saloutos | 0:083111ae2a11 | 13 | * Unless required by applicable law or agreed to in writing, software |
saloutos | 0:083111ae2a11 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
saloutos | 0:083111ae2a11 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
saloutos | 0:083111ae2a11 | 16 | * See the License for the specific language governing permissions and |
saloutos | 0:083111ae2a11 | 17 | * limitations under the License. |
saloutos | 0:083111ae2a11 | 18 | */ |
saloutos | 0:083111ae2a11 | 19 | #ifndef MBED_PINMAP_H |
saloutos | 0:083111ae2a11 | 20 | #define MBED_PINMAP_H |
saloutos | 0:083111ae2a11 | 21 | |
saloutos | 0:083111ae2a11 | 22 | #include "PinNames.h" |
saloutos | 0:083111ae2a11 | 23 | |
saloutos | 0:083111ae2a11 | 24 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 25 | extern "C" { |
saloutos | 0:083111ae2a11 | 26 | #endif |
saloutos | 0:083111ae2a11 | 27 | |
saloutos | 0:083111ae2a11 | 28 | typedef struct { |
saloutos | 0:083111ae2a11 | 29 | PinName pin; |
saloutos | 0:083111ae2a11 | 30 | int peripheral; |
saloutos | 0:083111ae2a11 | 31 | int function; |
saloutos | 0:083111ae2a11 | 32 | } PinMap; |
saloutos | 0:083111ae2a11 | 33 | |
saloutos | 0:083111ae2a11 | 34 | void pin_function(PinName pin, int function); |
saloutos | 0:083111ae2a11 | 35 | void pin_mode (PinName pin, PinMode mode); |
saloutos | 0:083111ae2a11 | 36 | |
saloutos | 0:083111ae2a11 | 37 | uint32_t pinmap_peripheral(PinName pin, const PinMap* map); |
saloutos | 0:083111ae2a11 | 38 | uint32_t pinmap_function(PinName pin, const PinMap* map); |
saloutos | 0:083111ae2a11 | 39 | uint32_t pinmap_merge (uint32_t a, uint32_t b); |
saloutos | 0:083111ae2a11 | 40 | void pinmap_pinout (PinName pin, const PinMap *map); |
saloutos | 0:083111ae2a11 | 41 | uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map); |
saloutos | 0:083111ae2a11 | 42 | uint32_t pinmap_find_function(PinName pin, const PinMap* map); |
saloutos | 0:083111ae2a11 | 43 | |
saloutos | 0:083111ae2a11 | 44 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 45 | } |
saloutos | 0:083111ae2a11 | 46 | #endif |
saloutos | 0:083111ae2a11 | 47 | |
saloutos | 0:083111ae2a11 | 48 | #endif |
saloutos | 0:083111ae2a11 | 49 | |
saloutos | 0:083111ae2a11 | 50 | /** @}*/ |