1 /** 2 * @file mxc_pins.h 3 * @brief This file contains constant pin configurations for the peripherals. 4 */ 5 6 /****************************************************************************** 7 * 8 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by 9 * Analog Devices, Inc.), 10 * Copyright (C) 2023-2024 Analog Devices, Inc. 11 * 12 * Licensed under the Apache License, Version 2.0 (the "License"); 13 * you may not use this file except in compliance with the License. 14 * You may obtain a copy of the License at 15 * 16 * http://www.apache.org/licenses/LICENSE-2.0 17 * 18 * Unless required by applicable law or agreed to in writing, software 19 * distributed under the License is distributed on an "AS IS" BASIS, 20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * See the License for the specific language governing permissions and 22 * limitations under the License. 23 * 24 ******************************************************************************/ 25 26 #ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_PINS_H_ 27 #define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_PINS_H_ 28 29 #include "gpio.h" 30 31 /***** Global Variables *****/ 32 // Predefined GPIO Configurations 33 extern const mxc_gpio_cfg_t gpio_cfg_lpextclk; 34 extern const mxc_gpio_cfg_t gpio_cfg_hfextclk; 35 extern const mxc_gpio_cfg_t gpio_cfg_i2c0; 36 extern const mxc_gpio_cfg_t gpio_cfg_i2c1; 37 extern const mxc_gpio_cfg_t gpio_cfg_i2c2; 38 extern const mxc_gpio_cfg_t gpio_cfg_i2c2b; 39 extern const mxc_gpio_cfg_t gpio_cfg_i2c2c; 40 41 extern const mxc_gpio_cfg_t gpio_cfg_uart0; 42 extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow; 43 extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow_disable; 44 extern const mxc_gpio_cfg_t gpio_cfg_uart1; 45 extern const mxc_gpio_cfg_t gpio_cfg_uart1_flow; 46 extern const mxc_gpio_cfg_t gpio_cfg_uart1_flow_disable; 47 extern const mxc_gpio_cfg_t gpio_cfg_uart2; 48 extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow; 49 extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow_disable; 50 extern const mxc_gpio_cfg_t gpio_cfg_uart3; 51 extern const mxc_gpio_cfg_t gpio_cfg_uart3_flow; 52 extern const mxc_gpio_cfg_t gpio_cfg_uart3_flow_disable; 53 54 extern const mxc_gpio_cfg_t gpio_cfg_spi0; 55 // NOTE: SPI1 definied here with SS1 only, SS0 is on port0 by itself. 56 extern const mxc_gpio_cfg_t gpio_cfg_spi1; 57 // NOTE: SPI2 defined here with SS0 only, and NOT SS1 and SS2 58 extern const mxc_gpio_cfg_t gpio_cfg_spi2; 59 extern const mxc_gpio_cfg_t gpio_cfg_spi2b; 60 // NOTE: SPI3 defined here with SS0 only, and NOT SS1, SS2, or SS3 61 extern const mxc_gpio_cfg_t gpio_cfg_spi3; 62 63 // Timers are only defined once, depending on package, each timer could be mapped to other pins 64 extern const mxc_gpio_cfg_t gpio_cfg_tmr0; 65 extern const mxc_gpio_cfg_t gpio_cfg_tmr1; 66 extern const mxc_gpio_cfg_t gpio_cfg_tmr2; 67 extern const mxc_gpio_cfg_t gpio_cfg_tmr3; 68 extern const mxc_gpio_cfg_t gpio_cfg_tmr4; 69 extern const mxc_gpio_cfg_t gpio_cfg_tmr5; 70 71 extern const mxc_gpio_cfg_t gpio_cfg_i2s0; 72 73 extern const mxc_gpio_cfg_t gpio_cfg_rtcsqw; 74 extern const mxc_gpio_cfg_t gpio_cfg_rtcsqwb; 75 76 extern const mxc_gpio_cfg_t gpio_cfg_lc1; 77 extern const mxc_gpio_cfg_t gpio_cfg_mon_lc1; 78 extern const mxc_gpio_cfg_t gpio_cfg_cmd_rs_lc1; 79 extern const mxc_gpio_cfg_t gpio_cfg_chrg_lc1; 80 extern const mxc_gpio_cfg_t gpio_cfg_lc2; 81 extern const mxc_gpio_cfg_t gpio_cfg_mon_lc2; 82 extern const mxc_gpio_cfg_t gpio_cfg_cmd_rs_lc2; 83 extern const mxc_gpio_cfg_t gpio_cfg_chrg_lc2; 84 85 // SPI v2 Pin Definitions 86 extern const mxc_gpio_cfg_t gpio_cfg_spi0_standard; 87 extern const mxc_gpio_cfg_t gpio_cfg_spi0_3wire; 88 // MXC_SPI0 does not support Dual or Quad modes. 89 extern const mxc_gpio_cfg_t gpio_cfg_spi1_standard; 90 extern const mxc_gpio_cfg_t gpio_cfg_spi1_3wire; 91 // MXC_SPI1 does not support Dual or Quad modes. 92 93 // SPI v2 Target Selects Pin Definitions 94 extern const mxc_gpio_cfg_t gpio_cfg_spi0_ts0; 95 extern const mxc_gpio_cfg_t gpio_cfg_spi1_ts0; 96 97 #endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_PINS_H_ 98