MCUXpresso_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_keyboard2mouse/bm/device_mouse.h
2022-04-08 22:46:35 +08:00

53 lines
1.5 KiB
C

/*
* Copyright (c) 2015, Freescale Semiconductor, Inc.
* Copyright 2016 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __USB_HID_MOUSE_H__
#define __USB_HID_MOUSE_H__
/*******************************************************************************
* Definitions
******************************************************************************/
/* @TEST_ANCHOR */
#if defined(USB_DEVICE_CONFIG_EHCI) && (USB_DEVICE_CONFIG_EHCI > 0U)
#ifndef DEVICE_CONTROLLER_ID
#define DEVICE_CONTROLLER_ID kUSB_ControllerEhci0
#endif
#endif
#if defined(USB_DEVICE_CONFIG_LPCIP3511FS) && (USB_DEVICE_CONFIG_LPCIP3511FS > 0U)
#ifndef DEVICE_CONTROLLER_ID
#define DEVICE_CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0
#endif
#endif
#if defined(USB_DEVICE_CONFIG_LPCIP3511HS) && (USB_DEVICE_CONFIG_LPCIP3511HS > 0U)
#ifndef DEVICE_CONTROLLER_ID
#define DEVICE_CONTROLLER_ID kUSB_ControllerLpcIp3511Hs0
#endif
#endif
#define USB_DEVICE_INTERRUPT_PRIORITY (3U)
#define USB_HID_MOUSE_REPORT_LENGTH (0x04U)
typedef struct _usb_hid_mouse_struct
{
usb_device_handle deviceHandle;
class_handle_t hidHandle;
uint8_t *buffer;
uint8_t currentConfiguration;
uint8_t currentInterfaceAlternateSetting[USB_HID_MOUSE_INTERFACE_COUNT];
uint8_t speed;
uint8_t attach;
} usb_hid_mouse_struct_t;
/*******************************************************************************
* API
******************************************************************************/
#endif /* __USB_HID_MOUSE_H__ */