1 /****************************************************************************** 2 * 3 * Copyright (C) 2024 Analog Devices, Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 #ifndef LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_USB_H_ 20 #define LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_USB_H_ 21 22 /***** Includes *****/ 23 #include <usb.h> 24 #include <usb_event.h> 25 #include <mcr_regs.h> 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 /* 32 * MAX32665, MAX32666 related mapping 33 */ 34 #if defined(CONFIG_SOC_MAX32665) || (CONFIG_SOC_MAX32666) 35 Wrap_MXC_USB_Init(maxusb_cfg_options_t * options)36static inline int Wrap_MXC_USB_Init(maxusb_cfg_options_t *options) 37 { 38 return MXC_USB_Init(options); 39 } 40 41 /* 42 * MAX32690 related mapping 43 */ 44 #elif defined(CONFIG_SOC_MAX32690) 45 46 static inline int Wrap_MXC_USB_Init(maxusb_cfg_options_t *options) 47 { 48 MXC_MCR->ldoctrl |= MXC_F_MCR_LDOCTRL_0P9EN; 49 50 return MXC_USB_Init(options); 51 } 52 53 #endif // part number 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif // LIBRARIES_ZEPHYR_MAX_INCLUDE_WRAP_MAX32_USB_H_ 60