58 lines
1.7 KiB
C
58 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc.
|
|
* Copyright 2016 - 2018 NXP
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
#ifndef __APP_H__
|
|
#define __APP_H__
|
|
#include "usb_host_config.h"
|
|
#include "usb_host.h"
|
|
#include "fsl_device_registers.h"
|
|
|
|
/*******************************************************************************
|
|
* Definitions
|
|
******************************************************************************/
|
|
|
|
/* @TEST_ANCHOR */
|
|
|
|
#if ((defined USB_HOST_CONFIG_KHCI) && (USB_HOST_CONFIG_KHCI))
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerKhci0
|
|
#endif
|
|
#endif /* USB_HOST_CONFIG_KHCI */
|
|
#if ((defined USB_HOST_CONFIG_EHCI) && (USB_HOST_CONFIG_EHCI))
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerEhci0
|
|
#endif
|
|
#endif /* USB_HOST_CONFIG_EHCI */
|
|
#if ((defined USB_HOST_CONFIG_OHCI) && (USB_HOST_CONFIG_OHCI))
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerOhci0
|
|
#endif
|
|
#endif /* USB_HOST_CONFIG_OHCI */
|
|
#if ((defined USB_HOST_CONFIG_IP3516HS) && (USB_HOST_CONFIG_IP3516HS))
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerIp3516Hs0
|
|
#endif
|
|
#endif /* USB_HOST_CONFIG_IP3516HS */
|
|
|
|
#if defined(__GIC_PRIO_BITS)
|
|
#define USB_HOST_INTERRUPT_PRIORITY (25U)
|
|
#elif defined(__NVIC_PRIO_BITS) && (__NVIC_PRIO_BITS >= 3)
|
|
#define USB_HOST_INTERRUPT_PRIORITY (6U)
|
|
#else
|
|
#define USB_HOST_INTERRUPT_PRIORITY (3U)
|
|
#endif
|
|
|
|
/*! @brief host app device attach/detach status */
|
|
typedef enum _host_app_state
|
|
{
|
|
kStatus_DEV_Idle = 0, /*!< there is no device attach/detach */
|
|
kStatus_DEV_Attached, /*!< device is attached */
|
|
kStatus_DEV_Detached, /*!< device is detached */
|
|
} host_app_state_t;
|
|
|
|
#endif /* __APP_H__ */
|