首先要感谢EEPW给这次学习的机会。
本次学习使用PAJ7620U2和STM32H503-USBHIDkeyboard枚举,实现USB虚拟键盘功能,达到控制PPT翻页的效果。
识别手势:上、下、左、右、靠近、远离、顺时针旋转、逆时针旋转、挥动。
控制PPT翻页:上左:上一页,下右:下一页,靠近:跳转到第一页、远离:跳转到最后一页,顺时针旋转:F5播放PPT,逆时针旋转:ECS退出播放PPT。
课程2中已经实现了I2C读写PAJ7620U2功能,这里就不做过多介绍。没有实现的同学可以跳转过去看一眼。
课程2:https://forum.eepw.com.cn/thread/382661/1
本次课程中,重新整理了下PAJ7620U2的代码,作为一个.h/.c文件单独存放,方便USB应用调用。
.h/.c文件中,USB主要用到读取PAJ7620U2手势识别函数和键值宏定义值。
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : paj7620u2.h * @brief : Header for paj7620u2.c file. * This file contains the common defines of the application. ****************************************************************************** * @attention * * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * * ****************************************************************************** */ /* USER CODE END Header */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __PAJ7620U2_H #define __PAJ7620U2_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32h5xx_hal.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Exported types ------------------------------------------------------------*/ /* USER CODE BEGIN ET */ /* USER CODE END ET */ /* Exported constants --------------------------------------------------------*/ /* USER CODE BEGIN EC */ /* USER CODE END EC */ /* Exported macro ------------------------------------------------------------*/ /* USER CODE BEGIN EM */ /* USER CODE END EM */ /* Exported functions prototypes ---------------------------------------------*/ /* USER CODE BEGIN EFP */ uint8_t paj7620_init(void); //PAJ7620U2初始化函数 void getGesture(void); //PAJ7620U2获取手势识别函数 uint16_t ReadGesture(void); //PAJ7620U2获取手势识别函数 void user_function_gesture(uint8_t status); //手势控制继电器开关灯函数 /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ /* USER CODE BEGIN Private defines */ //PAJ7620地址寄存器定义 #define PAJ7620_I2C_ADDRESS 0x73<<1 //paj7620的i2c地址,7bit #define PAJ_BANK_SELECT 0xEF //寄存器页选择寄存器:Bank0=0x00, Bank1=0x01 #define PAJ_INT_FLAG1 0x43 //检测结果数据低八位数据所在地址 #define PAJ_INT_FLAG2 0x44 //检测结果数据高八位数据所在地址 //手势状态 #define PAJ_UP 0x01 //上 #define PAJ_DOWN 0x02 //下 #define PAJ_LEFT 0x04 //左 #define PAJ_RIGHT 0x08 //右 #define PAJ_FORWARD 0x10 //接近 #define PAJ_BACKWARD 0x20 //远离 #define PAJ_CLOCKWISE 0x40 //顺时针旋转 #define PAJ_ANTI_CLOCKWISE 0x80 //逆时针旋转 #define PAJ_WAVE 0x100 //挥动 /* USER CODE END Private defines */ #ifdef __cplusplus } #endif #endif /* __PAJ7620U2_H */
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : paj7620u2.c * @brief : paj7620u2 program body ****************************************************************************** * @attention * * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "paj7620u2.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "stdio.h" #include "i2c.h" #include "usart.h" #include "gpio.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ //继电器控制灯IO定义 #define LED0_ON HAL_GPIO_WritePin(GPIOC, GPIO_PIN_10, GPIO_PIN_SET); #define LED0_OFF HAL_GPIO_WritePin(GPIOC, GPIO_PIN_10, GPIO_PIN_RESET); #define LED0_TOG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_10); #define LED1_ON HAL_GPIO_WritePin(GPIOC, GPIO_PIN_11, GPIO_PIN_SET); #define LED1_OFF HAL_GPIO_WritePin(GPIOC, GPIO_PIN_11, GPIO_PIN_RESET); #define LED1_TOG HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_11); /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ /* USER CODE BEGIN PV */ //PAJ7620初始化寄存器数组:219组 uint8_t Paj7620Init_Reg_Array[][2] = { {0xEF, 0x00}, {0x32, 0x29}, {0x33, 0x01}, {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x00}, {0x37, 0x07}, {0x38, 0x17}, {0x39, 0x06}, {0x3A, 0x12}, {0x3F, 0x00}, {0x40, 0x02}, {0x41, 0xFF}, {0x42, 0x01}, {0x46, 0x2D}, {0x47, 0x0F}, {0x48, 0x3C}, {0x49, 0x00}, {0x4A, 0x1E}, {0x4B, 0x00}, {0x4C, 0x20}, {0x4D, 0x00}, {0x4E, 0x1A}, {0x4F, 0x14}, {0x50, 0x00}, {0x51, 0x10}, {0x52, 0x00}, {0x5C, 0x02}, {0x5D, 0x00}, {0x5E, 0x10}, {0x5F, 0x3F}, {0x60, 0x27}, {0x61, 0x28}, {0x62, 0x00}, {0x63, 0x03}, {0x64, 0xF7}, {0x65, 0x03}, {0x66, 0xD9}, {0x67, 0x03}, {0x68, 0x01}, {0x69, 0xC8}, {0x6A, 0x40}, {0x6D, 0x04}, {0x6E, 0x00}, {0x6F, 0x00}, {0x70, 0x80}, {0x71, 0x00}, {0x72, 0x00}, {0x73, 0x00}, {0x74, 0xF0}, {0x75, 0x00}, {0x80, 0x42}, {0x81, 0x44}, {0x82, 0x04}, {0x83, 0x20}, {0x84, 0x20}, {0x85, 0x00}, {0x86, 0x10}, {0x87, 0x00}, {0x88, 0x05}, {0x89, 0x18}, {0x8A, 0x10}, {0x8B, 0x01}, {0x8C, 0x37}, {0x8D, 0x00}, {0x8E, 0xF0}, {0x8F, 0x81}, {0x90, 0x06}, {0x91, 0x06}, {0x92, 0x1E}, {0x93, 0x0D}, {0x94, 0x0A}, {0x95, 0x0A}, {0x96, 0x0C}, {0x97, 0x05}, {0x98, 0x0A}, {0x99, 0x41}, {0x9A, 0x14}, {0x9B, 0x0A}, {0x9C, 0x3F}, {0x9D, 0x33}, {0x9E, 0xAE}, {0x9F, 0xF9}, {0xA0, 0x48}, {0xA1, 0x13}, {0xA2, 0x10}, {0xA3, 0x08}, {0xA4, 0x30}, {0xA5, 0x19}, {0xA6, 0x10}, {0xA7, 0x08}, {0xA8, 0x24}, {0xA9, 0x04}, {0xAA, 0x1E}, {0xAB, 0x1E}, {0xCC, 0x19}, {0xCD, 0x0B}, {0xCE, 0x13}, {0xCF, 0x64}, {0xD0, 0x21}, {0xD1, 0x0F}, {0xD2, 0x88}, {0xE0, 0x01}, {0xE1, 0x04}, {0xE2, 0x41}, {0xE3, 0xD6}, {0xE4, 0x00}, {0xE5, 0x0C}, {0xE6, 0x0A}, {0xE7, 0x00}, {0xE8, 0x00}, {0xE9, 0x00}, {0xEE, 0x07}, {0xEF, 0x01}, {0x00, 0x1E}, {0x01, 0x1E}, {0x02, 0x0F}, {0x03, 0x10}, {0x04, 0x02}, {0x05, 0x00}, {0x06, 0xB0}, {0x07, 0x04}, {0x08, 0x0D}, {0x09, 0x0E}, {0x0A, 0x9C}, {0x0B, 0x04}, {0x0C, 0x05}, {0x0D, 0x0F}, {0x0E, 0x02}, {0x0F, 0x12}, {0x10, 0x02}, {0x11, 0x02}, {0x12, 0x00}, {0x13, 0x01}, {0x14, 0x05}, {0x15, 0x07}, {0x16, 0x05}, {0x17, 0x07}, {0x18, 0x01}, {0x19, 0x04}, {0x1A, 0x05}, {0x1B, 0x0C}, {0x1C, 0x2A}, {0x1D, 0x01}, {0x1E, 0x00}, {0x21, 0x00}, {0x22, 0x00}, {0x23, 0x00}, {0x25, 0x01}, {0x26, 0x00}, {0x27, 0x39}, {0x28, 0x7F}, {0x29, 0x08}, {0x30, 0x03}, {0x31, 0x00}, {0x32, 0x1A}, {0x33, 0x1A}, {0x34, 0x07}, {0x35, 0x07}, {0x36, 0x01}, {0x37, 0xFF}, {0x38, 0x36}, {0x39, 0x07}, {0x3A, 0x00}, {0x3E, 0xFF}, {0x3F, 0x00}, {0x40, 0x77}, {0x41, 0x40}, {0x42, 0x00}, {0x43, 0x30}, {0x44, 0xA0}, {0x45, 0x5C}, {0x46, 0x00}, {0x47, 0x00}, {0x48, 0x58}, {0x4A, 0x1E}, {0x4B, 0x1E}, {0x4C, 0x00}, {0x4D, 0x00}, {0x4E, 0xA0}, {0x4F, 0x80}, {0x50, 0x00}, {0x51, 0x00}, {0x52, 0x00}, {0x53, 0x00}, {0x54, 0x00}, {0x57, 0x80}, {0x59, 0x10}, {0x5A, 0x08}, {0x5B, 0x94}, {0x5C, 0xE8}, {0x5D, 0x08}, {0x5E, 0x3D}, {0x5F, 0x99}, {0x60, 0x45}, {0x61, 0x40}, {0x63, 0x2D}, {0x64, 0x02}, {0x65, 0x96}, {0x66, 0x00}, {0x67, 0x97}, {0x68, 0x01}, {0x69, 0xCD}, {0x6A, 0x01}, {0x6B, 0xB0}, {0x6C, 0x04}, {0x6D, 0x2C}, {0x6E, 0x01}, {0x6F, 0x32}, {0x71, 0x00}, {0x72, 0x01}, {0x73, 0x35}, {0x74, 0x00}, {0x75, 0x33}, {0x76, 0x31}, {0x77, 0x01}, {0x7C, 0x84}, {0x7D, 0x03}, {0x7E, 0x01}, }; //继电器控制灯状态 uint8_t LED_Status; /* USER CODE END PV */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ //PAJ7620U2初始化,返回0则初始化失败 uint8_t paj7620_init(void) { uint8_t i,State,n; State = 0; while(HAL_OK != HAL_I2C_Mem_Write(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_BANK_SELECT, I2C_MEMADD_SIZE_8BIT, &State, 1, 500)) { HAL_Delay(5); printf("paj7620_init err: 1 \r\n"); } for(i=0; i<219; i++) { while(HAL_OK != HAL_I2C_Mem_Write(&hi2c1, PAJ7620_I2C_ADDRESS, Paj7620Init_Reg_Array[i][0], I2C_MEMADD_SIZE_8BIT, &Paj7620Init_Reg_Array[i][1], 1, 500)) { HAL_Delay(5); printf("paj7620_init err: 2 \r\n"); } HAL_Delay(5); } while(HAL_OK != HAL_I2C_Mem_Write(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_BANK_SELECT, I2C_MEMADD_SIZE_8BIT,&State,1,500)) { HAL_Delay(5); printf("paj7620_init err: 3 \r\n"); } HAL_Delay(5); while(HAL_OK != HAL_I2C_Mem_Read(&hi2c1, PAJ7620_I2C_ADDRESS, 0x32, I2C_MEMADD_SIZE_8BIT, &n, 1, 500)) { HAL_Delay(5); printf("paj7620_init err: 4 \r\n"); } if(n != 0x29) { return 0; } return 1; } //检测手势并输出 void getGesture(void) { uint8_t Data[2]={0,0}; uint16_t Gesture_Data; HAL_I2C_Mem_Read(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_INT_FLAG1, I2C_MEMADD_SIZE_8BIT, &Data[0], 1, 500); HAL_Delay(5); HAL_I2C_Mem_Read(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_INT_FLAG2, I2C_MEMADD_SIZE_8BIT, &Data[1], 1, 500); HAL_Delay(5); Gesture_Data = (Data[1]<<8) | Data[0]; //printf("\n %x \r\n", Gesture_Data); if(Gesture_Data != 0) { //printf("\n %x \r\n", Gesture_Data); switch(Gesture_Data) { case PAJ_UP: printf("Up\r\n"); LED_Status=1; break; case PAJ_DOWN: printf("Down\r\n"); LED_Status=2; break; case PAJ_LEFT: printf("Left\r\n"); LED_Status=3; break; case PAJ_RIGHT: printf("Right\r\n"); LED_Status=4; break; case PAJ_FORWARD: printf("Forward\r\n"); LED_Status=5; break; case PAJ_BACKWARD: printf("Backward\r\n"); LED_Status=6; break; case PAJ_CLOCKWISE: printf("Clockwise\r\n"); LED_Status=7; break; case PAJ_ANTI_CLOCKWISE: printf("AntiClockwise\r\n"); LED_Status=8; break; case PAJ_WAVE: printf("Wave\r\n"); LED_Status=9; break; default: break; } Gesture_Data = 0; } } //检测手势并输出 uint16_t ReadGesture(void) { uint8_t Data[2]={0,0}; uint16_t Gesture_Data; HAL_I2C_Mem_Read(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_INT_FLAG1, I2C_MEMADD_SIZE_8BIT, &Data[0], 1, 500); HAL_Delay(5); HAL_I2C_Mem_Read(&hi2c1, PAJ7620_I2C_ADDRESS, PAJ_INT_FLAG2, I2C_MEMADD_SIZE_8BIT, &Data[1], 1, 500); HAL_Delay(5); Gesture_Data = (Data[1]<<8) | Data[0]; //printf("\n %x \r\n", Gesture_Data); if(Gesture_Data != 0) { //printf("\n %x \r\n", Gesture_Data); switch(Gesture_Data) { case PAJ_UP: printf("Up\r\n"); return PAJ_UP; break; case PAJ_DOWN: printf("Down\r\n"); return PAJ_DOWN; break; case PAJ_LEFT: printf("Left\r\n"); return PAJ_LEFT; break; case PAJ_RIGHT: printf("Right\r\n"); return PAJ_RIGHT; break; case PAJ_FORWARD: printf("Forward\r\n"); return PAJ_FORWARD; break; case PAJ_BACKWARD: printf("Backward\r\n"); return PAJ_BACKWARD; break; case PAJ_CLOCKWISE: printf("Clockwise\r\n"); return PAJ_CLOCKWISE; break; case PAJ_ANTI_CLOCKWISE: printf("AntiClockwise\r\n"); return PAJ_ANTI_CLOCKWISE; break; case PAJ_WAVE: printf("Wave\r\n"); return PAJ_WAVE; break; default: break; } Gesture_Data = 0; } return 0; } //手势控制继电器开关灯 void user_function_gesture(uint8_t status) { switch(status) { case 1: //PAJ_UP LED0_ON; LED1_ON; //printf("LED_Status: 1 \r\n"); break; case 2: //PAJ_DOWN LED0_OFF; LED1_OFF; //printf("LED_Status: 2 \r\n"); break; case 3: //PAJ_LEFT LED0_ON; LED1_OFF; //printf("LED_Status: 3 \r\n"); break; case 4: //PAJ_RIGHT LED0_OFF; LED1_ON; //printf("LED_Status: 4 \r\n"); break; case 5: //PAJ_FORWARD LED0_TOG; //printf("LED_Status: 5 \r\n"); break; case 6: //PAJ_BACKWARD LED1_TOG; //printf("LED_Status: 6 \r\n"); break; case 7: //PAJ_CLOCKWISE //printf("LED_Status: 7 \r\n"); break; case 8: //PAJ_COUNT_CLOCKWISE //printf("LED_Status: 8 \r\n"); break; case 9: //PAJ_WAVE LED0_TOG; LED1_TOG; //printf("LED_Status: 9 \r\n"); break; default: break; } } /* USER CODE END 0 */
PAJ7620U2的初始化可以放在USB函数里面,也可以放在main()函数里面。这个看个人喜欢。
下面就重点讲下USBHIDKeyboard的枚举。参考了很多大神的作品,还是琢磨了很久才成功。这里就详细贴出来吧。
一、准备工作,硬件配置
1、NUCLEO-H503RB开发板套件;
2、PAJ7620U2手势识别小板:接线同课程2(I2C接口使用PB6/PB7);
3、Type-C线。
二、软件配置
在课程2的基础上,增加USBHIDKeyboard功能,I2C配置就不做过多说明。首先打开课程2的工程。
1、确认PAJ7620U2的I2C是否配置正确。
2、设置系统时基。
3、打开USB外设。
4、打开THREADX。
5、打开USBX。
6、设置中断。
7、确认系统时钟。
8、导出代码。
三、代码编写。
1、清除掉课程2中main()函数的PAJ7620U2相关代码,保留初始化,加入PAJ7620U2的.h/.c代码。
2、修改ux_device_keyboard.c代码。
1、定义hid_keyboard; UX_SLAVE_CLASS_HID *hid_keyboard; 2、修改VOID USBD_HID_Keyboard_Activate(VOID *hid_instance) /* USER CODE BEGIN USBD_HID_Keyboard_Activate */ //UX_PARAMETER_NOT_USED(hid_instance); hid_keyboard = (UX_SLAVE_CLASS_HID*)hid_instance; /* USER CODE END USBD_HID_Keyboard_Activate */
hid_keyboard定义会在device中用到,所以需要在头文件中声明。
3、修改app_usbx_device.c代码。
#include "usb.h" #include "paj7620u2.h" static TX_THREAD ux_hid_read_thread; static VOID usbx_hidkeyboard_thread_entry(ULONG thread_input); VOID USBX_APP_Device_Init(VOID);
在UINT MX_USBX_Device_Init(VOID *memory_ptr)和static VOID app_ux_device_thread_entry(ULONG thread_input)函数中增加代码。
/* Allocate the stack for usbx hid thread */ if (tx_byte_allocate(byte_pool, (VOID **) &pointer, 1024, TX_NO_WAIT) != TX_SUCCESS) { return TX_POOL_ERROR; } /* Create the usbx hid thread */ if (tx_thread_create(&ux_hid_read_thread, "hid_acm_read_usbx_app_thread_entry", usbx_hidkeyboard_thread_entry, 1, pointer, 1024, 20, 20, TX_NO_TIME_SLICE, TX_AUTO_START) != TX_SUCCESS) { return TX_THREAD_ERROR; } //TX_PARAMETER_NOT_USED(thread_input); //初始化USB设备 USBX_APP_Device_Init();
编写自定义函数:static VOID usbx_hidkeyboard_thread_entry(ULONG thread_input)。
/** * @brief 实现usbx hidkeyboard线程入口的函数 * @param 线程输入:用户线程输入参数 * @retval none */ static VOID usbx_hidkeyboard_thread_entry(ULONG thread_input) { /* USER CODE BEGIN app_ux_device_thread_entry */ UX_SLAVE_DEVICE *device; UX_SLAVE_CLASS_HID_EVENT hid_event; TX_PARAMETER_NOT_USED(thread_input); device = &_ux_system_slave->ux_system_slave_device; ux_utility_memory_set(&hid_event, 0, sizeof(UX_SLAVE_CLASS_HID_EVENT)); while(1) { /* Check if the device state already configured */ if((device->ux_slave_device_state == UX_DEVICE_CONFIGURED) && (hid_keyboard != UX_NULL)) { /* sleep for 10ms */ tx_thread_sleep(MS_TO_TICK(100)); hid_event.ux_device_class_hid_event_length = 8; hid_event.ux_device_class_hid_event_buffer[0] = 0; hid_event.ux_device_class_hid_event_buffer[1] = 0; uint16_t Gesture_Data = ReadGesture(); if(Gesture_Data != 0) { switch (Gesture_Data) { case PAJ_UP: hid_event.ux_device_class_hid_event_buffer[2] = 0x4B; break; //Keyboard PageUp case PAJ_DOWN: hid_event.ux_device_class_hid_event_buffer[2] = 0x4E; break; //Keyboard PageDown case PAJ_LEFT: hid_event.ux_device_class_hid_event_buffer[2] = 0x50; break; //Keyboard LeftArrow case PAJ_RIGHT: hid_event.ux_device_class_hid_event_buffer[2] = 0x4F; break; //Keyboard RightArrow case PAJ_FORWARD: hid_event.ux_device_class_hid_event_buffer[2] = 0x4A; break; //Keyboard Home case PAJ_BACKWARD: hid_event.ux_device_class_hid_event_buffer[2] = 0x4D; break; //Keyboard End case PAJ_CLOCKWISE: hid_event.ux_device_class_hid_event_buffer[2] = 0x3E; break; //Keyboard F5 case PAJ_ANTI_CLOCKWISE: hid_event.ux_device_class_hid_event_buffer[2] = 0x29; break; //Keyboard Esc case PAJ_WAVE: break; default: break; } ux_device_class_hid_event_set(hid_keyboard, &hid_event); }else { hid_event.ux_device_class_hid_event_buffer[2] = 0; ux_device_class_hid_event_set(hid_keyboard, &hid_event); } }else { /* sleep for 10ms */ tx_thread_sleep(MS_TO_TICK(10)); } HAL_Delay(100); HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5); } /* USER CODE END app_ux_device_thread_entry */ }
编写自定义函数:VOID USBX_APP_Device_Init(VOID)。
/** * @brief USBX初始化 * @param none * @retval none */ VOID USBX_APP_Device_Init(VOID) { /* USER CODE BEGIN USB_Device_Init_PreTreatment_0 */ /* USER CODE END USB_Device_Init_PreTreatment_0 */ /* initialize the device controller HAL driver */ MX_USB_PCD_Init(); /* USER CODE BEGIN USB_Device_Init_PreTreatment_1 */ HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x00, PCD_SNG_BUF, 0x14); HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x80, PCD_SNG_BUF, 0x54); HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x81, PCD_SNG_BUF, 0x94); HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x01, PCD_SNG_BUF, 0xD4); HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x82, PCD_SNG_BUF, 0x114); /* USER CODE END USB_Device_Init_PreTreatment_1 */ /* Initialize and link controller HAL driver */ ux_dcd_stm32_initialize((ULONG)USB_DRD_FS, (ULONG)&hpcd_USB_DRD_FS); /* Start the USB device */ HAL_PCD_Start(&hpcd_USB_DRD_FS); /* USER CODE BEGIN USB_Device_Init_PostTreatment */ /* USER CODE END USB_Device_Init_PostTreatment */ }
至此整个手势翻页笔代码已经完成。编译下载。
四、结果输出。
完结!共进!