NXP Touch Cursor example for LPCXpresso54608, modified for use with Mbed OS.
Embed:
(wiki syntax)
Show/hide line numbers
pin_mux.h
00001 /* 00002 * The Clear BSD License 00003 * Copyright (c) 2016, Freescale Semiconductor, Inc. 00004 * Copyright 2016-2017 NXP 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without modification, 00008 * are permitted (subject to the limitations in the disclaimer below) provided 00009 * that the following conditions are met: 00010 * 00011 * o Redistributions of source code must retain the above copyright notice, this list 00012 * of conditions and the following disclaimer. 00013 * 00014 * o Redistributions in binary form must reproduce the above copyright notice, this 00015 * list of conditions and the following disclaimer in the documentation and/or 00016 * other materials provided with the distribution. 00017 * 00018 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its 00019 * contributors may be used to endorse or promote products derived from this 00020 * software without specific prior written permission. 00021 * 00022 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00024 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00025 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00026 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 00027 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00028 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00029 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00030 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00032 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 */ 00034 00035 #ifndef _PIN_MUX_H_ 00036 #define _PIN_MUX_H_ 00037 00038 /*********************************************************************************************************************** 00039 * Definitions 00040 **********************************************************************************************************************/ 00041 00042 /*! @brief Direction type */ 00043 typedef enum _pin_mux_direction 00044 { 00045 kPIN_MUX_DirectionInput = 0U, /* Input direction */ 00046 kPIN_MUX_DirectionOutput = 1U, /* Output direction */ 00047 kPIN_MUX_DirectionInputOrOutput = 2U /* Input or output direction */ 00048 } pin_mux_direction_t; 00049 00050 /*! 00051 * @addtogroup pin_mux 00052 * @{ 00053 */ 00054 00055 /*********************************************************************************************************************** 00056 * API 00057 **********************************************************************************************************************/ 00058 00059 #if defined(__cplusplus) 00060 extern "C" { 00061 #endif 00062 00063 00064 #define IOCON_PIO_DIGITAL_EN 0x0100u /*!<@brief Enables digital function */ 00065 #define IOCON_PIO_FUNC0 0x00u /*!<@brief Selects pin function 0 */ 00066 #define IOCON_PIO_FUNC1 0x01u /*!<@brief Selects pin function 1 */ 00067 #define IOCON_PIO_FUNC6 0x06u /*!<@brief Selects pin function 6 */ 00068 #define IOCON_PIO_I2CDRIVE_HIGH 0x0400u /*!<@brief High drive: 20 mA */ 00069 #define IOCON_PIO_I2CFILTER_EN 0x00u /*!<@brief I2C 50 ns glitch filter enabled */ 00070 #define IOCON_PIO_I2CSLEW_I2C 0x00u /*!<@brief I2C mode */ 00071 #define IOCON_PIO_INPFILT_OFF 0x0200u /*!<@brief Input filter disabled */ 00072 #define IOCON_PIO_INV_DI 0x00u /*!<@brief Input function is not inverted */ 00073 #define IOCON_PIO_MODE_INACT 0x00u /*!<@brief No addition pin function */ 00074 #define IOCON_PIO_MODE_PULLUP 0x20u /*!<@brief Selects pull-up function */ 00075 #define IOCON_PIO_OPENDRAIN_DI 0x00u /*!<@brief Open drain is disabled */ 00076 #define IOCON_PIO_SLEW_STANDARD 0x00u /*!<@brief Standard mode, output slew rate control is enabled */ 00077 00078 /*! 00079 * @brief Configures pin routing and optionally pin electrical features. 00080 * 00081 */ 00082 void BOARD_InitPins(void); /* Function assigned for the Cortex-M4F */ 00083 00084 #if defined(__cplusplus) 00085 } 00086 #endif 00087 00088 /*! 00089 * @} 00090 */ 00091 #endif /* _PIN_MUX_H_ */ 00092 00093 /*********************************************************************************************************************** 00094 * EOF 00095 **********************************************************************************************************************/
Generated on Sun Jul 17 2022 23:10:29 by
1.7.2
Jenny Plunkett