MAX32675 Peripheral Driver API
Peripheral Driver API for the MAX32675
mxc_device.h
1 
6 /*******************************************************************************
7  * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  ******************************************************************************/
38 
39 #ifndef _MXC_DEVICE_H_
40 #define _MXC_DEVICE_H_
41 
42 #include "max32675.h"
43 #include "mxc_errors.h"
44 #include "mxc_pins.h"
45 
46 #if defined ( __ICCARM__ ) || (__CC_ARM)
47 #include "RTE_Components.h"
48 #endif
49 
50 #ifndef TARGET
51 #error TARGET NOT DEFINED
52 #endif
53 
54 // Create a string definition for the TARGET
55 #define STRING_ARG(arg) #arg
56 #define STRING_NAME(name) STRING_ARG(name)
57 #define TARGET_NAME STRING_NAME(TARGET)
58 
59 // Define which revisions of the IP we are using
60 #ifndef TARGET_REV
61 #error TARGET_REV NOT DEFINED
62 #endif
63 
64 #if(TARGET_REV == 0x4131)
65 // A1
66 #define MXC_TMR_REV 0
67 #define MXC_UART_REV 0
68 #else
69 
70 #error TARGET_REV NOT SUPPORTED
71 
72 #endif /* if(TARGET_REV == ...) */
73 
74 #endif /* _MXC_DEVICE_H_ */