1 /** 2 * @file mxc_device.h 3 * @brief Device specific header file. 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_MAX32570_MXC_DEVICE_H_ 27 #define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32570_MXC_DEVICE_H_ 28 29 #include "max32570.h" 30 #include "mxc_errors.h" 31 #include "mxc_pins.h" 32 33 #ifndef TARGET 34 #error TARGET NOT DEFINED 35 #endif 36 37 // Create a string definition for the TARGET 38 #define STRING_ARG(arg) #arg 39 #define STRING_NAME(name) STRING_ARG(name) 40 #define TARGET_NAME STRING_NAME(TARGET) 41 42 // Define which revisions of the IP we are using 43 #ifndef TARGET_REV 44 #error TARGET_REV NOT DEFINED 45 #endif 46 47 #if (TARGET_REV == 0x4131) 48 // A1 49 #define MXC_TMR_REV 0 50 #define MXC_UART_REV 0 51 #else 52 53 #error TARGET_REV NOT SUPPORTED 54 55 #endif /* if(TARGET_REV == ...) */ 56 57 #endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32570_MXC_DEVICE_H_ 58