Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
IO_Config_Override.h
00001 /** 00002 * @file IO_Config_Override.c 00003 * @brief Alternative IO for LPC11U35 based Hardware Interface Circuit 00004 * 00005 * DAPLink Interface Firmware 00006 * Copyright (c) 2009-2017, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 /** 00023 * The VBLUno51 board use PIO0_9(18) pin for TGT_SWCLK function. 00024 * Because it uses RTS/CTS pins for UART Hardware flow control feature. 00025 */ 00026 00027 #ifndef __IO_CONFIG_H__ 00028 #define __IO_CONFIG_H__ 00029 00030 #include "LPC11Uxx.h" 00031 #include "daplink.h" 00032 00033 // This GPIO configuration is only valid for the LPC11U35 HIC 00034 COMPILER_ASSERT(DAPLINK_HIC_ID == DAPLINK_HIC_ID_LPC11U35); 00035 00036 // Peripheral register bit masks (used for pin inits) 00037 #define FUNC_0 0 00038 #define FUNC_1 1 00039 #define PULL_DOWN_ENABLED (1 << 3) 00040 #define PULL_UP_ENABLED (2 << 3) 00041 #define OPENDRAIN (1 << 10) 00042 00043 // DAP LED PIO0_21 00044 #define PIN_DAP_LED_PORT 0 00045 #define PIN_DAP_LED_BIT 21 00046 #define PIN_DAP_LED (1 << PIN_DAP_LED_BIT) 00047 #define PIN_DAP_LED_IOCON LPC_IOCON->PIO0_21 00048 #define PIN_DAP_LED_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00049 00050 // MSD LED PIO0_20 00051 #define PIN_MSD_LED_PORT 0 00052 #define PIN_MSD_LED_BIT 20 00053 #define PIN_MSD_LED (1 << PIN_MSD_LED_BIT) 00054 #define PIN_MSD_LED_IOCON LPC_IOCON->PIO0_20 00055 #define PIN_MSD_LED_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00056 00057 // CDC LED PIO0_11 00058 #define PIN_CDC_LED_PORT 0 00059 #define PIN_CDC_LED_BIT 11 00060 #define PIN_CDC_LED (1 << PIN_CDC_LED_BIT) 00061 #define PIN_CDC_LED_IOCON LPC_IOCON->TDI_PIO0_11 00062 #define PIN_CDC_LED_IOCON_INIT (FUNC_1 | PULL_UP_ENABLED) 00063 00064 // Non-Forwarded Reset in PIN PIO1_19 00065 #define PIN_RESET_IN_PORT 1 00066 #define PIN_RESET_IN_BIT 19 00067 #define PIN_RESET_IN (1 << PIN_RESET_IN_BIT) 00068 #define PIN_RESET_IN_IOCON LPC_IOCON->PIO1_19 00069 #define PIN_RESET_IN_IOCON_INIT (FUNC_0 | OPENDRAIN | PULL_UP_ENABLED) 00070 00071 // Forwarded Reset in PIN PIO0_1 00072 #define PIN_RESET_IN_FWRD_PORT 0 00073 #define PIN_RESET_IN_FWRD_BIT 1 00074 #define PIN_RESET_IN_FWRD (1 << PIN_RESET_IN_FWRD_BIT) 00075 #define PIN_RESET_IN_FWRD_IOCON LPC_IOCON->PIO0_1 00076 #define PIN_RESET_IN_FWRD_IOCON_INIT (FUNC_0 | OPENDRAIN | PULL_UP_ENABLED) 00077 00078 // nRESET OUT Pin PIO0_2 00079 #define PIN_nRESET_PORT 0 00080 #define PIN_nRESET_BIT 2 00081 #define PIN_nRESET (1 << PIN_nRESET_BIT) 00082 #define PIN_nRESET_IOCON LPC_IOCON->PIO0_2 00083 #define PIN_nRESET_IOCON_INIT (FUNC_0 | OPENDRAIN | PULL_UP_ENABLED) 00084 00085 // SWCLK/TCK Pin PIO0_9 00086 #define PIN_SWCLK_PORT 0 00087 #define PIN_SWCLK_BIT 9 00088 #define PIN_SWCLK (1 << PIN_SWCLK_BIT) 00089 #define PIN_SWCLK_TCK_IOCON LPC_IOCON->PIO0_9 00090 #define PIN_SWCLK_TCK_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00091 00092 // SWDIO/TMS In/Out Pin PIO0_8 00093 #define PIN_SWDIO_PORT 0 00094 #define PIN_SWDIO_BIT 8 00095 #define PIN_SWDIO (1 << PIN_SWDIO_BIT) 00096 #define PIN_SWDIO_TMS_IOCON LPC_IOCON->PIO0_8 00097 #define PIN_SWDIO_TMS_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00098 00099 // TDI Pin PIO0_17 00100 #define PIN_TDI_PORT 17 00101 #define PIN_TDI_BIT 17 00102 #define PIN_TDI (1 << PIN_TDI_BIT) 00103 #define PIN_TDI_IOCON LPC_IOCON->PIO0_17 00104 #define PIN_TDI_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00105 00106 // SWO/TDO Pin PIO0_9 00107 #define PIN_TDO_PORT 9 00108 #define PIN_TDO_BIT 9 00109 #define PIN_TDO (1 << PIN_TDO_BIT) 00110 #define PIN_TDO_IOCON LPC_IOCON->PIO0_9 00111 #define PIN_TDO_IOCON_INIT (FUNC_0 | PULL_UP_ENABLED) 00112 00113 #endif
Generated on Tue Jul 12 2022 15:37:19 by
1.7.2