60 lines
1.7 KiB
C
60 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2015, Freescale Semiconductor, Inc.
|
|
* Copyright 2016 NXP
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef __USB_DEVICE_HID_GENERIC_H__
|
|
#define __USB_DEVICE_HID_GENERIC_H__
|
|
|
|
/*******************************************************************************
|
|
* Definitions
|
|
******************************************************************************/
|
|
|
|
/* @TEST_ANCHOR */
|
|
|
|
#if defined(USB_DEVICE_CONFIG_EHCI) && (USB_DEVICE_CONFIG_EHCI > 0U)
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerEhci0
|
|
#endif
|
|
#endif
|
|
#if defined(USB_DEVICE_CONFIG_KHCI) && (USB_DEVICE_CONFIG_KHCI > 0U)
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerKhci0
|
|
#endif
|
|
#endif
|
|
#if defined(USB_DEVICE_CONFIG_LPCIP3511FS) && (USB_DEVICE_CONFIG_LPCIP3511FS > 0U)
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0
|
|
#endif
|
|
#endif
|
|
#if defined(USB_DEVICE_CONFIG_LPCIP3511HS) && (USB_DEVICE_CONFIG_LPCIP3511HS > 0U)
|
|
#ifndef CONTROLLER_ID
|
|
#define CONTROLLER_ID kUSB_ControllerLpcIp3511Hs0
|
|
#endif
|
|
#endif
|
|
|
|
#define USB_DEVICE_INTERRUPT_PRIORITY (3U)
|
|
typedef struct _usb_hid_generic_struct
|
|
{
|
|
usb_device_handle deviceHandle;
|
|
uint8_t *buffer[2];
|
|
uint8_t bufferIndex;
|
|
uint8_t idleRate;
|
|
uint8_t speed;
|
|
uint8_t attach;
|
|
#if (defined(USB_DEVICE_CONFIG_ROOT2_TEST) && (USB_DEVICE_CONFIG_ROOT2_TEST > 0U))
|
|
#if ((defined(USB_DEVICE_CONFIG_REMOTE_WAKEUP)) && (USB_DEVICE_CONFIG_REMOTE_WAKEUP > 0U))
|
|
volatile uint8_t remoteWakeup;
|
|
#endif
|
|
#endif
|
|
} usb_hid_generic_struct_t;
|
|
|
|
/*******************************************************************************
|
|
* API
|
|
******************************************************************************/
|
|
|
|
#endif /* __USB_DEVICE_HID_GENERIC_H__ */
|