Explorar o código

1、使用INCELL JD9366TC Driver IC,IIC address is 0xD0, coor address is 0x20021120, INT 下降沿触发
坐标上报的分辨率为800(X轴) x 1280(Y轴),默认为竖屏使用,物理尺寸为 1354 x 2166
byte0 is touch number, byte3 is X_H, byte4 is X_L, Byte5 is Y_H, Byte6 is Y_L, byte7 is weight/size, no Contact_Identifier.
第一点坐标固定存放在第一的位置,第二点坐标固定存放在第二位置,第一点抬起后第二点坐标不往前移动,空出来的位置坐标为0xff, weight/size 为 0, 根据手指数以及weight/size位变化来判断touch和leave, 以及分配ID号
读完坐标之后不用清除标志,自动进行下次坐标的读取,报点率大约在120hz
2、增加IIC功能,能对JD9366进行寻址、响应中断、读取坐标,IIC速率在500KHz左右
3、调整了data_ram和comm_ram的size大小,需要更多的data_ram

robbin hai 2 horas
pai
achega
53e443263b
Modificáronse 25 ficheiros con 2274 adicións e 1655 borrados
  1. 12 0
      driver/driver_gpio.c
  2. 2 0
      driver/driver_gpio.h
  3. 5 0
      header/include.h
  4. 92 0
      header/typedef.h
  5. BIN=BIN
      project/solution/ble_hid_composite/Output/bin/app.bin
  6. 469 842
      project/solution/ble_hid_composite/Output/bin/map.txt
  7. 2 0
      project/solution/ble_hid_composite/app/func.c
  8. 1 1
      project/solution/ble_hid_composite/app/func_wireless.c
  9. 188 95
      project/solution/ble_hid_composite/ble_hid_composite.cbp
  10. 810 0
      project/solution/ble_hid_composite/ble_hid_composite.depend
  11. 121 11
      project/solution/ble_hid_composite/ble_hid_composite.layout
  12. 2 0
      project/solution/ble_hid_composite/bsp/bsp_sys.c
  13. 2 2
      project/solution/ble_hid_composite/ram.ld
  14. 9 33
      project/solution/ble_hid_composite/touch/HidReport.c
  15. 1 1
      project/solution/ble_hid_composite/touch/IIC.c
  16. 490 0
      project/solution/ble_hid_composite/touch/JDTouch.c
  17. 0 354
      project/solution/ble_hid_composite/touch/MS928x_mpi.c
  18. 10 6
      project/solution/ble_hid_composite/touch/Touch.c
  19. 13 39
      project/solution/ble_hid_composite/touch/TouchCommon.c
  20. 42 0
      project/solution/ble_hid_composite/touch/include/JDTouch.h
  21. 0 218
      project/solution/ble_hid_composite/touch/include/MS928x.h
  22. 0 52
      project/solution/ble_hid_composite/touch/include/MS928x_mpi.h
  23. 1 0
      project/solution/ble_hid_composite/touch/include/TouchCommon.h
  24. 1 1
      project/solution/ble_hid_composite/touch/include/TouchConfig.h
  25. 1 0
      project/solution/ble_hid_composite/touch/include/TouchInclude.h

+ 12 - 0
driver/driver_gpio.c

@@ -203,6 +203,18 @@ uint8_t gpio_read_bit(gpio_typedef* gpiox, uint16_t gpio_pin)
     return bit_status;
 }
 
+AT(.com_periph.gpio.set_input)
+void gpio_set_input(gpio_typedef* gpiox, uint16_t gpio_pin)
+{
+    gpiox->dir |= gpio_pin;
+}
+
+AT(.com_periph.gpio.set_out)
+void gpio_set_out(gpio_typedef* gpiox, uint16_t gpio_pin)
+{
+    gpiox->dir &= ~gpio_pin;
+}
+
 /**
  * @brief  Configure GPIO function mapping.
  * @param  gpiox: where x can be (A.B) to select the GPIO peripheral.

+ 2 - 0
driver/driver_gpio.h

@@ -212,5 +212,7 @@ bool gpio_is_edge_pending(void);
 void gpio_edge_pending_clear(void);
 void gpio_edge_pic_config(isr_t isr, int pr);
 void gpio_edge_pic_disable(void);
+void gpio_set_input(gpio_typedef* gpiox, uint16_t gpio_pin);
+void gpio_set_out(gpio_typedef* gpiox, uint16_t gpio_pin);
 
 #endif  // _DRIVER_GPIO_H

+ 5 - 0
header/include.h

@@ -12,4 +12,9 @@
 //bsp头文件
 #include "bsp.h"
 
+#include "TouchInclude.h"
+
+ /******************************************************************************/
+/* Related macro definitions */
+
 #endif // _INCLUDE_H

+ 92 - 0
header/typedef.h

@@ -13,5 +13,97 @@ typedef signed long long s64, int64_t;
 
 typedef volatile unsigned long *psfr_t;
 
+#ifndef VOID
+#define VOID                    void
+#endif
+#ifndef CONST
+#define CONST                   const
+#endif
+#ifndef BOOL
+typedef unsigned char           BOOL;
+#endif
+#ifndef BOOLEAN
+typedef unsigned char           BOOLEAN;
+#endif
+#ifndef CHAR
+typedef char                    CHAR;
+#endif
+#ifndef INT8
+typedef char                    INT8;
+#endif
+#ifndef INT16
+typedef short                   INT16;
+#endif
+#ifndef INT32
+typedef long                    INT32;
+#endif
+#ifndef UINT8
+typedef unsigned char           UINT8;
+#endif
+#ifndef UINT16
+typedef unsigned short          UINT16;
+#endif
+#ifndef UINT32
+typedef unsigned long           UINT32;
+#endif
+#ifndef UINT8V
+typedef unsigned char volatile  UINT8V;
+#endif
+#ifndef UINT16V
+typedef unsigned short volatile UINT16V;
+#endif
+#ifndef UINT32V
+typedef unsigned long volatile  UINT32V;
+#endif
+
+#ifndef UINT8C
+typedef const unsigned char           UINT8C;
+#endif
+#ifndef UINT16C
+typedef const unsigned short          UINT16C;
+#endif
+#ifndef UINT32C
+typedef const unsigned long           UINT32C;
+#endif
+
+#ifndef PVOID
+typedef void                    *PVOID;
+#endif
+#ifndef PCHAR
+typedef char                    *PCHAR;
+#endif
+#ifndef PCHAR
+typedef const char              *PCCHAR;
+#endif
+#ifndef PINT8
+typedef char                    *PINT8;
+#endif
+#ifndef PINT16
+typedef short                   *PINT16;
+#endif
+#ifndef PINT32
+typedef long                    *PINT32;
+#endif
+#ifndef PUINT8
+typedef unsigned char           *PUINT8;
+#endif
+#ifndef PUINT16
+typedef unsigned short          *PUINT16;
+#endif
+#ifndef PUINT32
+typedef unsigned long           *PUINT32;
+#endif
+#ifndef PUINT8V
+typedef volatile unsigned char  *PUINT8V;
+#endif
+#ifndef PUINT16V
+typedef volatile unsigned short *PUINT16V;
+#endif
+#ifndef PUINT32V
+typedef volatile unsigned long  *PUINT32V;
+#endif
+
+#define TRUE    1
+#define FALSE   0
 
 #endif // _TYPEDEF_H

BIN=BIN
project/solution/ble_hid_composite/Output/bin/app.bin


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 469 - 842
project/solution/ble_hid_composite/Output/bin/map.txt


+ 2 - 0
project/solution/ble_hid_composite/app/func.c

@@ -38,6 +38,8 @@ void func_process(void)
 #endif
 
     prod_test_process();
+
+    touch_process();
 }
 
 //func common message process

+ 1 - 1
project/solution/ble_hid_composite/app/func_wireless.c

@@ -73,7 +73,7 @@ void func_wireless(void)
         func_wireless_process();
         if (bTransmitEn)
         {
-            func_wireless_message(msg_dequeue());
+            //func_wireless_message(msg_dequeue());
         }
     }
 

+ 188 - 95
project/solution/ble_hid_composite/ble_hid_composite.cbp

@@ -27,15 +27,16 @@
 			<Add directory="../../../libs/cpu" />
 			<Add directory="../../../libs/usb" />
 			<Add directory="../../../driver" />
-			<Add directory="../../../utils" />
 			<Add directory="../common" />
-			<Add directory="functions" />
-			<Add directory="modules/fota" />
-			<Add directory="modules/ble" />
-			<Add directory="modules/usb" />
-			<Add directory="modules/wireless" />
+			<Add directory="utils" />
+			<Add directory="app" />
+			<Add directory="fota" />
+			<Add directory="ble" />
+			<Add directory="usb" />
+			<Add directory="wireless" />
 			<Add directory="bsp" />
 			<Add directory="production_test" />
+			<Add directory="touch/include" />
 		</Compiler>
 		<Linker>
 			<Add option="-T$(TARGET_OBJECT_DIR)ram.o" />
@@ -45,7 +46,7 @@
 			<Add library="../../../libs/cpu/libm.a" />
 			<Add library="../../../libs/cpu/libc.a" />
 			<Add library="../../../libs/cpu/libgcc.a" />
-			<Add library="../../../libs/ble/wireless.a" />
+			<Add library="../../../libs/ble/libbtstack.a" />
 			<Add library="../../../libs/usb/libusb.a" />
 		</Linker>
 		<ExtraCommands>
@@ -169,14 +170,8 @@
 		<Unit filename="../../../libs/usb/api_usb.h" />
 		<Unit filename="../../../libs/usb/usb_define.h" />
 		<Unit filename="../../../libs/ver.h" />
-		<Unit filename="../../../utils/utils_debug_time.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="../../../utils/utils_debug_time.h" />
 		<Unit filename="../../../utils/utils_hid_usage.h" />
-		<Unit filename="../../../utils/utils_ring_buffer.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="../../../utils/utils_ring_buffer.h" />
 		<Unit filename="../common/common.h" />
 		<Unit filename="../common/hid_defines.h" />
@@ -192,6 +187,92 @@
 			<Option compile="1" />
 			<Option compiler="riscv32" use="1" buildCommand=" " />
 		</Unit>
+		<Unit filename="app/func.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func.h" />
+		<Unit filename="app/func_bt.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_bt.h" />
+		<Unit filename="app/func_idle.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_idle.h" />
+		<Unit filename="app/func_iodm.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_iodm.h" />
+		<Unit filename="app/func_le_bqb_rf.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_le_bqb_rf.h" />
+		<Unit filename="app/func_le_fcc.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_le_fcc.h" />
+		<Unit filename="app/func_lowpwr.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_lowpwr.h" />
+		<Unit filename="app/func_usbd.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_usbd.h" />
+		<Unit filename="app/func_wireless.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/func_wireless.h" />
+		<Unit filename="app/msg.h" />
+		<Unit filename="app/msg_bt.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_idle.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_iodm.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_le_bqb_rf.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_le_fcc.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_usbd.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="app/msg_wireless.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_client.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_client.h" />
+		<Unit filename="ble/ble_fota_service.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_fota_service.h" />
+		<Unit filename="ble/ble_hid_service.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_hid_service.h" />
+		<Unit filename="ble/ble_init.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_init.h" />
+		<Unit filename="ble/ble_proc.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_proc.h" />
+		<Unit filename="ble/ble_service.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_service.h" />
+		<Unit filename="ble/ble_user_service.c">
+			<Option compilerVar="CC" />
+		</Unit>
+		<Unit filename="ble/ble_user_service.h" />
 		<Unit filename="bsp/bsp.h" />
 		<Unit filename="bsp/bsp_charge.c">
 			<Option compilerVar="CC" />
@@ -244,161 +325,173 @@
 		<Unit filename="config.h" />
 		<Unit filename="config_define.h" />
 		<Unit filename="config_extra.h" />
-		<Unit filename="functions/func.c">
+		<Unit filename="fota/fota_proc.c">
 			<Option compilerVar="CC" />
 		</Unit>
+		<Unit filename="fota/fota_proc.h" />
 		<Unit filename="functions/func.h" />
-		<Unit filename="functions/func_bt.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_bt.h" />
-		<Unit filename="functions/func_idle.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_idle.h" />
-		<Unit filename="functions/func_iodm.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_iodm.h" />
-		<Unit filename="functions/func_le_bqb_rf.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_le_bqb_rf.h" />
-		<Unit filename="functions/func_le_fcc.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_le_fcc.h" />
-		<Unit filename="functions/func_lowpwr.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_lowpwr.h" />
-		<Unit filename="functions/func_wireless.c">
-			<Option compilerVar="CC" />
-		</Unit>
 		<Unit filename="functions/func_wireless.h" />
 		<Unit filename="functions/msg.h" />
-		<Unit filename="functions/msg_bt.c">
+		<Unit filename="main.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="functions/msg_idle.c">
+		<Unit filename="modules/ble/ble_client.h" />
+		<Unit filename="modules/ble/ble_fota_service.h" />
+		<Unit filename="modules/ble/ble_hid_service.h" />
+		<Unit filename="modules/ble/ble_init.h" />
+		<Unit filename="modules/ble/ble_proc.h" />
+		<Unit filename="modules/ble/ble_service.h" />
+		<Unit filename="modules/ble/ble_user_service.h" />
+		<Unit filename="modules/fota/fota_proc.h" />
+		<Unit filename="modules/usb/usb_audio.h" />
+		<Unit filename="modules/usb/usb_audio_desc.h" />
+		<Unit filename="modules/usb/usb_com.h" />
+		<Unit filename="modules/usb/usb_desc.h" />
+		<Unit filename="modules/usb/usb_dev_enum.h" />
+		<Unit filename="modules/usb/usb_hid.h" />
+		<Unit filename="modules/usb/usb_hid_desc.h" />
+		<Unit filename="modules/usb/usb_vendor.h" />
+		<Unit filename="modules/usb/usb_vendor_desc.h" />
+		<Unit filename="modules/wireless/wireless_client.h" />
+		<Unit filename="modules/wireless/wireless_cmd.h" />
+		<Unit filename="modules/wireless/wireless_init.h" />
+		<Unit filename="modules/wireless/wireless_service.h" />
+		<Unit filename="production_test/prod_test.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="functions/msg_iodm.c">
+		<Unit filename="production_test/prod_test.h" />
+		<Unit filename="production_test/prod_test_iodm.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="functions/msg_le_bqb_rf.c">
-			<Option compilerVar="CC" />
+		<Unit filename="production_test/prod_test_iodm.h" />
+		<Unit filename="ram.ld">
+			<Option compile="1" />
+			<Option compiler="riscv32-v2" use="1" buildCommand="$compiler $options $includes -E -P -x c -c $file -o $(TARGET_OBJECT_DIR)ram.o" />
+			<Option compiler="riscv32" use="1" buildCommand="$compiler $options $includes -E -P -x c -c $file -o $(TARGET_OBJECT_DIR)ram.o" />
 		</Unit>
-		<Unit filename="functions/msg_le_fcc.c">
+		<Unit filename="res.h" />
+		<Unit filename="strong_symbol.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="functions/msg_wireless.c">
+		<Unit filename="touch/AutoTest.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="main.c">
+		<Unit filename="touch/BerlinTouch.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_client.c">
+		<Unit filename="touch/Gesture.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_client.h" />
-		<Unit filename="modules/ble/ble_fota_service.c">
+		<Unit filename="touch/GoodixTouch.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_fota_service.h" />
-		<Unit filename="modules/ble/ble_hid_service.c">
+		<Unit filename="touch/HidReport.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_hid_service.h" />
-		<Unit filename="modules/ble/ble_init.c">
+		<Unit filename="touch/IIC.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_init.h" />
-		<Unit filename="modules/ble/ble_proc.c">
+		<Unit filename="touch/JDTouch.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_proc.h" />
-		<Unit filename="modules/ble/ble_service.c">
+		<Unit filename="touch/Touch.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_service.h" />
-		<Unit filename="modules/ble/ble_user_service.c">
+		<Unit filename="touch/TouchCommon.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/ble/ble_user_service.h" />
-		<Unit filename="modules/fota/fota_proc.c">
+		<Unit filename="touch/TouchConfig.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/fota/fota_proc.h" />
-		<Unit filename="modules/usb/usb_audio.c">
+		<Unit filename="touch/include/AutoTest.h" />
+		<Unit filename="touch/include/BerlinTouch.h" />
+		<Unit filename="touch/include/Gesture.h" />
+		<Unit filename="touch/include/GoodixTouch.h" />
+		<Unit filename="touch/include/HidReport.h" />
+		<Unit filename="touch/include/IIC.h" />
+		<Unit filename="touch/include/JDTouch.h" />
+		<Unit filename="touch/include/Touch.h" />
+		<Unit filename="touch/include/TouchCommon.h" />
+		<Unit filename="touch/include/TouchConfig.h" />
+		<Unit filename="touch/include/TouchInclude.h" />
+		<Unit filename="touch/include/commlib.h" />
+		<Unit filename="touch/include/mst_typedef.h" />
+		<Unit filename="touch/include/pipe.h" />
+		<Unit filename="touch/include/tmos.h" />
+		<Unit filename="touch/include/typedef.h" />
+		<Unit filename="touch/pipe.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_audio.h" />
-		<Unit filename="modules/usb/usb_audio_desc.c">
+		<Unit filename="touch/tmos.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_audio_desc.h" />
-		<Unit filename="modules/usb/usb_com.c">
+		<Unit filename="usb/usb_audio.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_com.h" />
-		<Unit filename="modules/usb/usb_desc.c">
+		<Unit filename="usb/usb_audio.h" />
+		<Unit filename="usb/usb_audio_desc.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_desc.h" />
-		<Unit filename="modules/usb/usb_dev_enum.c">
+		<Unit filename="usb/usb_audio_desc.h" />
+		<Unit filename="usb/usb_com.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_dev_enum.h" />
-		<Unit filename="modules/usb/usb_hid.c">
+		<Unit filename="usb/usb_com.h" />
+		<Unit filename="usb/usb_desc.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_hid.h" />
-		<Unit filename="modules/usb/usb_hid_desc.c">
+		<Unit filename="usb/usb_desc.h" />
+		<Unit filename="usb/usb_dev_enum.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_hid_desc.h" />
-		<Unit filename="modules/usb/usb_vendor.c">
+		<Unit filename="usb/usb_dev_enum.h" />
+		<Unit filename="usb/usb_hid.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_vendor.h" />
-		<Unit filename="modules/usb/usb_vendor_desc.c">
+		<Unit filename="usb/usb_hid.h" />
+		<Unit filename="usb/usb_hid_desc.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/usb/usb_vendor_desc.h" />
-		<Unit filename="modules/wireless/wireless_client.c">
+		<Unit filename="usb/usb_hid_desc.h" />
+		<Unit filename="usb/usb_vendor.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/wireless/wireless_client.h" />
-		<Unit filename="modules/wireless/wireless_cmd.c">
+		<Unit filename="usb/usb_vendor.h" />
+		<Unit filename="usb/usb_vendor_desc.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/wireless/wireless_cmd.h" />
-		<Unit filename="modules/wireless/wireless_init.c">
+		<Unit filename="usb/usb_vendor_desc.h" />
+		<Unit filename="utils/utils_debug_time.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/wireless/wireless_init.h" />
-		<Unit filename="modules/wireless/wireless_service.c">
+		<Unit filename="utils/utils_debug_time.h" />
+		<Unit filename="utils/utils_hid_usage.h" />
+		<Unit filename="utils/utils_ring_buffer.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="modules/wireless/wireless_service.h" />
-		<Unit filename="production_test/prod_test.c">
+		<Unit filename="utils/utils_ring_buffer.h" />
+		<Unit filename="wireless/wireless_client.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="production_test/prod_test.h" />
-		<Unit filename="production_test/prod_test_iodm.c">
+		<Unit filename="wireless/wireless_client.h" />
+		<Unit filename="wireless/wireless_cmd.c">
 			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="production_test/prod_test_iodm.h" />
-		<Unit filename="ram.ld">
-			<Option compile="1" />
-			<Option compiler="riscv32-v2" use="1" buildCommand="$compiler $options $includes -E -P -x c -c $file -o $(TARGET_OBJECT_DIR)ram.o" />
-			<Option compiler="riscv32" use="1" buildCommand="$compiler $options $includes -E -P -x c -c $file -o $(TARGET_OBJECT_DIR)ram.o" />
+		<Unit filename="wireless/wireless_cmd.h" />
+		<Unit filename="wireless/wireless_init.c">
+			<Option compilerVar="CC" />
 		</Unit>
-		<Unit filename="res.h" />
-		<Unit filename="strong_symbol.c">
+		<Unit filename="wireless/wireless_init.h" />
+		<Unit filename="wireless/wireless_service.c">
 			<Option compilerVar="CC" />
 		</Unit>
+		<Unit filename="wireless/wireless_service.h" />
 		<Unit filename="xcfg.h" />
 		<Extensions>
 			<code_completion />

+ 810 - 0
project/solution/ble_hid_composite/ble_hid_composite.depend

@@ -655,3 +655,813 @@
 	"include.h"
 	"driver_uart.h"
 
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_adv_timer.c
+	"driver_adv_timer.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_adv_timer.h
+	"driver_com.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_com.h
+	"global.h"
+	"api.h"
+	"driver_clk.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\header\global.h
+	<stddef.h>
+	<stdarg.h>
+	<stdbool.h>
+	<stdlib.h>
+	<string.h>
+	"typedef.h"
+	"macro.h"
+	"clib.h"
+	"sfr.h"
+
+1763970496 d:\wingcool\wingcool\hh101\ab202x\header\typedef.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\header\macro.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\header\clib.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\header\sfr.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\api.h
+	"api_interrupt.h"
+	"api_btstack.h"
+	"api_wireless.h"
+	"api_cm.h"
+	"api_update.h"
+	"api_sysclk.h"
+	"api_msg.h"
+	"api_sys.h"
+	"api_pwr.h"
+	"api_key.h"
+	"api_list.h"
+	"api_sdadc.h"
+	"api_codec.h"
+	"api_usb.h"
+	"api_device.h"
+	"api_os.h"
+	"ver.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_interrupt.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\ble\api_btstack.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\ble\api_wireless.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_cm.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_update.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_sysclk.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_msg.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_sys.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_pwr.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_key.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_list.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_sdadc.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_codec.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\usb\api_usb.h
+	"usb_define.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\usb\usb_define.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\usb\api_device.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\cpu\api_os.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\libs\ver.h
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_clk.h
+	"global.h"
+	"api.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_charge.c
+	"driver_charge.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_charge.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_clk.c
+	"driver_clk.h"
+
+1763970732 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_gpio.c
+	"driver_gpio.h"
+
+1763970750 d:\wingcool\wingcool\hh101\ab202x\driver\driver_gpio.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_hsuart.c
+	"driver_hsuart.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_hsuart.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_iic.c
+	"driver_iic.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_iic.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_irrx.c
+	"driver_ir.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_ir.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_irtx.c
+	"driver_ir.h"
+	"driver_gpio.h"
+	"macro.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_keyscan.c
+	"driver_keyscan.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_keyscan.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_ledc.c
+	"driver_ledc.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_ledc.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_lowpwr.c
+	"driver_gpio.h"
+	"driver_saradc.h"
+	"driver_lowpwr.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_saradc.h
+	"driver_com.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_lowpwr.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_lpwm.c
+	"driver_lpwm.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_lpwm.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_qdec.c
+	"driver_qdec.h"
+	"driver_clk.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_qdec.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_rtc.c
+	"driver_rtc.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_rtc.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_saradc.c
+	"driver_saradc.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_sdadc.c
+	"driver_sdadc.h"
+	"driver_clk.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_sdadc.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_sddac.c
+	"driver_sddac.h"
+	"driver_clk.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_sddac.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_spi.c
+	"driver_spi.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_spi.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_tmr.c
+	"driver_tmr.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_tmr.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_touch_key.c
+	"driver_touch_key.h"
+	"driver_gpio.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_touch_key.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_uart.c
+	"driver_uart.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_uart.h
+	"driver_com.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\driver\driver_wdt.c
+	"driver_wdt.h"
+
+1763952330 d:\wingcool\wingcool\hh101\ab202x\driver\driver_wdt.h
+	"driver_com.h"
+
+1764124027 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func.c
+	"include.h"
+	"fota_proc.h"
+	"usb_com.h"
+	"usb_audio.h"
+	"usb_hid.h"
+	"usb_vendor.h"
+	"utils_hid_usage.h"
+	"wireless_client.h"
+
+1763970510 d:\wingcool\wingcool\hh101\ab202x\header\include.h
+	"global.h"
+	"xcfg.h"
+	"config.h"
+	"api.h"
+	"bsp.h"
+	"TouchInclude.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\xcfg.h
+
+1763987084 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\config.h
+	"config_define.h"
+	"config_extra.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\config_define.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\config_extra.h
+
+1763957321 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp.h
+	"bsp_param.h"
+	"bsp_sys.h"
+	"ble_service.h"
+	"wireless_cmd.h"
+	"ble_init.h"
+	"ble_proc.h"
+	"wireless_init.h"
+	"wireless_client.h"
+	"bsp_uart_debug.h"
+	"bsp_saradc.h"
+	"bsp_saradc_vbat.h"
+	"bsp_key.h"
+	"bsp_charge.h"
+	"bsp_huart_iodm.h"
+	"func.h"
+	"msg.h"
+	"prod_test.h"
+	"common.h"
+	"hid_defines.h"
+
+1763966998 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_param.h
+
+1763954709 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_sys.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_service.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_cmd.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_init.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_proc.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_init.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_client.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_uart_debug.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc_vbat.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_key.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_charge.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_huart_iodm.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func.h
+	"func_bt.h"
+	"func_le_fcc.h"
+	"func_le_bqb_rf.h"
+	"func_iodm.h"
+	"func_idle.h"
+	"func_lowpwr.h"
+	"func_wireless.h"
+	"func_usbd.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_bt.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_le_fcc.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_le_bqb_rf.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_iodm.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_idle.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_lowpwr.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_wireless.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_usbd.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\production_test\prod_test.h
+
+1763957142 d:\wingcool\wingcool\hh101\ab202x\project\solution\common\common.h
+
+1763957142 d:\wingcool\wingcool\hh101\ab202x\project\solution\common\hid_defines.h
+
+1763976836 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\touchinclude.h
+	"TouchConfig.h"
+	"typedef.h"
+	"tmos.h"
+	"pipe.h"
+	"TouchCommon.h"
+	"IIC.h"
+	"AutoTest.h"
+	"HidReport.h"
+	"GoodixTouch.h"
+	"BerlinTouch.h"
+	"JDTouch.h"
+	"Touch.h"
+
+1763973009 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\touchconfig.h
+	"typedef.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\typedef.h
+
+1721957262 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\tmos.h
+	"typedef.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\pipe.h
+	"HidReport.h"
+	"typedef.h"
+
+1739437268 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\hidreport.h
+	"TouchCommon.h"
+	"typedef.h"
+
+1764125087 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\touchcommon.h
+	"typedef.h"
+	"TouchConfig.h"
+	"global.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\iic.h
+	"typedef.h"
+	"driver_gpio.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\autotest.h
+	"typedef.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\goodixtouch.h
+	"typedef.h"
+
+1763974578 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\berlintouch.h
+	"typedef.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\touch.h
+	"typedef.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\fota\fota_proc.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_com.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_audio.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_hid.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_vendor.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\utils\utils_hid_usage.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_bt.c
+	"include.h"
+	"func.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_idle.c
+	"include.h"
+	"func.h"
+	"func_idle.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_iodm.c
+	"include.h"
+	"func.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_le_bqb_rf.c
+	"include.h"
+	"func.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_le_fcc.c
+	"include.h"
+	"func.h"
+
+1763958827 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_lowpwr.c
+	"include.h"
+	"driver_lowpwr.h"
+	"driver_gpio.h"
+	"ble_user_service.h"
+	"bsp_io_key.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_user_service.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_io_key.h
+	"driver_gpio.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_usbd.c
+	"include.h"
+	"func.h"
+	"usb_com.h"
+	"usb_hid.h"
+	"usb_audio.h"
+	"usb_vendor.h"
+
+1764067907 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\func_wireless.c
+	"include.h"
+	"func.h"
+	"wireless_service.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_service.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_bt.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_idle.c
+	"include.h"
+	"func.h"
+	"func_idle.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_iodm.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_le_bqb_rf.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_le_fcc.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_usbd.c
+	"include.h"
+
+1763953985 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\app\msg_wireless.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_client.c
+	"include.h"
+	"ble_client.h"
+	"ble_user_service.h"
+	"ble_hid_service.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_client.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_hid_service.h
+	"typedef.h"
+	"macro.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_fota_service.c
+	"include.h"
+	"fota_proc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_hid_service.c
+	"include.h"
+	"utils_hid_usage.h"
+	"ble_hid_service.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_init.c
+	"include.h"
+	"wireless_service.h"
+	"ble_client.h"
+
+1763956678 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_proc.c
+	"include.h"
+	"ble_user_service.h"
+	"ble_hid_service.h"
+	"ble_fota_service.h"
+	"wireless_service.h"
+	"fota_proc.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_fota_service.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_service.c
+	"include.h"
+	"ble_service.h"
+	"ble_user_service.h"
+	"ble_hid_service.h"
+	"ble_fota_service.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ble\ble_user_service.c
+	"include.h"
+	"ble_service.h"
+	"ble_user_service.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_charge.c
+	"include.h"
+	"driver_charge.h"
+	"bsp_charge.h"
+	"bsp_saradc_vbat.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_huart.c
+	"include.h"
+	"bsp_huart.h"
+	"api.h"
+	"driver_com.h"
+	"driver_hsuart.h"
+	"ble_init.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_huart.h
+	"driver_gpio.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_huart_iodm.c
+	"include.h"
+	"bsp_huart_iodm.h"
+	"driver_hsuart.h"
+	"prod_test_iodm.h"
+	"driver_gpio.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\production_test\prod_test_iodm.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_io_key.c
+	"include.h"
+	"bsp_io_key.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_key.c
+	"include.h"
+	"driver_com.h"
+	"bsp_saradc_key.h"
+	"bsp_io_key.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc_key.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_param.c
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc.c
+	"include.h"
+	"driver_saradc.h"
+	"bsp_saradc.h"
+	"bsp_saradc_vbat.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc_key.c
+	"include.h"
+	"driver_saradc.h"
+	"bsp_saradc_key.h"
+	"bsp_key.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_saradc_vbat.c
+	"include.h"
+	"driver_saradc.h"
+	"bsp_saradc_vbat.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_sddac.c
+	"include.h"
+	"driver_gpio.h"
+	"driver_sddac.h"
+	"bsp_sddac.h"
+	"utils_ring_buffer.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_sddac.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\utils\utils_ring_buffer.h
+
+1763972328 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_sys.c
+	"include.h"
+	"driver_lowpwr.h"
+	"bsp_saradc_key.h"
+	"usb_com.h"
+	"usb_hid.h"
+	"usb_audio.h"
+	"usb_vendor.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\bsp\bsp_uart_debug.c
+	"include.h"
+	"driver_gpio.h"
+	"driver_uart.h"
+	"bsp_uart_debug.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\fota\fota_proc.c
+	"include.h"
+	"fota_proc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\main.c
+	"include.h"
+	"driver_lowpwr.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\production_test\prod_test.c
+	"include.h"
+	"prod_test_iodm.h"
+	"prod_test.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\production_test\prod_test_iodm.c
+	"include.h"
+	"prod_test_iodm.h"
+	"bsp_huart_iodm.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\strong_symbol.c
+	"include.h"
+	"driver_uart.h"
+
+1721613776 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\autotest.c
+	"TouchInclude.h"
+
+1739442458 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\berlintouch.c
+	"typedef.h"
+	"TouchInclude.h"
+
+1739442458 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\gesture.c
+	"TouchInclude.h"
+
+1739442458 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\goodixtouch.c
+	"include.h"
+
+1764066656 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\hidreport.c
+	"typedef.h"
+	"TouchInclude.h"
+	"usb_hid.h"
+	"usb_desc.h"
+	"api.h"
+	"ble_hid_service.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_desc.h
+	"usb_hid_desc.h"
+	"usb_audio_desc.h"
+	"usb_vendor_desc.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_hid_desc.h
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_audio_desc.h
+	"include.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_vendor_desc.h
+
+1764125087 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\iic.c
+	"TouchCommon.h"
+	"iic.h"
+	"driver_gpio.h"
+
+1721636668 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\pipe.c
+	"pipe.h"
+	"hidreport.h"
+	"api.h"
+
+1721965682 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\tmos.c
+	"include.h"
+	"typedef.h"
+	"tmos.h"
+	"string.h"
+	"driver_tmr.h"
+
+1764125087 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\touchcommon.c
+	"include.h"
+	"TouchCommon.h"
+	"TouchConfig.h"
+	"pipe.h"
+	"iic.h"
+	"Gesture.h"
+	"GoodixTouch.h"
+	"BerlinTouch.h"
+	"JDTouch.h"
+	"HidReport.h"
+	"tmos.h"
+	"driver_gpio.h"
+
+1721613776 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\gesture.h
+	"typedef.h"
+
+1739442458 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\touchconfig.c
+	"TouchConfig.h"
+	<string.h>
+	"TouchCommon.h"
+	"HidReport.h"
+	"bsp_param.h"
+	"api.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_audio.c
+	"include.h"
+	"driver_sddac.h"
+	"usb_audio.h"
+	"usb_com.h"
+	"usb_audio_desc.h"
+	"bsp_sddac.h"
+	"utils_ring_buffer.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_audio_desc.c
+	"include.h"
+	"usb_com.h"
+	"usb_desc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_com.c
+	"include.h"
+	"usb_com.h"
+	"usb_dev_enum.h"
+	"usb_hid.h"
+	"usb_audio.h"
+	"usb_vendor.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_dev_enum.h
+	"include.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_desc.c
+	"include.h"
+	"usb_com.h"
+	"usb_desc.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\output\bin\app.xm
+	"config.h"
+
+1763952330 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\output\bin\download.xm
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\output\bin\xcfg.xm
+
+1763974719 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\ram.ld
+	"config.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_dev_enum.c
+	"include.h"
+	"usb_com.h"
+	"usb_desc.h"
+	"usb_hid.h"
+	"usb_vendor.h"
+	"usb_audio.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_hid.c
+	"include.h"
+	"usb_com.h"
+	"usb_hid.h"
+	"usb_hid_desc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_hid_desc.c
+	"include.h"
+	"usb_desc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_vendor.c
+	"include.h"
+	"usb_com.h"
+	"usb_hid.h"
+	"usb_vendor.h"
+	"usb_vendor_desc.h"
+	"fota_proc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\usb\usb_vendor_desc.c
+	"include.h"
+	"usb_desc.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\utils\utils_debug_time.c
+	"include.h"
+	"utils_debug_time.h"
+	"driver_rtc.h"
+
+1763952331 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\utils\utils_debug_time.h
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\utils\utils_ring_buffer.c
+	"include.h"
+	"utils_ring_buffer.h"
+
+1763969090 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_client.c
+	"include.h"
+	"wireless_client.h"
+	"wireless_init.h"
+	"usb_audio.h"
+	"usb_hid.h"
+	"usb_vendor.h"
+	"utils_ring_buffer.h"
+
+1763952331 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_cmd.c
+	"include.h"
+	"wireless_cmd.h"
+	"wireless_service.h"
+	"fota_proc.h"
+
+1763955826 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_init.c
+	"include.h"
+	"wireless_client.h"
+	"wireless_service.h"
+
+1763957614 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\wireless\wireless_service.c
+	"include.h"
+	"ble_init.h"
+	"ble_service.h"
+	"wireless_service.h"
+	"wireless_cmd.h"
+	"utils_ring_buffer.h"
+
+1763976836 d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\include\jdtouch.h
+	"typedef.h"
+
+1763973268 source:d:\wingcool\wingcool\hh101\ab202x\project\solution\ble_hid_composite\touch\touch.c
+	"include.h"
+	"GoodixTouch.h"
+	"HidReport.h"
+	"usb_com.h"
+

+ 121 - 11
project/solution/ble_hid_composite/ble_hid_composite.layout

@@ -2,34 +2,144 @@
 <CodeBlocks_layout_file>
 	<FileVersion major="1" minor="0" />
 	<ActiveTarget name="Debug" />
-	<File name="bsp\bsp_param.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="main.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2577" topLine="90" />
+			<Cursor1 position="418" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="Output\bin\app.xm" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\..\driver\driver_charge.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="420" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="wireless\wireless_service.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="75" />
+		</Cursor>
+	</File>
+	<File name="touch\Gesture.c" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="6605" topLine="208" />
+		</Cursor>
+	</File>
+	<File name="..\..\..\header\macro.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="689" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="..\..\..\header\include.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="208" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="touch\include\IIC.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="591" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="touch\include\JDTouch.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1370" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="Output\bin\app.xm" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
 			<Cursor1 position="373" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="config.h" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="bsp\bsp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="78" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="touch\BerlinTouch.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="9815" topLine="365" />
+		</Cursor>
+	</File>
+	<File name="app\func.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2323" topLine="92" />
+		</Cursor>
+	</File>
+	<File name="..\..\..\driver\driver_lowpwr.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="109" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="config.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="8960" topLine="103" />
+		</Cursor>
+	</File>
+	<File name="modules\ble\ble_hid_service.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="138" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="wireless\wireless_client.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="410" topLine="15" />
+		</Cursor>
+	</File>
+	<File name="touch\IIC.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="4354" topLine="0" />
+		</Cursor>
+	</File>
+	<File name="bsp\bsp_param.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="2577" topLine="81" />
+		</Cursor>
+	</File>
+	<File name="wireless\wireless_init.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="0" topLine="62" />
+		</Cursor>
+	</File>
+	<File name="touch\HidReport.c" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1244" topLine="24" />
+		</Cursor>
+	</File>
+	<File name="touch\JDTouch.c" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3358" topLine="53" />
+		</Cursor>
+	</File>
+	<File name="bsp\bsp_sys.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="6085" topLine="244" />
+		</Cursor>
+	</File>
+	<File name="bsp\bsp_param.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="1810" topLine="8" />
+		</Cursor>
+	</File>
+	<File name="ram.ld" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+		<Cursor>
+			<Cursor1 position="3143" topLine="139" />
+		</Cursor>
+	</File>
+	<File name="touch\TouchCommon.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="8357" topLine="106" />
+			<Cursor1 position="7382" topLine="282" />
 		</Cursor>
 	</File>
-	<File name="modules\ble\ble_init.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="..\..\..\driver\driver_clk.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2225" topLine="64" />
+			<Cursor1 position="2067" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="bsp\bsp_param.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="touch\include\TouchInclude.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1810" topLine="17" />
+			<Cursor1 position="295" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="modules\ble\ble_user_service.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="touch\GoodixTouch.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1279" topLine="31" />
+			<Cursor1 position="3142" topLine="89" />
 		</Cursor>
 	</File>
 </CodeBlocks_layout_file>

+ 2 - 0
project/solution/ble_hid_composite/bsp/bsp_sys.c

@@ -253,6 +253,8 @@ void bsp_sys_init(void)
     usb_device_init();
 #endif // USB_EN
 
+    touch_init();
+
     func_cb.sta = FUNC_WIRELESS;
 
     printf("%s, %d\n",__func__, func_cb.sta);

+ 2 - 2
project/solution/ble_hid_composite/ram.ld

@@ -8,8 +8,8 @@ __max_flash_size = FLASH_CODE_SIZE;
 __base = 0x10000000;
 
 // Define program ram size (* SUM: 61KB *)
-__data_ram_size     = 11k;
-__comm_ram_size     = 18k;
+__data_ram_size     = 15k;
+__comm_ram_size     = 14k;
 __commEx_ram_size   = COMM_EX_SIZE;
 __bram_ram_size     = 32k;
 

+ 9 - 33
project/solution/ble_hid_composite/touch/HidReport.c

@@ -12,7 +12,7 @@
 #include "usb_desc.h"
 #include "api.h"
 #include "ble_hid_service.h"
-#include "app_hid_event.h"
+//#include "app_hid_event.h"
 
 //#pragma  NOAREGS
 #define FLASH_Base   0x08004000
@@ -30,11 +30,11 @@ PACKAGE_INFO PackageInfo;
 UINT32 wReadAddress;
 UINT16 wReadLen;
 BOOL IsDebugMode;
-BOOL DisableDigiterInterface;
+BOOL DisableDigiterInterface = 0;
 
 BOOL OutDebugMode;
 UINT8 PenToFinger = 0;
-UINT8 const Version[] = VERSION;
+//UINT8 const Version[] = VERSION;
 UINT8 print_log = 1;
 BOOL ReportExtInfoEn = 0;
 
@@ -208,13 +208,13 @@ UINT8 Absolute_Up_Pack( POINTER * pTP)
           {
             memcpy(&USBFS_EP1_Buf[DEF_USB_EP1_FS_SIZE], TxBuff, 10);
             //RF_Enqueue(1, RF_PACKAGE_REPORT, PACKAGE_RAM_SIZE + 10, Ep1Buffer);
-            wireless_send_test(DEF_USB_EP1_FS_SIZE + 10, USBFS_EP1_Buf);
+            //wireless_send_test(DEF_USB_EP1_FS_SIZE + 10, USBFS_EP1_Buf);
           }
           else
         #endif
           {
             //RF_Enqueue(1, RF_PACKAGE_REPORT, offset, Ep1Buffer);
-            wireless_send_test(offset, USBFS_EP1_Buf);
+            //wireless_send_test(offset, USBFS_EP1_Buf);
           }
         }
         else if(UsbReportPosEn)  //usb
@@ -725,7 +725,7 @@ void CommandHandle( void )
         {
           case GET_VERSION:
           {
-            memcpy(PackageInfo.buf + 65, Version, sizeof(Version));
+            //memcpy(PackageInfo.buf + 65, Version, sizeof(Version));
             //printf( "GET_VERSION!\r\n" );
 
             break;
@@ -746,32 +746,8 @@ void CommandHandle( void )
           }
           case GET_TOUCH_CHIP_INFO:
           {
-    //            if(ChipType==CHIP_TYPE_FT5XXX)
-    //            {
-    //                UINT8 ChipIdVer[3];
-    //                if(PackageInfo[QueueHead].address == 0xA6)
-    //                {
-    //                  if(FT_Get_FW_Ver(ChipIdVer))
-    //                  {
-    //                    sprintf(PackageInfo[QueueHead].buf + 65, "FT%02X%02X_v%02X", ChipIdVer[0], ChipIdVer[1], ChipIdVer[2]);
-    //                  }
-    //                }
-    //                else if(PackageInfo[QueueHead].address == 0x95)
-    //                {
-    //                  PackageInfo[QueueHead].buf[65] = FT_MAX_X>>8;
-    //                  PackageInfo[QueueHead].buf[66] = FT_MAX_X;
-    //                  PackageInfo[QueueHead].buf[67] = FT_MAX_Y>>8;
-    //                  PackageInfo[QueueHead].buf[68] = FT_MAX_Y;
-    //                }
-    //            }
-    //            else if(ChipType== CHIP_TYPE_79XX)
-    //             {
-    //               Ret =  BT_RD_Reg(PackageInfo[QueueHead].address, PackageInfo[QueueHead].buf + 65, PackageInfo[QueueHead].len);
-    //             }
-    //            else
-            {
-              Ret =  IICReadBytes(PackageInfo.address, PackageInfo.buf + 65, PackageInfo.len);
-            }
+            Ret =  IICReadBytes(PackageInfo.address, PackageInfo.buf + 65, PackageInfo.len);
+
             break;
           }
 
@@ -963,7 +939,7 @@ void CommandHandle( void )
 	}
 
 
-	if(OutDebugMode && ChipType!=CHIP_TYPE_FT5XXX)
+	if(OutDebugMode)
 	{
 		UINT8 tmp[2] = {0,0};
 

+ 1 - 1
project/solution/ble_hid_composite/touch/IIC.c

@@ -188,7 +188,7 @@ BOOL GT_Check_I2C_Address(UINT8 Address)
 
 BOOL  WriteAddress(UINT32 dwAddr)
 {
-   if(isBerlinSeries)
+   if(isBerlinSeries || bIsJDSeries)
    {
       IIC_WRITE_DATA((UINT8)(dwAddr>>24) );
 

+ 490 - 0
project/solution/ble_hid_composite/touch/JDTouch.c

@@ -0,0 +1,490 @@
+/********************************** (C) COPYRIGHT *******************************
+* File Name          : JD9366.c
+* Author             : Wngcool
+* Version            : V1.0
+* Date               : 2025/11/24
+* Description        : 对JD9366(incell)的操作
+*******************************************************************************/
+
+
+/*********************************************************************
+ * INCLUDES
+ */
+#include "typedef.h"
+#include "TouchInclude.h"
+
+#define READ_TOUCH_POS_EVT                  0x0001
+#define READ_RESET_TOUCH_IC_EVT             0x0002
+#define SYS_INIT_FINISH_EVT                 0x0004
+#define RELEASE_TOUCH_EVT                   0x0008
+#define READ_ONE_POINT_EVT                  0x0010
+#define START_REPORT_POS_EVT                0x0020
+#define CHECK_TOUCH_INT_EVT                 0x0040
+#define REPORT_AGAIN_EVT                    0x0080
+#define CHECK_ESD_EVT                       0x0100
+#define HID_DEBUG_EVT                       0x0200
+#define CHECK_USB_STATUS_EVT                0x0400
+
+#define PERIO_1s 1600
+#define PERIO_2s (PERIO_1s*2)
+#define PERIO_5s (PERIO_1s*5)
+#define PERIO_40s (PERIO_1s*40)
+
+
+#pragma pack(1)
+typedef struct{
+    UINT8 rom_pid[6];               /* rom PID */
+    UINT8 rom_vid[3];               /* Mask VID */
+    UINT8 rom_vid_reserved;
+    UINT8 patch_pid[8];              /* Patch PID */
+    UINT8 patch_vid[4];              /* Patch VID */
+    UINT8 patch_vid_reserved;
+    UINT8 sensor_id;
+    UINT8 reserved[2];
+    UINT16 checksum;
+}ST_FW_VERSION;
+
+static UINT8 IICTouchTaskId = INVALID_TASK_ID;
+static UINT8 PointNum = 0;
+static UINT8 ReadPointCnt = 0;
+static BOOL ReportPosSuccess = TRUE;
+static UINT8 ReadPointIndexCnt = 0;
+static void ReadOnePoint(void);
+static void CheckTouchINT(void);
+static void StartReportPos(void);
+static void ReportPos(void);
+static UINT16 IICTouch_ProcessEvent( UINT8 task_id, UINT16 events );
+//static void BT_Check_ESD();
+
+#ifdef MOUSE_REPORT
+  #ifndef GESTURE
+  extern UINT8 mouse_right_click_time;
+  #endif
+#ifndef GESTURE
+  extern void ReportMousePos(POINTER * pTP);
+#else
+  void ReportMousePos(POINTER * pTP, UINT8 interface);
+#endif
+#endif
+
+static UINT32 lJDRegAddr;
+static BOOL SysInitFinish = FALSE;
+extern BOOL SleepEn;
+/*******************************************************************************
+* Function Name  : JD_WR_Reg
+* Description    : 向GT911写入一次数据
+* Input          : reg:起始寄存器地址
+                   buf:数据缓缓存区
+                   len:写数据长度
+* Output         : None
+* Return         : 0,成功;1,失败.
+*******************************************************************************/
+__attribute__((section(".highcode")))
+UINT8 JD_WR_Reg(UINT32 reg,UINT8 *buf,UINT8 len)
+{
+    return IICWriteBytes(reg,buf,len);
+}
+
+///*******************************************************************************
+//* Function Name  : JD_RD_Reg
+//* Description    : 从GT911读出一次数据
+//* Input          : reg:起始寄存器地址
+//                   buf:数据缓缓存区
+//                   len:读数据长度
+//* Output         : None
+//* Return         : None
+//*******************************************************************************/
+//__attribute__((section(".highcode")))
+UINT8 JD_RD_Reg(UINT32 reg, UINT8 *buf,UINT8 len)
+{
+    return IICReadBytes(reg, buf, len);
+}
+
+/*******************************************************************************
+* Function Name  : JD_Init
+* Description    : 触摸板初始化,获取ID,确认是否工作
+* Input          : None
+* Output         : None
+* Return         : None
+*******************************************************************************/
+void JD_Init()
+{
+    TouchProc = CheckTouchINT;
+
+    CheckPos = MAX_POINT;
+
+    if (IICTouchTaskId == INVALID_TASK_ID)
+    {
+      IICTouchTaskId = TMOS_ProcessEventRegister(IICTouch_ProcessEvent);
+      tmos_set_event(IICTouchTaskId, HID_DEBUG_EVT);
+    }
+
+    //tmos_start_task(IICTouchTaskId, CHECK_ESD_EVT, PERIO_2s );
+    tmos_start_task(IICTouchTaskId, SYS_INIT_FINISH_EVT, PERIO_40s );
+
+    PRINT("sys init\n");
+}
+
+/*
+static void BT_Check_ESD()
+{
+
+  UINT32 reg_addr = 0x10170;
+  if(ChipType==CHIP_TYPE_BERLINA)
+  {
+      reg_addr = 0x10168;
+  }
+
+
+  if(!enable_ESD_check) return;
+
+  if(IICReadOneByte(reg_addr) == 0xAA)
+  {
+      PRINT("BT Check ESD Error!\n");
+      ResetTouchChip(); //Rstart touch ic
+  }
+  else
+  {
+      IICWriteOneByte(reg_addr, 0xAA);
+  }
+}
+*/
+/*
+static void ClearTouchFlag()
+{
+  UINT32 reg_addr = 0x10274;
+
+  if(ChipType == CHIP_TYPE_BERLINA)
+  {
+      reg_addr = 0x10338;
+  }
+  else  if(ChipType == CHIP_TYPE_BERLIND)
+  {
+      reg_addr = 0x10308;
+  }
+
+}
+*/
+void JD_SetTouchEvent()
+{
+
+  tmos_set_event(IICTouchTaskId, CHECK_TOUCH_INT_EVT);
+}
+
+static UINT16 IICTouch_ProcessEvent( UINT8 task_id, UINT16 events )
+{
+    //BOOL bSuccess = TRUE;;
+    if(events & REPORT_AGAIN_EVT)
+    {
+      ReportPos();
+      events ^= REPORT_AGAIN_EVT;
+      goto OUT_FUMC;
+    }
+
+    if(events & START_REPORT_POS_EVT)
+    {
+      //PRINT("SR");
+      StartReportPos();
+      events ^= START_REPORT_POS_EVT;
+      goto OUT_FUMC;
+    }
+
+    if(events & READ_ONE_POINT_EVT)
+    {
+      ReadOnePoint();
+      events ^= READ_ONE_POINT_EVT;
+
+      //有中断,取消USB检测
+      events &= ~CHECK_USB_STATUS_EVT;
+      tmos_stop_task(IICTouchTaskId, CHECK_USB_STATUS_EVT);
+
+      goto OUT_FUMC;
+    }
+
+    if(events & CHECK_TOUCH_INT_EVT)
+    {
+      //PRINT("TI");
+
+      CheckTouchINT();
+      events ^= CHECK_TOUCH_INT_EVT;
+
+      if(PointNum == 0) //松键
+      {
+        tmos_start_task(IICTouchTaskId, CHECK_USB_STATUS_EVT, PERIO_1s ); //1s后开启USB检测
+      }
+
+      goto OUT_FUMC;
+    }
+
+    //if(events & CHECK_ESD_EVT)
+    //{
+    //  //PRINT("esd check\n");
+    //  BT_Check_ESD();
+    //  events ^= CHECK_ESD_EVT;
+    //  tmos_start_task(IICTouchTaskId, CHECK_ESD_EVT, PERIO_2s );
+    //  goto OUT_FUMC;
+    //}
+
+    if(events & SYS_INIT_FINISH_EVT)
+    {
+      SysInitFinish = TRUE;
+
+      events ^= SYS_INIT_FINISH_EVT;
+      tmos_start_task(IICTouchTaskId, CHECK_USB_STATUS_EVT, PERIO_1s);
+      goto OUT_FUMC;
+    }
+
+    if(events & CHECK_USB_STATUS_EVT)
+    {
+
+      events ^= CHECK_USB_STATUS_EVT;
+
+      CheckUsbStatus();
+
+      tmos_start_task(IICTouchTaskId, CHECK_USB_STATUS_EVT, PERIO_1s );
+
+      goto OUT_FUMC;
+    }
+
+    if(events & HID_DEBUG_EVT)
+    {
+      CommandHandle();
+      events ^= HID_DEBUG_EVT;
+      tmos_set_event(task_id, HID_DEBUG_EVT);
+      goto OUT_FUMC;
+    }
+
+    return 0;
+
+OUT_FUMC:
+
+    return  events;
+}
+
+
+
+static void CheckTouchINT()
+{
+  lJDRegAddr = 0x20021120;
+
+  PointNum = IICReadOneByte(lJDRegAddr);  //read point number
+
+  TouchNum = 0;
+
+  if(PointNum > MAX_POINT)   PointNum = MAX_POINT;
+
+    NoTouchTimer = 0;
+
+    ReadPointCnt = 0;
+    ReadPointIndexCnt = 0;
+
+    OutRangeFlag = 0xFFFF;
+
+    Press_Flag = 0;
+
+    if(PointNum==0)
+    {
+      tmos_set_event(IICTouchTaskId, START_REPORT_POS_EVT);
+    }
+    else
+    {
+      lJDRegAddr += 3;
+      tmos_set_event(IICTouchTaskId, READ_ONE_POINT_EVT);
+    }
+}
+
+//__attribute__((section(".highcode")))
+static void ReadOnePoint()
+{
+    UINT8 buf[5];
+    UINT8 Contact_Identifier;
+    UINT8 index = 0;
+    UINT16 tmp;
+
+    IICReadBytes(lJDRegAddr, buf, 5);
+
+    lJDRegAddr += 5;
+
+    ReadPointIndexCnt++;
+
+    if (buf[4])  //coor weight
+    {
+        Contact_Identifier = ReadPointIndexCnt;
+    }
+    else
+    {
+        if(ReadPointCnt < PointNum)
+          tmos_set_event(IICTouchTaskId, READ_ONE_POINT_EVT);
+        else
+          tmos_set_event(IICTouchTaskId, START_REPORT_POS_EVT);
+
+        return;
+    }
+
+
+    //查找和上次相同Press_Flag的索引位置
+    for (index = 0; index < 10; index++)
+    {
+        if(((Press_Flag_Bak0 & (1L<<index))!= 0) && TP[ index ].Contact_Identifier == Contact_Identifier)
+        {
+          break; //
+        }
+    }
+
+    if (index >= 10)//没有找到配对位置,找一个空位
+    {
+        for(index = 0; index < 10; index++)
+        {
+          if(((Press_Flag_Bak0 | Press_Flag ) & (1L<<index)) == 0)
+          {
+            break; //
+          }
+        }
+    }
+
+
+    if (index >= 10) goto OUT_FUNC; //没有空位
+
+    tmp = buf[4];
+    if (tmp == 0)
+    {
+        goto OUT_FUNC;
+    }
+
+  #ifdef AUTO_ADJUST_SOLUTION
+    if(bSolutionValid)
+    {
+      TP[index].X_pos = (UINT32)(((UINT16)buf[2]<<8)+buf[1] ) * (RESOLUTION_X-1) / wMaxX;
+      TP[index].Y_pos = (UINT32)(((UINT16)buf[4]<<8)+buf[3] ) * (RESOLUTION_Y-1) / wMaxY;
+    }
+    else
+  #else
+    {
+      TP[index].X_pos = ( ((UINT16)buf[0]<<8)+buf[1] );
+      TP[index].Y_pos = ( ((UINT16)buf[2]<<8)+buf[3] );
+    }
+  #endif
+
+    TP[index].X_pos_back = TP[index].X_pos;
+    TP[index].Y_pos_back = TP[index].Y_pos;
+
+#ifdef NEW_REVOLVE_PROTOCAL
+    if (PosConvert(TP, index) == FALSE)  //超出黑边的坐标返回FALSE,裁剪掉
+      goto OUT_FUNC;
+#endif
+    TP[ index ].Tip_Switch = 1;
+
+    Press_Flag |= ((UINT16)1<<index);
+
+    TP[ index ].Contact_Identifier = Contact_Identifier;
+
+
+OUT_FUNC:
+    ReadPointCnt++;
+
+    if(ReadPointCnt >= PointNum)
+    {
+      tmos_set_event(IICTouchTaskId, START_REPORT_POS_EVT);
+
+    }
+    else
+    {
+      tmos_set_event(IICTouchTaskId, READ_ONE_POINT_EVT);
+    }
+}
+//__attribute__((section(".highcode")))
+void StartReportPos()
+{
+  TouchNum = 0;
+  for (UINT8 i = 0; i < MAX_POINT; i++)
+  {
+    if((Press_Flag & (((UINT16)1)<<i)) == 0)
+    {
+      TP[i].Tip_Switch = 0;
+    }
+    else
+    {
+      TouchNum++;
+    }
+  }
+
+#ifdef DOUBLECLIK_FILETER
+  if(TouchNum <= 1)  //&& (DeviceMode == DEVICE_MODE_MOUSE))
+  {
+    DoubleClickFilter(0, 0);
+  }
+  else
+  {
+    DoubleClickTimer = 100;
+  }
+#endif
+
+#ifdef CALL_OSD_MENU
+  CallOSDMenu();    //双指在右下角下滑,串口上报命令调用OSD菜单
+#endif
+
+#ifdef GESTURE
+  if ( DeviceMode == DEVICE_MODE_MOUSE || BleDeviceMode == DEVICE_MODE_MOUSE)
+  {
+    WheelMove();
+
+    if (TwoPointsClick() == 1)
+    {
+      bclickFlag = 1;
+    }
+  }
+#endif
+
+  Press_Flag &= OutRangeFlag;
+
+  for(UINT8 i = 0; i < MAX_POINT; i++)
+  {
+    if((Press_Flag & (((UINT16)1)<<i)) == 0)
+    {
+      TP[i].Tip_Switch = 0;
+    }
+  }
+
+  Press_Flag_Bak0 = Press_Flag;
+  Press_Flag |= Press_Flag_Bak1|Press_Flag_Bak2;//|Press_Flag_Bak3;
+
+  ReportPos();
+}
+
+
+//__attribute__((section(".highcode")))
+static void ReportPos()
+{
+  //static UINT8 nUSBFailedTimes = 0;
+  ReportPosSuccess = TRUE;
+
+  if(UsbReportPosEn || BleReportPosEn)
+  {
+    if(((DeviceMode == DEVICE_MODE_MULTITOUCH) && (config.report_type != EN_MOUSE_ONLY)) || (config.report_type == EN_MULTITOUCH_ONLY))
+    {
+      Absolute_Up_Pack(TP);
+    }
+    else if(config.report_type != EN_MULTITOUCH_ONLY)
+    {
+      ReportMousePos(TP);
+    }
+  }
+#ifdef UART_ENABLE
+  else if(UartReportPosEn)
+  {
+    UartUpdatePos( &TP[0]);
+  }
+#endif
+
+    //ClearTouchFlag();
+
+    Press_Flag_Bak3 = Press_Flag_Bak2;
+    Press_Flag_Bak2 = Press_Flag_Bak1;
+    Press_Flag_Bak1 = Press_Flag_Bak0;
+
+    tmos_stop_task( IICTouchTaskId, REPORT_AGAIN_EVT );
+
+}
+
+/*********************************************************************
+*********************************************************************/

+ 0 - 354
project/solution/ble_hid_composite/touch/MS928x_mpi.c

@@ -1,354 +0,0 @@
-/********************************** (C) COPYRIGHT *******************************
-* File Name          : MS928x_mpi.c
-* Author             : Wingcool
-* Version            : V1.0
-* Date               : 2023/2/22
-* Description        : ms928x SDK升级操作
-*******************************************************************************/
-
-/******************************************************************************/
-/* 头文件包含 */
-#include "include.h"
-//#include <GoodixTouch.h>
-#include "CONFIG.h"
-//#include "CH57x_common.h"
-#include "TouchCommon.h"
-//#include "HAL.h"
-//#include "hiddev.h"
-//#include "hidtouch.h"
-#include "iic.h"
-//#include "DEBUG.H"
-#include "HidReport.h"
-//#include "usb_driver.H"
-//#include "I2CTouchService.h"
-//#include "Flash.h"
-//#include "hidReportDesc.h"
-//#include "central.h"
-//#include "RF_PHY.h"
-//#include "Flash.h"
-#include "tmos.h"
-
-#include "commlib.h"
-#include "MS928x.h"
-#include "MS928x_mpi.h"
-#include "mst_typedef.h"
-/*********************************************************************
- * GLOBAL TYPEDEFS
- */
-#define MS_SERVICE                          0x0001
-#define HID_DEBUG_EVT                       0x0200
-
-#define PERIO_100ms 160
-#define PERIO_1s    1600
-
-/*********************************************************************/
-UINT8 byIicDelay = 0;  //default 400KHz
-static UINT8 MS928xTaskId = INVALID_TASK_ID;
-BOOL bPressKeyFlag = 0;  //press reset key or not
-UINT16 wHPixelShift,wVPixelShift;  //
-
-static UINT16 MS928x_ProcessEvent( UINT8 task_id, UINT16 events );
-
-void Delay_ms(UINT8 u8ms)
-{
-  delay_ms(u8ms);
-}
-
-void Delay_us(UINT8 u8us)
-{
-  delay_us(u8us);
-}
-
-void I2C_Sel_Speed(UINT8 u8speed)
-{
-  switch (u8speed)
-  {
-    case I2C_SPEED_20K:
-      byIicDelay = 20;  //20K
-      break;
-    case I2C_SPEED_100K:
-      byIicDelay = 0;  //100K
-      break;
-    case I2C_SPEED_400K:
-      byIicDelay = 0;  //400K
-      break;
-    case I2C_SPEED_750K:
-      byIicDelay = 0;  //400K
-      break;
-    case 100:
-      byIicDelay = 0;  //100K
-      break;
-    case 20:
-      byIicDelay = 20;  //20K
-      break;
-    default:
-      byIicDelay = 0;  //400K
-      break;
-  }
-
-  //byIicDelay = 20;  //20K
-}
-
-UINT8 I2C16_ReadByte(UINT8 u8addr, UINT16 u16index)
-{
-  GT_CMD_WR = u8addr;
-  GT_CMD_RD = u8addr + 1;
-
-  u16index = ((u16index & 0xff00) >> 8) + ((u16index & 0x00ff) << 8);
-
-  return IICReadOneByte(u16index);
-}
-
-void I2C16_WriteByte(UINT8 u8addr, UINT16 u16index, UINT8 u8value)
-{
-  GT_CMD_WR = u8addr;
-  GT_CMD_RD = u8addr + 1;
-
-  u16index = ((u16index & 0xff00) >> 8) + ((u16index & 0x00ff) << 8);
-
-  IICWriteOneByte(u16index, u8value);
-}
-
-BOOL I2C_ReadBytes(UINT8 u8addr, UINT8 u8index, UINT8 *pIn, UINT8 u8len)
-{
-  GT_CMD_WR = u8addr;
-  GT_CMD_RD = u8addr + 1;
-
-  UINT16 u16index = (UINT16)u8index * 256;
-
-  return IICReadBytes(u16index, pIn, u8len);
-
-}
-
-//UINT8  I2C_ReadByte(UINT8 u8addr, UINT8 u8index)
-//{
-//
-//}
-//
-//void I2C_WriteByte(UINT8 u8addr, UINT8 u8index, UINT8 u8value)
-//{
-//
-//}
-
-void Sys_Reset(void)
-{
-
-    gpio_init_typedef gpio_init_structure;
-
-    gpio_init_structure.gpio_dir = GPIO_DIR_OUTPUT;
-    gpio_init_structure.gpio_fen = GPIO_FEN_GPIO;
-    gpio_init_structure.gpio_fdir = GPIO_FDIR_SELF;
-    gpio_init_structure.gpio_mode = GPIO_MODE_DIGITAL;
-    gpio_init_structure.gpio_pupd = GPIO_PUPD_PU10K;
-    gpio_init_structure.gpio_drv = GPIO_DRV_6MA;
-
-    gpio_init_structure.gpio_pin = RST_PIN;
-    gpio_init(GPIOA_REG, &gpio_init_structure);
-    gpio_reset_bits(GPIOA_REG, RST_PIN);
-
-    delay_us(200);
-    gpio_init_structure.gpio_dir = GPIO_DIR_INPUT;
-    gpio_init(GPIOA_REG, &gpio_init_structure);
-    gpio_set_bits(GPIOA_REG, RST_PIN);
-}
-
-void MS928X_MPI_Init(BOOL bpresskeyflag)
-{
-  UINT8 u8status;
-  SYSPARAM_T stParam;
-
-  tmos_stop_task(MS928xTaskId, MS_SERVICE);
-
-  Sys_Reset();
-
-  memset(&stParam, 0, sizeof(SYSPARAM_T));
-
-  stParam.u8chipAddr = MS928X_I2C_ADDR_92;  //MS928X IIC address, SASEL Pin -> GND, select 0x9A
-
-  stParam.u16sysConfig = SYS_CFG_SIG_CHANNEL_1;// | SYS_CFG_SIG_SYNC_SOG_1;// | SYS_CFG_ADDPLL_HIGH_REFCLK;  // 配置根据系统板来选择信号输入通道
-
-  stParam.videoParam.u8sourceIn = IN_ANALOG_VGA;  // 当前输入信号选择 VGA input
-
-  // 调用初始化函数
-  u8status = MS928X_Init(&stParam);
-
-  //PRINT("MS928X init status:0x%x\n", u8status);
-
-  if (bpresskeyflag)  //press key
-  {
-    bPressKeyFlag = 1;
-  }
-
-  tmos_start_task(MS928xTaskId, MS_SERVICE, PERIO_100ms);
-}
-
-void MS928XInit()
-{
-  UINT8 u8hvpixeldata[4];
-
-  if (bTransmitEn == TRUE)  //transmit
-  {
-    return;
-  }
-
-  GT_CMD_WR = MS928X_I2C_ADDR_92;
-  GT_CMD_RD = MS928X_I2C_ADDR_92 + 1;
-
-  if (GetHVPixel(u8hvpixeldata))
-  {
-    //PRINT("Get HV Pixel Success\n");
-    wHPixelShift = (UINT16)(((UINT16)u8hvpixeldata[0] << 8) + u8hvpixeldata[1]);
-    wVPixelShift = (UINT16)(((UINT16)u8hvpixeldata[2] << 8) + u8hvpixeldata[3]);
-  }
-  else  //没有存储,给一个默认的
-  {
-    //PRINT("No HV Pixel Data\n");
-    wHPixelShift = 1593;
-    wVPixelShift = 1;
-  }
-
-  //PRINT("wHPixelShift:%05d, wVPixelShift:%05d\n", wHPixelShift, wVPixelShift);
-
-  MS928xTaskId = TMOS_ProcessEventRegister(MS928x_ProcessEvent);
-
-//  if (MS928xTaskId == INVALID_TASK_ID)
-//  {
-//    MS928xTaskId = TMOS_ProcessEventRegister(MS928x_ProcessEvent);
-//    tmos_set_event(MS928xTaskId, HID_DEBUG_EVT);
-//  }
-
-  tmos_set_event(MS928xTaskId, HID_DEBUG_EVT);
-
-  MS928X_MPI_Init(0);
-
-}
-
-void MS928XService()
-{
-  VIDEOSHIFT_T sysVideoShift;
-  UINT8 u8status;
-  //UINT8 u8vic = 0;
-  UINT8 u8hvpixeldatabuf[4];
-
-  u8status = MS928X_Poll(); // 返回当前系统运行状态
-  //PRINT("MS928X Poll status:%d\n", u8status);
-
-  if (u8status == STATE_SUCCESS)
-  {
-    //WDT_DIS();
-    //PRINT("Disable watch dog\n");
-
-    //u8vic = MS928X_GetInputVideoMode();
-    //PRINT("MS928X vic:%03d\n", u8vic);
-
-    //MS928X_SetVideo();  // 设置 Video
-    MS928X_SetVideo(&sysVideoShift);  // 设置 Video
-    //MS928X_SetAudio(); // 设置 Audio
-
-    //if (u8vic == 4)
-    {
-      if (bPressKeyFlag == 1)  //press key
-      {
-        bPressKeyFlag = 0;
-
-        u8hvpixeldatabuf[0] = sysVideoShift.u16HShift >> 8;
-        u8hvpixeldatabuf[1] = sysVideoShift.u16HShift & 0xFF;
-        u8hvpixeldatabuf[2] = sysVideoShift.u16VShift >> 8;
-        u8hvpixeldatabuf[3] = sysVideoShift.u16VShift & 0xFF;
-
-        wHPixelShift = sysVideoShift.u16HShift;
-        wVPixelShift = sysVideoShift.u16VShift;
-
-        if (StoreHVPixel(u8hvpixeldatabuf))
-        {
-          //PRINT("Store HV Pixel Success\n");
-        }
-      }
-      else
-      {
-        sysVideoShift.u16HShift = wHPixelShift;
-        sysVideoShift.u16VShift = wVPixelShift;
-      }
-      //MS928X_WriteShift(1593,1);
-      //MS928X_WriteShift(sysVideoShift.u16HShift,sysVideoShift.u16VShift);
-      //MS928X_Video_SetShift(1593,1);
-      MS928X_Video_SetShift(sysVideoShift.u16HShift, sysVideoShift.u16VShift);
-      //PRINT("u16HShift:%05d, u16VShift:%05d\n", sysVideoShift.u16HShift, sysVideoShift.u16VShift);
-    }
-  }
-  else {
-    //WDT_EN();
-    //WDT_CLR();
-  }
-
-  //PRINT("MS928X Poll status:0x%x\n", u8status);
-  //PRINT("u16HShift:%05d, u16VShift:%05d\n", sysVideoShift.u16HShift, sysVideoShift.u16VShift);
-}
-
-bool GetHVPixel(UINT8* HVPixelData)
-{
-  UINT8 buf[10];
-
-  bsp_param_read(buf, HV_PIXEL_ADDR, HV_PIXEL_LEN);  //从flash读出来,len = 4 + 4
-
-  if(buf[0] == 0xAA && buf[1] == 0x55 && buf[2] == 0xAA && buf[3] == 0x55)  //if flag is right
-  {
-    memcpy(HVPixelData, &buf[4], 4);  //return 4 bytes HV Pixel
-    return TRUE;
-  }
-  memset(HVPixelData, 0, 4);  //if flag is wrong, clear HV Pixel
-  return FALSE;
-}
-
-bool StoreHVPixel(UINT8* HVPixelData)
-{
-  u8 buf[8];
-
-  buf[0] = 0xAA;
-  buf[1] = 0x55;
-  buf[2] = 0xAA;
-  buf[3] = 0x55;
-
-  //DataFlash_BlockErase(HV_PIXEL_ADDR);  //erase a block
-
-  //DataFlash_WriteDW(HV_PIXEL_ADDR, 0xAA55AA55);   //write 0xAA55AA55
-
-  memcpy(&buf[4], HVPixelData, 4);  //copy 4 bytes HV Pixel to buf
-
-  //DataFlash_Write((PUINT8)HV_PIXEL_ADDR + 4, (PUINT8)buf, HV_PIXEL_LEN);  //接着第4位开始写HV Pixel,len = 4
-
-  bsp_param_write(buf, HV_PIXEL_ADDR, HV_PIXEL_LEN);
-
-  bsp_param_sync();
-
-  return GetHVPixel(HVPixelData);  //judge and return HV Pixel
-}
-
-static UINT16 MS928x_ProcessEvent( UINT8 task_id, UINT16 events )
-{
-    if(events & MS_SERVICE)
-    {
-      MS928XService();
-      events ^= MS_SERVICE;
-
-      tmos_start_task(MS928xTaskId, MS_SERVICE, PERIO_100ms );
-
-      goto OUT_FUMC;
-    }
-
-    if(events & HID_DEBUG_EVT)
-    {
-      CommandHandle();
-      events ^= HID_DEBUG_EVT;
-      tmos_set_event(MS928xTaskId, HID_DEBUG_EVT);
-      goto OUT_FUMC;
-    }
-
-    return 0;
-
-OUT_FUMC:
-
-    return  events;
-}
-
-/******************************** endfile @ MS928x_mpi ******************************/

+ 10 - 6
project/solution/ble_hid_composite/touch/Touch.c

@@ -9,8 +9,7 @@
 #include "GoodixTouch.h"
 #include "HidReport.h"
 #include "usb_com.h"
-#include "MS928x.h"
-#include "uart_transfer.h"
+//#include "uart_transfer.h"
 /*********************************************************************
  * @fn      main
  *
@@ -30,17 +29,16 @@ void touch_init(void)
 #if USBCONFIG
     ConfigInit();
 
-    uart_transfer_init(9600);
+    //uart_transfer_init(9600);
 #else
     uart_transfer_init(9600);
 #endif
 //
 //    //CheckFlag();
 //
-    MS928XInit();
-
-    CHIP_TYPE chip_type = GetChipTypeFromFlash();
+    //CHIP_TYPE chip_type = GetChipTypeFromFlash();
 
+    /*
     if(IsBerlinSeries())
     {
       if(!IsBerlinChipType(chip_type) || chip_type==CHIP_TYPE_UNKNOW)
@@ -99,6 +97,12 @@ void touch_init(void)
 //       }
        IICTouchInit();
    }
+   */
+    //chip_type = CHIP_TYPE_JD9366;
+    ChipType = CHIP_TYPE_JD9366;
+    isBerlinSeries = FALSE;
+
+    IICTouchInit();
 
     PRINT("Initial finish\n");
 }

+ 13 - 39
project/solution/ble_hid_composite/touch/TouchCommon.c

@@ -12,6 +12,7 @@
 #include "Gesture.h"
 #include "GoodixTouch.h"
 #include "BerlinTouch.h"
+#include "JDTouch.h"
 #include "HidReport.h"
 #include "tmos.h"
 #include "driver_gpio.h"
@@ -35,6 +36,7 @@ UINT8 TouchNumber;
 UINT16 StylusPress;
 CHIP_TYPE ChipType;
 BOOL isBerlinSeries = FALSE;
+BOOL bIsJDSeries = TRUE;
 BOOL enable_INT_irq;
 BOOL enable_ESD_check;
 UINT8 HearBeatCheckTimer;
@@ -154,7 +156,7 @@ void IICTouchInit()
     TpOption.uart_long_cmd.dx = RESOLUTION_X;
     TpOption.uart_long_cmd.dy = RESOLUTION_Y;
 #endif
-    tmos_set_event(TaskID, USB_HID_DEBUG_EVT);
+    //tmos_set_event(TaskID, USB_HID_DEBUG_EVT);
     tmos_start_task(TaskID, TIMER_40MS_EVT, 40);
 }
 
@@ -278,7 +280,7 @@ void ResetTouchChip()
     gpio_init(GPIOA_REG, &gpio_init_structure);
     gpio_reset_bits(GPIOA_REG, RST_PIN);
 
-    delay_ms(1);//RST
+    delay_ms(5);//RST
 
     gpio_init_structure.gpio_dir = GPIO_DIR_INPUT;
     gpio_init_structure.gpio_pin = INT_PIN;
@@ -289,10 +291,13 @@ void ResetTouchChip()
 
     enable_INT_irq = FALSE;
     enable_ESD_check = FALSE;
-    tmos_start_task(TaskID, CHECK_TOUCH_INT_EVT,1);
+    tmos_stop_task(TaskID, CHECK_TOUCH_INT_EVT);
 
     SearchAddress(100);
 
+    PRINT("JD series\n");
+    JD_Init();
+    /*
     if(isBerlinSeries)
     {
         PRINT("Berlin series\n");
@@ -305,9 +310,10 @@ void ResetTouchChip()
 
         GT_Init();
     }
+    */
+    io_interrupt_init();
 
     tmos_start_task(TaskID, CHECK_TOUCH_INT_EVT, 2 );
-    io_interrupt_init();
 
     enable_INT_irq = TRUE;
     enable_ESD_check = TRUE;
@@ -318,56 +324,24 @@ BOOL SearchAddress( UINT8 num )
 {
   while(num--)
   {
-    GT_CMD_WR = 0xBA;
+    GT_CMD_WR = 0xD0;
+    GT_CMD_RD = 0xD1;
     if(GT_Check_I2C_Address(GT_CMD_WR))
     {
-        GT_CMD_RD = 0xBB;
         return 1;
     }
-    GT_CMD_WR = 0x28;
-    GT_CMD_RD = 0x29;
-    if(GT_Check_I2C_Address(GT_CMD_WR))
-    {
-        return 1;
-    }
-//    GT_CMD_WR = 0x70;
-//    GT_CMD_RD = 0x71;
-//    if(FT_Check_I2C_Address())
-//    {
-//        return 1;
-//    }
   }
   return 0;
 }
 
 static void SetTouchEvent()
 {
-//  if(ChipType == CHIP_TYPE_FT5XXX)
-//  {
-//      FT_SetTouchEvent();
-//  }
-//  else
-  if(ChipType != CHIP_TYPE_9XXX)
-  {
-     BT_SetTouchEvent();
-  }
-  else
-  {
-    GT_SetTouchEvent();
-  }
+  JD_SetTouchEvent();
   //PRINT("have touch\n");
 }
 
 void CheckTouchInt()
 {
-
-//    if(GioInterruptFlag)
-//    {
-//
-//         SetTouchEvent();
-//      GioInterruptFlag = FALSE;
-//    }
-
     if( (GioInterruptFlag) && (!DisableDigiterInterface))
     {
         if(enable_INT_irq)

+ 42 - 0
project/solution/ble_hid_composite/touch/include/JDTouch.h

@@ -0,0 +1,42 @@
+/********************************** (C) COPYRIGHT *******************************
+* File Name          : IIC.h
+* Author             : WCH
+* Version            : V1.0
+* Date               : 2018/12/12
+* Description        :
+*******************************************************************************/
+
+/******************************************************************************
+* MAX FREQ 400K Hz
+* DEV_ADDR_T = DEV_ADDR + W/R
+* HOST WRITE
+* +-------+----------+-----------+-----+------------+-----+------------+-----+----------+-----+-----+------+
+* | START | DEV_ADDR | WRITE (0) | ACK | REG_ADDR_H | ACK | REG_ADDR_L | ACK | DATA ... | ... | ACK | STOP |
+* +-------+----------+-----------+-----+------------+-----+------------+-----+----------+-----+-----+------+
+* HOST READ
+* +-------+----------+----------+-----+------------+-----+------------+------+-------+----------+----------+-----+------+-----+-----+-----+-----+------+
+* | START | DEV_ADDR | READ (1) | ACK | REG_ADDR_H | ACK | REG_ADDR_L | STOP | START | DEV_ADDR | READ (1) | ACK | DATA | ACK | ... | ... | NAK | STOP |
+* +-------+----------+----------+-----+------------+-----+------------+------+-------+----------+----------+-----+------+-----+-----+-----+-----+------+
+******************************************************************************/
+
+#ifndef __JDTOUCH_H__
+#define __JDTOUCH_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "typedef.h"
+
+#define JD_GSTID_REG  0X824E
+
+/* Function Define */
+UINT8 JD_RD_Reg(UINT32 reg,UINT8 *buf,UINT8 len);
+UINT8 JD_WR_Reg(UINT32 reg,UINT8 *buf,UINT8 len);
+void JD_Init();
+void JD_SetTouchEvent();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 0 - 218
project/solution/ble_hid_composite/touch/include/MS928x.h

@@ -1,218 +0,0 @@
-/**
-******************************************************************************
-* @file    MS928X.h
-* @author
-* @version V2.2.0
-* @date    15-Oct-2013
-* @brief   Definitions for MS928X library.
-* @history 11-Nov-2013 Update for MS928X.
-*
-* Copyright (c) 2009-2013, MacroSilicon Technology Co.,Ltd.
-******************************************************************************/
-
-#ifndef _MACROSILICON_TECH_MS928X_H_
-#define _MACROSILICON_TECH_MS928X_H_
-
-// MS928X SDK version.
-#define MS928X_MAJOR_VER            (0x02)
-#define MS928X_MINOR_VER            (0x07)
-
-#define MS928X_I2C_ADDR_92          (0x92)
-#define MS928X_I2C_ADDR_9A          (0x9A)
-
-//
-// Video Input sources.
-//
-typedef enum _ms928x_video_input_format
-{
-    IN_ANALOG_VGA           = 0x1,
-    IN_ANALOG_YPBPR         = 0x2,
-    IN_ANALOG_RGBS          = 0x3,
-    IN_ANALOG_RGB_CS        = 0x4
-    //IN_DIGITAL_RGB          = 0x5,
-    //IN_DIGITAL_YCBCR444     = 0x6,
-    //IN_DIGITAL_YCBCR422     = 0x7
-}eVideoSource;
-
-typedef enum _ms928x_output_color_space
-{
-    OUT_CS_RGB      = 0,
-    OUT_CS_YCBCR444 = 1,
-    OUT_CS_YCBCR422 = 2
-}eOutColorSpace;
-
-// Video Configurations
-enum _ms928x_system_configuration
-{
-    SYS_CFG_DEFAULT             = 0,        // Default configuration.
-    // Video
-    SYS_CFG_SIG_CHANNEL_1       = 0x01,     // Select channel1 according to system board design
-    SYS_CFG_SIG_SYNC_SOG_1      = 0x02,     // Select SYNC1 and SOG1
-    SYS_CFG_OUT_COLOR_MODE      = 0x04,     // output color space user define flag
-    SYS_CFG_OUT_MODE_DVI        = 0x08,     // Output sink Mode user define flag, default DVI
-
-    //
-    SYS_CFG_VFE_PLL_OPTION      = 0x10,     // option VFE pll flag
-
-    SYS_CFG_DDC_DISABLED        = 0x20,     // hdmi tx ddc unuse flag
-
-    // For audio
-    SYS_CFG_RIGHT_JUSTIFY       = 0x40,     // 0:Left-justify, 1:Right-Justify;
-
-    //
-    SYS_CFG_VP_OPTION           = 0x80,     // option vertical position precise flag
-
-    // For Digital-In
-    SYS_CFG_DDR                 = 0x0100,   // no use
-    SYS_CFG_EMBEDDED_SYNC       = 0x0200,   // no use, For BT.656
-
-    SYS_CFG_USER_VIC            = 0x0400,   // user define VIC
-
-    SYS_CFG_AUTO_ADJUST_DISABLE = 0x0800,   // disable auto phase and border detection
-
-    SYS_CFG_MONO_COLOR_ENABLE   = 0x1000,   // enable mono color function
-
-    SYS_CFG_ADC_HIGH_BANDWIDTH  = 0x2000,   // adc select high bandwidth
-
-    SYS_CFG_ADDPLL_HIGH_REFCLK  = 0x4000,   // addpll select high reference clock
-
-    SYS_CFG_RESERVED            = 0x8000    // Reserved.
-};
-
-//
-// Define the severity status code.
-//
-#define STATE_SUCCESS                   (0)
-#define STATE_FATAL_ERR                 (0x80)
-#define STATE_CHIP_NOT_EXIST            (0x81)
-#define STATE_HPD_ERR                   (0x82)
-#define STATE_READ_EDID_ERR             (0x83)
-#define STATE_MODE_NOT_CHANGED          (0x84)
-#define STATE_NO_INPUT_SIGNAL           (0x85)
-#define STATE_INVALID_PARAMETER         (0x86)
-#define STATE_UNKNOWN                   (0xFF)
-
-//
-// Audio Module, please refer to HDMI 1.3a spec.
-//
-#define MS928X_AUDIO_DEFAULT            (0x0)   // Default audio: I2S_48K_2CH_16BITS
-
-// Select audio source.
-#define MS928X_AUD_MODE_I2S             (0x1)
-#define MS928X_AUD_MODE_SPDIF           (0x2)
-
-// Sample length
-#define MS928X_AUD_LEN_16               (0x2)
-#define MS928X_AUD_LEN_24               (0xB)
-// Sample Channel
-#define MS928X_AUD_CH_2CH               (0x1)
-#define MS928X_AUD_CH_8CH               (0x7)
-// Sample rate
-#define MS928X_AUD_RATE_44K1            (0x0)
-#define MS928X_AUD_RATE_48K             (0x2)
-#define MS928X_AUD_RATE_32K             (0x3)
-#define MS928X_AUD_RATE_88K2            (0x8)
-#define MS928X_AUD_RATE_96K             (0xA)
-#define MS928X_AUD_RATE_176K4           (0xC)
-#define MS928X_AUD_RATE_192K            (0xE)
-
-//
-// Defines interface for video/audio
-//
-typedef struct _ms928x_video_param
-{
-    eVideoSource u8sourceIn;
-}VIDEOPARAM_T;
-
-typedef struct _ms928x_audio_param
-{
-    UINT8        u8audMode;
-    UINT8        u8audRate;
-    UINT8        u8audBits;
-    UINT8        u8audChannel;
-}AUDIOPARAM_T;
-
-// system parameters.
-typedef struct _ms928x_system_param
-{
-    UINT16          u8chipAddr;    //set UINT16, align the structure data
-    UINT16          u16sysConfig;
-    VIDEOPARAM_T    videoParam;
-    AUDIOPARAM_T    audioParam;
-    UINT8           u8userVIC;     // [Digital-In Only]. User will be responsible for setting the VIC.
-    UINT8           u8HDMIType;    // DVI : 0;  HDMI: 1
-    UINT8           u8HDMIColor;   //refer to eOutColorSpace
-    UINT8           u8Phase;       //from 0~31
-    UINT8           u8MnccGain;    //set color fix range: 0x10~0x1F(16~31)
-}SYSPARAM_T;
-
-typedef struct _ms928x_video_shift
-{
-    UINT16      u16HShift;     // H Shift Value
-    UINT16      u16VShift;     // V Shift Value
-}VIDEOSHIFT_T;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void MS928XInit();
-
-void MS928X_MPI_Init(BOOL bpresskeyflag);
-
-void MS928XService();
-
-// MS928X chip reset and initialization.
-UINT8   MS928X_Init(SYSPARAM_T* pstSysParam);
-
-// Determines the running status of the current system.
-UINT8   MS928X_Poll(VOID);
-
-//
-VOID    MS928X_SetVideo(VIDEOSHIFT_T*  g_sysVideoShift);
-//VOID    MS928X_WriteShift(UINT16 u16_h_shift, UINT16 u16_v_shift);
-VOID MS928X_Video_SetShift(INT16 i16_h_shift, INT16 i16_v_shift);
-// Note: This function should be called after the MS928X_SetVideo function.
-//VOID    MS928X_SetAudio(VOID);
-
-// Operations
-VOID    MS928X_Video_Mute(BOOL bmuteON);
-VOID    MS928X_Audio_Mute(BOOL bmuteON);
-
-// Returns TRUE if the sink device connected.
-BOOL    MS928X_HPD_Detect(VOID);
-
-// Returns TRUE if MS928x chip exists.
-BOOL    MS928X_IsValid(VOID);
-
-// Switch I2S/SPDIF audio.
-UINT8   MS928X_UpdateAudio(AUDIOPARAM_T* pstAudParam);
-
-// Get current input video mode.
-// Returns the corresponding VIC code. Returns 0xFF if no signal detected.
-UINT8   MS928X_GetInputVideoMode(VOID);
-
-// HDMI DDC access enable
-VOID    MS928X_DDC_Enable(BOOL b_enable);
-
-// Horizontal or vertical pixel shift
-VOID    MS928X_ShiftConfig(UINT8 u8_h_position, UINT8 u8_v_position);
-
-// Do auto phase, or set manual phase
-UINT8   MS928X_PhaseConfig(BOOL b_auto_enable, UINT8 u8_phase_sel);
-
-// Adjust brightness
-VOID    MS928X_SetVideoBrightness(INT8 i8_brightness);
-
-// Adjust contrast
-VOID    MS928X_SetVideoContrast(UINT8 u8_contrast);
-
-// Adjust tx data driver(max = 0xf)
-VOID  MS928X_SetHdmiDataDriver(UINT8 u8_main_driver, UINT8 u8_post_driver);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _MACROSILICON_TECH_MS928X_H_
-

+ 0 - 52
project/solution/ble_hid_composite/touch/include/MS928x_mpi.h

@@ -1,52 +0,0 @@
-/******************************************************************************
-* @file    ms928x_mpi.h
-* @author
-* @version V1.0.0
-* @date    11-Nov-2014
-* @brief   MacroSilicon Programming Interface.
-*
-* Copyright (c) 2009-2014, MacroSilicon Technology Co.,Ltd.
-******************************************************************************/
-#ifndef __MACROSILICON_MS928X_PROGRAMMING_INTERFACE_H__
-#define __MACROSILICON_MS928X_PROGRAMMING_INTERFACE_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum _I2C_SPEED_CHOOSE_INFORMATION
-{
-  I2C_SPEED_20K = (UINT8)0,
-  I2C_SPEED_100K = (UINT8)1,
-  I2C_SPEED_400K = (UINT8)2,
-  I2C_SPEED_750K = (UINT8)3,
-
-} I2C_SPEED_E;
-
-extern UINT8 byIicDelay;
-
-extern VOID Sys_Reset(VOID);
-
-// Delay a period of time.
-extern VOID Delay_ms(UINT8 u8ms);
-extern VOID Delay_us(UINT8 u8us);
-
-//
-extern VOID I2C_Sel_Speed(UINT8 u8speed);
-extern UINT8 I2C16_ReadByte(UINT8 u8addr, UINT16 u16index);
-extern VOID I2C16_WriteByte(UINT8 u8addr, UINT16 u16index, UINT8 u8value);
-
-//
-extern BOOL I2C_ReadBytes(UINT8 u8addr, UINT8 u8index, UINT8 *pIn, UINT8 u8len);
-extern UINT8  I2C_ReadByte(UINT8 u8addr, UINT8 u8index);
-extern VOID I2C_WriteByte(UINT8 u8addr, UINT8 u8index, UINT8 u8value);
-
-bool GetHVPixel(UINT8* HVPixelData);
-bool StoreHVPixel(UINT8* HVPixelData);
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif  // __MACROSILICON_MS928X_PROGRAMMING_INTERFACE_H__

+ 1 - 0
project/solution/ble_hid_composite/touch/include/TouchCommon.h

@@ -234,6 +234,7 @@ extern UINT16 Press_Flag;
 extern UINT16 StylusPress;
 extern CHIP_TYPE ChipType;
 extern BOOL isBerlinSeries;
+extern BOOL bIsJDSeries;
 extern BOOL GioInterruptFlag;
 extern UINT8 TouchNum;
 extern INT16 CheckPos;

+ 1 - 1
project/solution/ble_hid_composite/touch/include/TouchConfig.h

@@ -26,7 +26,7 @@ typedef enum {
     CHIP_TYPE_BERLINA,
     CHIP_TYPE_BERLIND,
     CHIP_TYPE_78XX,
-    CHIP_TYPE_FT5XXX,
+    CHIP_TYPE_JD9366,
     CHIP_TYPE_NUM,
 }CHIP_TYPE;
 

+ 1 - 0
project/solution/ble_hid_composite/touch/include/TouchInclude.h

@@ -10,5 +10,6 @@
 #include "HidReport.h"
 #include "GoodixTouch.h"
 #include "BerlinTouch.h"
+#include "JDTouch.h"
 #include "Touch.h"
 #endif

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio