MAX32675 Peripheral Driver API
Peripheral Driver API for the MAX32675
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
mxc_device.h
1
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_MAX32675_MXC_DEVICE_H_
27#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32675_MXC_DEVICE_H_
28
29#include "max32675.h"
30#include "mxc_errors.h"
31#include "mxc_pins.h"
32
33#if defined(__CC_ARM)
34#include "RTE_Components.h"
35#endif
36
37#ifndef TARGET
38#error TARGET NOT DEFINED
39#endif
40
41// Create a string definition for the TARGET
42#define STRING_ARG(arg) #arg
43#define STRING_NAME(name) STRING_ARG(name)
44#define TARGET_NAME STRING_NAME(TARGET)
45
46// Define which revisions of the IP we are using
47#ifndef TARGET_REV
48#error TARGET_REV NOT DEFINED
49#endif
50
51#if (TARGET_REV == 0x4131)
52// A1
53#define MXC_TMR_REV 0
54#define MXC_UART_REV 0
55#else
56
57#error TARGET_REV NOT SUPPORTED
58
59#endif /* if(TARGET_REV == ...) */
60
61#endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32675_MXC_DEVICE_H_