1 /****************************************************************************** 2 * Filename: gpio_doc.h 3 * Revised: 2016-03-30 13:03:59 +0200 (Wed, 30 Mar 2016) 4 * Revision: 45971 5 * 6 * Copyright (c) 2015 - 2020, Texas Instruments Incorporated 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * 1) Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * 15 * 2) Redistributions in binary form must reproduce the above copyright notice, 16 * this list of conditions and the following disclaimer in the documentation 17 * and/or other materials provided with the distribution. 18 * 19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may 20 * be used to endorse or promote products derived from this software without 21 * specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 * 35 ******************************************************************************/ 36 //! \addtogroup gpio_api 37 //! @{ 38 //! \section sec_gpio Introduction 39 //! 40 //! The GPIO module allows software to control the pins of the device directly if the IOC module has 41 //! been configured to route the GPIO signal to a physical pin (called DIO). Alternatively, pins can 42 //! be hardware controlled by other peripheral modules. For more information about the IOC module, 43 //! how to configure physical pins, and how to select between software controlled and hardware controlled, 44 //! see the [IOC API](\ref ioc_api). 45 //! 46 //! The System CPU can access the GPIO module to read the value of any DIO of the device and if the IOC 47 //! module has been configured such that one or more DIOs are GPIO controlled (software controlled) the 48 //! System CPU can write these DIOs through the GPIO module. 49 //! 50 //! The IOC module can also be configured to generate events on edge detection and these events can be 51 //! read and cleared in the GPIO module by the System CPU. 52 //! 53 //! \section sec_gpio_api API 54 //! 55 //! The API functions can be grouped like this: 56 //! 57 //! Set and get direction of DIO (output enable): 58 //! - \ref GPIO_setOutputEnableDio() 59 //! - \ref GPIO_setOutputEnableMultiDio() 60 //! - \ref GPIO_getOutputEnableDio() 61 //! - \ref GPIO_getOutputEnableMultiDio() 62 //! 63 //! Write DIO (requires IOC to be configured for GPIO usage): 64 //! - \ref GPIO_writeDio() 65 //! - \ref GPIO_writeMultiDio() 66 //! 67 //! Set, clear, or toggle DIO (requires IOC to be configured for GPIO usage): 68 //! - \ref GPIO_setDio() 69 //! - \ref GPIO_setMultiDio() 70 //! - \ref GPIO_clearDio() 71 //! - \ref GPIO_clearMultiDio() 72 //! - \ref GPIO_toggleDio() 73 //! - \ref GPIO_toggleMultiDio() 74 //! 75 //! Read DIO (even if IOC is NOT configured for GPIO usage; however, the DIO must be configured for input enable in IOC): 76 //! - \ref GPIO_readDio() 77 //! - \ref GPIO_readMultiDio() 78 //! 79 //! Read or clear events (even if IOC is NOT configured for GPIO usage; however, the DIO must be configured for input enable in IOC): 80 //! - \ref GPIO_getEventDio() 81 //! - \ref GPIO_getEventMultiDio() 82 //! - \ref GPIO_clearEventDio() 83 //! - \ref GPIO_clearEventMultiDio() 84 //! 85 //! The [IOC API](\ref ioc_api) provides two functions for easy configuration of DIOs as GPIO enabled using 86 //! typical settings. They also serve as examples on how to configure the IOC and GPIO modules for GPIO usage: 87 //! - \ref IOCPinTypeGpioInput() 88 //! - \ref IOCPinTypeGpioOutput() 89 //! 90 //! @} 91