1 /****************************************************************************** 2 * 3 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by 4 * Analog Devices, Inc.), 5 * Copyright (C) 2023-2024 Analog Devices, Inc. 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 ******************************************************************************/ 20 21 #ifndef LIBRARIES_MAXUSB_INCLUDE_CORE_MUSBHSFC_USB_HWOPT_H_ 22 #define LIBRARIES_MAXUSB_INCLUDE_CORE_MUSBHSFC_USB_HWOPT_H_ 23 24 #include "mxc_device.h" 25 #include "usbhs_regs.h" 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 /* Configuration options for MUSBHSFC */ 32 typedef struct { 33 unsigned int enable_hs; /* 0 = full-speed only, otherwise high-speed if negotiated */ 34 void (*delay_us)(unsigned int usec); /* User-supplied function to delay usec micro-seconds */ 35 int (*init_callback)(void); /* User-supplied function for initializing the USB block */ 36 int (*shutdown_callback)(void); /* User-supplied function for shutting down the USB block */ 37 } maxusb_cfg_options_t; 38 39 /** 40 * @brief Put the transceiver into a low power state. 41 */ 42 void MXC_USB_Sleep(void); 43 44 /** 45 * @brief Power up the USB transceiver, must be called once the device wakes from sleep. 46 */ 47 void MXC_USB_Wakeup(void); 48 49 /** 50 * @brief Send a remote wakeup signal to the host. 51 */ 52 void MXC_USB_RemoteWakeup(void); 53 54 /* 55 * @brief USB internal DMA engine interrupt handler 56 */ 57 void MXC_USB_DmaIsr(void); 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif //LIBRARIES_MAXUSB_INCLUDE_CORE_MUSBHSFC_USB_HWOPT_H_ 64