Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

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