teralytic / mbed-dev

Fork of mbed by teralytic

Committer:
rodriguise
Date:
Mon Oct 17 18:47:01 2016 +0000
Revision:
148:4802eb17e82b
Parent:
107:414e9c822e99
backup

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 107:414e9c822e99 1 /**
mbed_official 107:414e9c822e99 2 * \file
mbed_official 107:414e9c822e99 3 *
mbed_official 107:414e9c822e99 4 * \brief Common GPIO API.
mbed_official 107:414e9c822e99 5 *
mbed_official 107:414e9c822e99 6 * Copyright (c) 2010-2015 Atmel Corporation. All rights reserved.
mbed_official 107:414e9c822e99 7 *
mbed_official 107:414e9c822e99 8 * \asf_license_start
mbed_official 107:414e9c822e99 9 *
mbed_official 107:414e9c822e99 10 * \page License
mbed_official 107:414e9c822e99 11 *
mbed_official 107:414e9c822e99 12 * Redistribution and use in source and binary forms, with or without
mbed_official 107:414e9c822e99 13 * modification, are permitted provided that the following conditions are met:
mbed_official 107:414e9c822e99 14 *
mbed_official 107:414e9c822e99 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 107:414e9c822e99 16 * this list of conditions and the following disclaimer.
mbed_official 107:414e9c822e99 17 *
mbed_official 107:414e9c822e99 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 107:414e9c822e99 19 * this list of conditions and the following disclaimer in the documentation
mbed_official 107:414e9c822e99 20 * and/or other materials provided with the distribution.
mbed_official 107:414e9c822e99 21 *
mbed_official 107:414e9c822e99 22 * 3. The name of Atmel may not be used to endorse or promote products derived
mbed_official 107:414e9c822e99 23 * from this software without specific prior written permission.
mbed_official 107:414e9c822e99 24 *
mbed_official 107:414e9c822e99 25 * 4. This software may only be redistributed and used in connection with an
mbed_official 107:414e9c822e99 26 * Atmel microcontroller product.
mbed_official 107:414e9c822e99 27 *
mbed_official 107:414e9c822e99 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
mbed_official 107:414e9c822e99 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
mbed_official 107:414e9c822e99 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
mbed_official 107:414e9c822e99 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
mbed_official 107:414e9c822e99 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 107:414e9c822e99 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
mbed_official 107:414e9c822e99 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
mbed_official 107:414e9c822e99 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
mbed_official 107:414e9c822e99 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
mbed_official 107:414e9c822e99 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
mbed_official 107:414e9c822e99 38 * POSSIBILITY OF SUCH DAMAGE.
mbed_official 107:414e9c822e99 39 *
mbed_official 107:414e9c822e99 40 * \asf_license_stop
mbed_official 107:414e9c822e99 41 *
mbed_official 107:414e9c822e99 42 */
mbed_official 107:414e9c822e99 43 /*
mbed_official 107:414e9c822e99 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
mbed_official 107:414e9c822e99 45 */
mbed_official 107:414e9c822e99 46 #ifndef _GPIO_H_
mbed_official 107:414e9c822e99 47 #define _GPIO_H_
mbed_official 107:414e9c822e99 48
mbed_official 107:414e9c822e99 49 #include <parts.h>
mbed_official 107:414e9c822e99 50
mbed_official 107:414e9c822e99 51 #if (SAM3S || SAM3U || SAM3N || SAM3XA || SAM4S || SAM4E || SAM4N || SAM4C || SAMG || SAM4CP || SAM4CM || SAMV71 || SAMV70 || SAME70 || SAMS70)
mbed_official 107:414e9c822e99 52 # include "sam_gpio/sam_gpio.h"
mbed_official 107:414e9c822e99 53 #elif XMEGA
mbed_official 107:414e9c822e99 54 # include "xmega_gpio/xmega_gpio.h"
mbed_official 107:414e9c822e99 55 #elif MEGA || MEGA_RF
mbed_official 107:414e9c822e99 56 # include "mega_gpio/mega_gpio.h"
mbed_official 107:414e9c822e99 57 #else
mbed_official 107:414e9c822e99 58 # error Unsupported chip type
mbed_official 107:414e9c822e99 59 #endif
mbed_official 107:414e9c822e99 60
mbed_official 107:414e9c822e99 61 /**
mbed_official 107:414e9c822e99 62 * \defgroup gpio_group General Purpose Input/Output
mbed_official 107:414e9c822e99 63 *
mbed_official 107:414e9c822e99 64 * This is the common API for GPIO. Additional features are available
mbed_official 107:414e9c822e99 65 * in the documentation of the specific modules.
mbed_official 107:414e9c822e99 66 *
mbed_official 107:414e9c822e99 67 * \section io_group_platform Platform Dependencies
mbed_official 107:414e9c822e99 68 *
mbed_official 107:414e9c822e99 69 * The following functions are available on all platforms, but there may
mbed_official 107:414e9c822e99 70 * be variations in the function signature (i.e. parameters) and
mbed_official 107:414e9c822e99 71 * behaviour. These functions are typically called by platform-specific
mbed_official 107:414e9c822e99 72 * parts of drivers, and applications that aren't intended to be
mbed_official 107:414e9c822e99 73 * portable:
mbed_official 107:414e9c822e99 74 * - gpio_pin_is_low()
mbed_official 107:414e9c822e99 75 * - gpio_pin_is_high()
mbed_official 107:414e9c822e99 76 * - gpio_set_pin_high()
mbed_official 107:414e9c822e99 77 * - gpio_set_pin_group_high()
mbed_official 107:414e9c822e99 78 * - gpio_set_pin_low()
mbed_official 107:414e9c822e99 79 * - gpio_set_pin_group_low()
mbed_official 107:414e9c822e99 80 * - gpio_toggle_pin()
mbed_official 107:414e9c822e99 81 * - gpio_toggle_pin_group()
mbed_official 107:414e9c822e99 82 * - gpio_configure_pin()
mbed_official 107:414e9c822e99 83 * - gpio_configure_group()
mbed_official 107:414e9c822e99 84 */
mbed_official 107:414e9c822e99 85
mbed_official 107:414e9c822e99 86 #endif /* _GPIO_H_ */