usb_dongle.h

来自「这是nrf24lu1的无线鼠标源代码,应用平台是keil c」· C头文件 代码 · 共 47 行

H
47
字号
/* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
 *
 * The information contained herein is confidential property of Nordic Semiconductor. The use,
 * copying, transfer or disclosure of such information is prohibited except by express written
 * agreement with Nordic Semiconductor.
 */

/** @file
 * USB interface functions for the application
 * @defgroup usb_code USB
 * @{
 */
#ifndef  _DONGLE_H_
#define  _DONGLE_H_

#include <stdint.h>

//-----------------------------------------------------------------------------
// Typical Mouse IN Report struct
//-----------------------------------------------------------------------------
typedef struct
{
  uint8_t mod;
  uint8_t res;
  uint8_t key[6]; // HID stores up to 6 key strokes
} usb_in_rep_keyb_t;

typedef struct
{
  uint8_t button;
  int8_t disp_x;
  int8_t disp_y;
  int8_t disp_z;
} usb_in_rep_mouse_t;

typedef struct
{
  uint8_t rc_data[3]; // 3 Bytes is necessary for the RC HID report
} usb_in_rep_rc_t;

void usb_init(void);
void send_usb_packet(uint8_t report_id);

#endif  /* _MOUSE_H_ */
/** @} */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?