mbed(SerialHalfDuplex入り)
Fork of mbed by
pinmap.h
- Committer:
- emilmont
- Date:
- 2013-01-18
- Revision:
- 57:0480438fc29c
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
File content as of revision 57:0480438fc29c:
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MBED_PINMAP_H #define MBED_PINMAP_H #include "PinNames.h" #ifdef __cplusplus extern "C" { #endif PinName parse_pins(const char *str); typedef struct { PinName pin; int peripheral; int function; } PinMap; void pin_function(PinName pin, int function); void pin_mode (PinName pin, PinMode mode); uint32_t pinmap_peripheral(PinName pin, const PinMap* map); uint32_t pinmap_merge (uint32_t a, uint32_t b); void pinmap_pinout (PinName pin, const PinMap *map); #ifdef __cplusplus } #endif #endif