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_MAX32572_MXC_PINS_H_ 27 #define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32572_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_extclk; 34 extern const mxc_gpio_cfg_t gpio_cfg_i2c0; 35 extern const mxc_gpio_cfg_t gpio_cfg_i2c1; 36 37 extern const mxc_gpio_cfg_t gpio_cfg_uart0; 38 extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow; 39 extern const mxc_gpio_cfg_t gpio_cfg_uart0_flow_disable; 40 extern const mxc_gpio_cfg_t gpio_cfg_uart1; 41 extern const mxc_gpio_cfg_t gpio_cfg_uart1_flow; 42 extern const mxc_gpio_cfg_t gpio_cfg_uart1_flow_disable; 43 extern const mxc_gpio_cfg_t gpio_cfg_uart2; 44 extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow; 45 extern const mxc_gpio_cfg_t gpio_cfg_uart2_flow_disable; 46 extern const mxc_gpio_cfg_t gpio_cfg_uart3; 47 extern const mxc_gpio_cfg_t gpio_cfg_uart3_flow; 48 extern const mxc_gpio_cfg_t gpio_cfg_uart3_flow_disable; 49 50 // Timers are only defined once, depending on package, each timer could be mapped to other pins 51 extern const mxc_gpio_cfg_t gpio_cfg_tmr0; 52 extern const mxc_gpio_cfg_t gpio_cfg_tmr1; 53 extern const mxc_gpio_cfg_t gpio_cfg_tmr2; 54 extern const mxc_gpio_cfg_t gpio_cfg_tmr3; 55 extern const mxc_gpio_cfg_t gpio_cfg_tmr4; 56 extern const mxc_gpio_cfg_t gpio_cfg_tmr5; 57 58 extern const mxc_gpio_cfg_t gpio_cfg_rtcsqw; 59 extern const mxc_gpio_cfg_t gpio_cfg_rtcsqwb; 60 61 extern const mxc_gpio_cfg_t gpio_cfg_pt0; 62 extern const mxc_gpio_cfg_t gpio_cfg_pt1; 63 extern const mxc_gpio_cfg_t gpio_cfg_pt2; 64 extern const mxc_gpio_cfg_t gpio_cfg_pt3; 65 extern const mxc_gpio_cfg_t gpio_cfg_pt4; 66 extern const mxc_gpio_cfg_t gpio_cfg_pt5; 67 extern const mxc_gpio_cfg_t gpio_cfg_pt6; 68 extern const mxc_gpio_cfg_t gpio_cfg_pt7; 69 70 extern const mxc_gpio_cfg_t gpio_cfg_rv_jtag; 71 72 extern const mxc_gpio_cfg_t gpio_cfg_spixf; 73 74 // SPI v2 Pin Definitions 75 extern const mxc_gpio_cfg_t gpio_cfg_spi0_standard; 76 extern const mxc_gpio_cfg_t gpio_cfg_spi0_3wire; 77 extern const mxc_gpio_cfg_t gpio_cfg_spi0_dual; 78 extern const mxc_gpio_cfg_t gpio_cfg_spi0_quad; 79 extern const mxc_gpio_cfg_t gpio_cfg_spi1_standard; 80 extern const mxc_gpio_cfg_t gpio_cfg_spi1_3wire; 81 extern const mxc_gpio_cfg_t gpio_cfg_spi1_dual; 82 extern const mxc_gpio_cfg_t gpio_cfg_spi1_quad; 83 // SPI2 does not exist in the MAX32572 (to match instance addressing with MAX32570B) 84 extern const mxc_gpio_cfg_t gpio_cfg_spi3_standard; 85 extern const mxc_gpio_cfg_t gpio_cfg_spi3_3wire; 86 extern const mxc_gpio_cfg_t gpio_cfg_spi3_dual; 87 extern const mxc_gpio_cfg_t gpio_cfg_spi3_quad; 88 89 // SPI v2 Target Selects Pin Definitions 90 extern const mxc_gpio_cfg_t gpio_cfg_spi0_ts0; 91 extern const mxc_gpio_cfg_t gpio_cfg_spi1_ts0; 92 extern const mxc_gpio_cfg_t gpio_cfg_spi1_ts1; 93 extern const mxc_gpio_cfg_t gpio_cfg_spi1_ts2; 94 extern const mxc_gpio_cfg_t gpio_cfg_spi1_ts3; 95 // SPI2 does not exist in the MAX32572 (to match instance addressing with MAX32570B) 96 extern const mxc_gpio_cfg_t gpio_cfg_spi3_ts0; 97 extern const mxc_gpio_cfg_t gpio_cfg_spi3_ts1; 98 extern const mxc_gpio_cfg_t gpio_cfg_spi3_ts2; 99 extern const mxc_gpio_cfg_t gpio_cfg_spi3_ts3; 100 101 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain0; 102 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain1; 103 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain2; 104 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain3; 105 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain4; 106 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain5; 107 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain6; 108 extern const mxc_gpio_cfg_t gpio_cfg_adc_ain7; 109 110 extern const mxc_gpio_cfg_t gpio_cfg_skbd_P2; 111 112 #endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32572_MXC_PINS_H_ 113