TUKS MCU Introductory course / TUKS-COURSE-2-LED
Committer:
elmot
Date:
Sat Feb 25 08:59:21 2017 +0000
Revision:
6:0018763974d3
Parent:
1:d0dfbce63a89
No comment

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elmot 1:d0dfbce63a89 1
elmot 1:d0dfbce63a89 2 /** \addtogroup hal */
elmot 1:d0dfbce63a89 3 /** @{*/
elmot 1:d0dfbce63a89 4 /* mbed Microcontroller Library
elmot 1:d0dfbce63a89 5 * Copyright (c) 2006-2013 ARM Limited
elmot 1:d0dfbce63a89 6 *
elmot 1:d0dfbce63a89 7 * Licensed under the Apache License, Version 2.0 (the "License");
elmot 1:d0dfbce63a89 8 * you may not use this file except in compliance with the License.
elmot 1:d0dfbce63a89 9 * You may obtain a copy of the License at
elmot 1:d0dfbce63a89 10 *
elmot 1:d0dfbce63a89 11 * http://www.apache.org/licenses/LICENSE-2.0
elmot 1:d0dfbce63a89 12 *
elmot 1:d0dfbce63a89 13 * Unless required by applicable law or agreed to in writing, software
elmot 1:d0dfbce63a89 14 * distributed under the License is distributed on an "AS IS" BASIS,
elmot 1:d0dfbce63a89 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
elmot 1:d0dfbce63a89 16 * See the License for the specific language governing permissions and
elmot 1:d0dfbce63a89 17 * limitations under the License.
elmot 1:d0dfbce63a89 18 */
elmot 1:d0dfbce63a89 19 #ifndef MBED_PINMAP_H
elmot 1:d0dfbce63a89 20 #define MBED_PINMAP_H
elmot 1:d0dfbce63a89 21
elmot 1:d0dfbce63a89 22 #include "PinNames.h"
elmot 1:d0dfbce63a89 23
elmot 1:d0dfbce63a89 24 #ifdef __cplusplus
elmot 1:d0dfbce63a89 25 extern "C" {
elmot 1:d0dfbce63a89 26 #endif
elmot 1:d0dfbce63a89 27
elmot 1:d0dfbce63a89 28 typedef struct {
elmot 1:d0dfbce63a89 29 PinName pin;
elmot 1:d0dfbce63a89 30 int peripheral;
elmot 1:d0dfbce63a89 31 int function;
elmot 1:d0dfbce63a89 32 } PinMap;
elmot 1:d0dfbce63a89 33
elmot 1:d0dfbce63a89 34 void pin_function(PinName pin, int function);
elmot 1:d0dfbce63a89 35 void pin_mode (PinName pin, PinMode mode);
elmot 1:d0dfbce63a89 36
elmot 1:d0dfbce63a89 37 uint32_t pinmap_peripheral(PinName pin, const PinMap* map);
elmot 1:d0dfbce63a89 38 uint32_t pinmap_function(PinName pin, const PinMap* map);
elmot 1:d0dfbce63a89 39 uint32_t pinmap_merge (uint32_t a, uint32_t b);
elmot 1:d0dfbce63a89 40 void pinmap_pinout (PinName pin, const PinMap *map);
elmot 1:d0dfbce63a89 41 uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map);
elmot 1:d0dfbce63a89 42 uint32_t pinmap_find_function(PinName pin, const PinMap* map);
elmot 1:d0dfbce63a89 43
elmot 1:d0dfbce63a89 44 #ifdef __cplusplus
elmot 1:d0dfbce63a89 45 }
elmot 1:d0dfbce63a89 46 #endif
elmot 1:d0dfbce63a89 47
elmot 1:d0dfbce63a89 48 #endif
elmot 1:d0dfbce63a89 49
elmot 1:d0dfbce63a89 50 /** @}*/