Mouse code for the MacroRat
mbed-dev/hal/pinmap.h@34:69342782fb68, 2017-05-26 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Fri May 26 17:21:04 2017 +0000
- Revision:
- 34:69342782fb68
- Parent:
- 18:6a4db94011d3
Added small reverse turns before the break so that we can stop faster.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | |
sahilmgandhi | 18:6a4db94011d3 | 2 | /** \addtogroup hal */ |
sahilmgandhi | 18:6a4db94011d3 | 3 | /** @{*/ |
sahilmgandhi | 18:6a4db94011d3 | 4 | /* mbed Microcontroller Library |
sahilmgandhi | 18:6a4db94011d3 | 5 | * Copyright (c) 2006-2013 ARM Limited |
sahilmgandhi | 18:6a4db94011d3 | 6 | * |
sahilmgandhi | 18:6a4db94011d3 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sahilmgandhi | 18:6a4db94011d3 | 8 | * you may not use this file except in compliance with the License. |
sahilmgandhi | 18:6a4db94011d3 | 9 | * You may obtain a copy of the License at |
sahilmgandhi | 18:6a4db94011d3 | 10 | * |
sahilmgandhi | 18:6a4db94011d3 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
sahilmgandhi | 18:6a4db94011d3 | 12 | * |
sahilmgandhi | 18:6a4db94011d3 | 13 | * Unless required by applicable law or agreed to in writing, software |
sahilmgandhi | 18:6a4db94011d3 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
sahilmgandhi | 18:6a4db94011d3 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sahilmgandhi | 18:6a4db94011d3 | 16 | * See the License for the specific language governing permissions and |
sahilmgandhi | 18:6a4db94011d3 | 17 | * limitations under the License. |
sahilmgandhi | 18:6a4db94011d3 | 18 | */ |
sahilmgandhi | 18:6a4db94011d3 | 19 | #ifndef MBED_PINMAP_H |
sahilmgandhi | 18:6a4db94011d3 | 20 | #define MBED_PINMAP_H |
sahilmgandhi | 18:6a4db94011d3 | 21 | |
sahilmgandhi | 18:6a4db94011d3 | 22 | #include "PinNames.h" |
sahilmgandhi | 18:6a4db94011d3 | 23 | |
sahilmgandhi | 18:6a4db94011d3 | 24 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 25 | extern "C" { |
sahilmgandhi | 18:6a4db94011d3 | 26 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 27 | |
sahilmgandhi | 18:6a4db94011d3 | 28 | typedef struct { |
sahilmgandhi | 18:6a4db94011d3 | 29 | PinName pin; |
sahilmgandhi | 18:6a4db94011d3 | 30 | int peripheral; |
sahilmgandhi | 18:6a4db94011d3 | 31 | int function; |
sahilmgandhi | 18:6a4db94011d3 | 32 | } PinMap; |
sahilmgandhi | 18:6a4db94011d3 | 33 | |
sahilmgandhi | 18:6a4db94011d3 | 34 | void pin_function(PinName pin, int function); |
sahilmgandhi | 18:6a4db94011d3 | 35 | void pin_mode (PinName pin, PinMode mode); |
sahilmgandhi | 18:6a4db94011d3 | 36 | |
sahilmgandhi | 18:6a4db94011d3 | 37 | uint32_t pinmap_peripheral(PinName pin, const PinMap* map); |
sahilmgandhi | 18:6a4db94011d3 | 38 | uint32_t pinmap_function(PinName pin, const PinMap* map); |
sahilmgandhi | 18:6a4db94011d3 | 39 | uint32_t pinmap_merge (uint32_t a, uint32_t b); |
sahilmgandhi | 18:6a4db94011d3 | 40 | void pinmap_pinout (PinName pin, const PinMap *map); |
sahilmgandhi | 18:6a4db94011d3 | 41 | uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map); |
sahilmgandhi | 18:6a4db94011d3 | 42 | uint32_t pinmap_find_function(PinName pin, const PinMap* map); |
sahilmgandhi | 18:6a4db94011d3 | 43 | |
sahilmgandhi | 18:6a4db94011d3 | 44 | #ifdef __cplusplus |
sahilmgandhi | 18:6a4db94011d3 | 45 | } |
sahilmgandhi | 18:6a4db94011d3 | 46 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | #endif |
sahilmgandhi | 18:6a4db94011d3 | 49 | |
sahilmgandhi | 18:6a4db94011d3 | 50 | /** @}*/ |