Index: download/24g_address.hex
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/24g_address.hex	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/24g_address.hex	(working copy)
@@ -0,0 +1 @@
+00 00 00 00
\ No newline at end of file
Index: download/YC1021-UserGuide v1.2.docx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: download/YC1021-UserGuide v1.2.docx
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/YC1021-UserGuide v1.2.docx	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/YC1021-UserGuide v1.2.docx	(working copy)

Property changes on: download/YC1021-UserGuide v1.2.docx
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: download/YC1021-UserGuide v1.2.pdf
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/YC1021-UserGuide v1.2.pdf	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/YC1021-UserGuide v1.2.pdf	(working copy)
@@ -0,0 +1,5 @@
+%PDF-1.7
+%³
+1 0 obj
<</Names <</Dests 4 0 R>> /Outlines 5 0 R /Pages 2 0 R /Type /Catalog>>
endobj
3 0 obj
<</Author (KouFan) /Comments () /Company () /CreationDate (D:20161108165904+08'59') /Creator (WPS Office) /Keywords () /ModDate (D:20161108165904+08'59') /Producer () /SourceModified (D:20161108165904+08'59') /Subject () /Title () /Trapped false>>
endobj
19 0 obj
<</BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 189 /Length 10053 /Matte [0 0 0] /Subtype /Image /Type /XObject /Width 749>>
+stream
+xw@G+EEQXb,I-Xc/QcwbAzgٻys{;;;U##FjlZȲh1%K9s+YJ
\ No newline at end of file
Index: download/YcDownload.bat
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/YcDownload.bat	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/YcDownload.bat	(working copy)
@@ -0,0 +1,36 @@
+@echo off
+:start
+set/p cmd=Please click enter to download:
+if /I "%cmd%" equ "d" (goto download)
+if /I "%cmd%" equ "D" (goto download)
+if "%cmd%" equ "" (goto download)  else (goto error)
+
+
+:download
+e pu
+e ku
+ping 127.1 -n 1 >nul
+e pu
+ping 127.1 -n 1 >nul
+e 8081 08
+call updateADDR.bat
+e fc
+e fp
+e ku
+e au
+e pu
+e 40a0l6
+e 44a0l6
+e ku
+e au
+goto end
+
+:end
+set cmd=d
+echo/
+goto start
+
+:error
+echo Cmd error, enter again
+goto end
+
Index: download/ble_address.hex
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/ble_address.hex	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/ble_address.hex	(working copy)
@@ -0,0 +1 @@
+00 00 00 00 00 00
\ No newline at end of file
Index: download/bt3.0_address.hex
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/bt3.0_address.hex	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/bt3.0_address.hex	(working copy)
@@ -0,0 +1 @@
+00 00 00 00 00 00
\ No newline at end of file
Index: download/updataADDR_24G.pl
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_24G.pl	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_24G.pl	(working copy)
@@ -0,0 +1,190 @@
+$eeprom_path=$ARGV[0];
+$address_path=$ARGV[1];
+open (file , $eeprom_path)||die ("Could not open file");
+@text = <file>;
+open (Result , ">$eeprom_path")||die ("Could not open file");
+open (Address , $address_path)||die ("Could not open file");
+@Address = <Address>;
+close(Address);
+$Address = @Address[0];
+$HavedADDR = 0;
+$ADDRSub=0;
+$Die=0;
+if($Address =~ /[\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2}/){
+	if($Address =~ /[1-9a-fA-F]/){
+		$HavedADDR = 1;
+		@ADDR = split (/[ \n]+/,$Address);
+	}
+}
+else{
+	if($Address =~ /\S{2} \S{2} \S{2}/){
+		$Die=2;#data is error
+	}
+	else{
+		$Die=1;#structure is error
+	}
+	#die("illegal address");
+}
+
+$Sub = 0;
+$Match = 0;
+$spill = 0;
+$AllSpill = 0;
+$MatchBit=1;
+$MatchStr="";
+$MatchFirstVal="";
+@ave = ("aa\n","55\n","04\n","00\n","9f\n","48\n");
+$found_ave = 0;
+$length_text = @text;
+$replace_str = "";
+@BT_ADDR_3 = ("","","","");
+$BTADDRSub=0;
+
+for($count=0;$count<$length_text;$count++){
+	$text = @text[$count];
+#foreach $text (@text){
+	if($Match==1){
+		if($HavedADDR==1){
+			$replace_str = $replace_str.@ADDR[$ADDRSub]."\n";
+			print Result (@ADDR[$ADDRSub],"\n");
+			@BT_ADDR_3[$BTADDRSub]=@ADDR[$ADDRSub];
+			$BTADDRSub++;
+			$ADDRSub++;
+			if($ADDRSub>=4){
+				$Match=0;
+				$HavedADDR=0;
+				open (Address , ">$address_path")||die ("Could not open file");
+				print Address ("00 00 00 00");
+				close(Address);
+			}
+		}
+		else{
+		$Match=0;
+		$text = &hex_add($text);
+		if($text eq "100"){
+			$spill=1;
+			if($MatchBit==1){
+				$MatchFirstVal="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			elsif($MatchBit<4){
+				$MatchStr.="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			else{
+				$MatchFirstVal="01\n";
+				$MatchStr.="00\n";
+				$AllSpill=1;
+				@BT_ADDR_3[$BTADDRSub]="00";
+				@BT_ADDR_3[0]="01";
+				$BTADDRSub++;
+			}
+			$Match=1;
+			$MatchBit++;
+		}
+		elsif($spill==0){
+			print Result ($text,"\n");
+			@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			$replace_str = $replace_str.$text."\n";
+			for($i=1;$i<4;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		else{
+			@BT_ADDR_3[$BTADDRSub]=&DeletEnter($text);
+			&spill_print($text);
+			print Result ("\n");
+			$replace_str=$replace_str."\n";
+			#@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			for($i=1;$i<6-$MatchBit;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		}
+	}
+	else{
+		print Result ($text);
+		if(($Match == 0) && ($text eq @ave[$Sub])){
+			if($Sub < 5){
+				$Sub=$Sub+1;
+			}
+			else{
+				if(@text[$count+5] eq "aa\n" && @text[$count+6] eq "55\n"){
+					$Match=1;
+					$found_ave=1;
+				}
+				else{
+					$Match=0;
+				}
+				$Sub=0;
+			}
+		}
+		else{
+			$Sub=0;
+		}
+	}
+	if($AllSpill==1){
+		&spill_print("");
+	}
+}
+if($found_ave==1){
+	print ("2.4g address:\t");
+	for($count=0;$count<4;$count++)
+	{
+		print (@BT_ADDR_3[3-$count]," ");
+	}
+	print ("\n");
+}
+close(file);
+close(Result);
+
+if($Die==1){
+	print ("ERROR :address structure is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00");
+	close(Address);
+}
+elsif($Die==2){
+	print ("ERROR :address data is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00");
+	close(Address);
+}
+open (Address , ">$address_path")||die ("Could not open file");
+print Address ("00 00 00 00");
+close(Address);
+close(Result);
+
+sub hex_add{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	$data++;
+	return(sprintf("%02x",$data));
+}
+sub DeletEnter{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	return(sprintf("%02x",$data));
+}
+sub spill_print{
+	my($localStr)=@_;
+	$AllSpill=0;
+	$Match=0;
+	$spill=0;
+	$text = $MatchFirstVal.$MatchStr.$localStr;
+	$replace_str = $text;
+	print Result ($text);
+	$MatchFirstVal="";
+	$MatchStr="";
+	$MatchBit=1;
+}
\ No newline at end of file
Index: download/updataADDR_BLE.pl
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_BLE.pl	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_BLE.pl	(working copy)
@@ -0,0 +1,190 @@
+$eeprom_path=$ARGV[0];
+$address_path=$ARGV[1];
+open (file , $eeprom_path)||die ("Could not open file");
+@text = <file>;
+open (Result , ">$eeprom_path")||die ("Could not open file");
+open (Address , $address_path)||die ("Could not open file");
+@Address = <Address>;
+close(Address);
+$Address = @Address[0];
+$HavedADDR = 0;
+$ADDRSub=0;
+$Die=0;
+if($Address =~ /[\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2}/){
+	if($Address =~ /[1-9a-fA-F]/){
+		$HavedADDR = 1;
+		@ADDR = split (/[ \n]+/,$Address);
+	}
+}
+else{
+	if($Address =~ /\S{2} \S{2} \S{2} \S{2} \S{2}/){
+		$Die=2;#data is error
+	}
+	else{
+		$Die=1;#structure is error
+	}
+	#die("illegal address");
+}
+$Sub = 0;
+$Match = 0;
+$spill = 0;
+$AllSpill = 0;
+$MatchBit=1;
+$MatchStr="";
+$MatchFirstVal="";
+@ave = ("aa\n","55\n","06\n","00\n","a0\n","44\n");
+$found_ave = 0;
+$length_text = @text;
+$replace_str = "";
+@BT_ADDR_3 = ("","","","","","");
+$BTADDRSub=0;
+
+for($count=0;$count<$length_text;$count++){
+	$text = @text[$count];
+#foreach $text (@text){
+	if($Match==1){
+		if($HavedADDR==1){
+			$replace_str = $replace_str.@ADDR[$ADDRSub]."\n";
+			print Result (@ADDR[$ADDRSub],"\n");
+			@BT_ADDR_3[$BTADDRSub]=@ADDR[$ADDRSub];
+			$BTADDRSub++;
+			$ADDRSub++;
+			if($ADDRSub>=6){
+				$Match=0;
+				$HavedADDR=0;
+				open (Address , ">$address_path")||die ("Could not open file");
+				print Address ("00 00 00 00 00 00");
+				close(Address);
+			}
+		}
+		else{
+		$Match=0;
+		$text = &hex_add($text);
+		if($text eq "100"){
+			$spill=1;
+			if($MatchBit==1){
+				$MatchFirstVal="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			elsif($MatchBit<6){
+				$MatchStr.="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			else{
+				$MatchFirstVal="01\n";
+				$MatchStr.="00\n";
+				$AllSpill=1;
+				@BT_ADDR_3[$BTADDRSub]="00";
+				@BT_ADDR_3[0]="01";
+				$BTADDRSub++;
+			}
+			$Match=1;
+			$MatchBit++;
+		}
+		elsif($spill==0){
+			print Result ($text,"\n");
+			@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			$replace_str = $replace_str.$text."\n";
+			for($i=1;$i<6;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		else{
+			@BT_ADDR_3[$BTADDRSub]=&DeletEnter($text);
+			&spill_print($text);
+			print Result ("\n");
+			$replace_str=$replace_str."\n";
+			#@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			for($i=1;$i<6-$MatchBit;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		}
+	}
+	else{
+		print Result ($text);
+		if(($Match == 0) && ($text eq @ave[$Sub])){
+			if($Sub < 5){
+				$Sub=$Sub+1;
+			}
+			else{
+				if(@text[$count+7] eq "aa\n" && @text[$count+8] eq "55\n"){
+					$Match=1;
+					$found_ave=1;
+				}
+				else{
+					$Match=0;
+				}
+				$Sub=0;
+			}
+		}
+		else{
+			$Sub=0;
+		}
+	}
+	if($AllSpill==1){
+		&spill_print("");
+	}
+}
+if($found_ave==1){
+	print ("Ble address:\t\t");
+	for($count=0;$count<6;$count++)
+	{
+		print (@BT_ADDR_3[5-$count]," ");
+	}
+	print ("\n");
+}
+close(file);
+close(Result);
+
+if($Die==1){
+	print ("ERROR :address structure is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+elsif($Die==2){
+	print ("ERROR :address data is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+open (Address , ">$address_path")||die ("Could not open file");
+print Address ("00 00 00 00 00 00");
+close(Address);
+
+close(Result);
+
+sub hex_add{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	$data++;
+	return(sprintf("%02x",$data));
+}
+sub DeletEnter{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	return(sprintf("%02x",$data));
+}
+sub spill_print{
+	my($localStr)=@_;
+	$AllSpill=0;
+	$Match=0;
+	$spill=0;
+	$text = $MatchFirstVal.$MatchStr.$localStr;
+	$replace_str = $text;
+	print Result ($text);
+	$MatchFirstVal="";
+	$MatchStr="";
+	$MatchBit=1;
+}
\ No newline at end of file
Index: download/updataADDR_BT.pl
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_BT.pl	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/updataADDR_BT.pl	(working copy)
@@ -0,0 +1,190 @@
+$eeprom_path=$ARGV[0];
+$address_path=$ARGV[1];
+open (file , $eeprom_path)||die ("Could not open file");
+@text = <file>;
+open (Result , ">$eeprom_path")||die ("Could not open file");
+open (Address , $address_path)||die ("Could not open file");
+@Address = <Address>;
+close(Address);
+$Address = @Address[0];
+$HavedADDR = 0;
+$ADDRSub=0;
+$Die=0;
+if($Address =~ /[\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2} [\da-fA-F]{2}/){
+	if($Address =~ /[1-9a-fA-F]/){
+		$HavedADDR = 1;
+		@ADDR = split (/[ \n]+/,$Address);
+	}
+}
+else{
+	if($Address =~ /\S{2} \S{2} \S{2} \S{2} \S{2}/){
+		$Die=2;#data is error
+	}
+	else{
+		$Die=1;#structure is error
+	}
+	#die("illegal address");
+}
+
+$Sub = 0;
+$Match = 0;
+$spill = 0;
+$AllSpill = 0;
+$MatchBit=1;
+$MatchStr="";
+$MatchFirstVal="";
+@ave = ("aa\n","55\n","06\n","00\n","a0\n","40\n");
+$found_ave = 0;
+$length_text = @text;
+$replace_str = "";
+@BT_ADDR_3 = ("","","","","","");
+$BTADDRSub=0;
+
+for($count=0;$count<$length_text;$count++){
+	$text = @text[$count];
+#foreach $text (@text){
+	if($Match==1){
+		if($HavedADDR==1){
+			$replace_str = $replace_str.@ADDR[$ADDRSub]."\n";
+			print Result (@ADDR[$ADDRSub],"\n");
+			@BT_ADDR_3[$BTADDRSub]=@ADDR[$ADDRSub];
+			$BTADDRSub++;
+			$ADDRSub++;
+			if($ADDRSub>=6){
+				$Match=0;
+				$HavedADDR=0;
+				open (Address , ">$address_path")||die ("Could not open file");
+				print Address ("00 00 00 00 00 00");
+				close(Address);
+			}
+		}
+		else{
+		$Match=0;
+		$text = &hex_add($text);
+		if($text eq "100"){
+			$spill=1;
+			if($MatchBit==1){
+				$MatchFirstVal="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			elsif($MatchBit<6){
+				$MatchStr.="00\n";
+				@BT_ADDR_3[$BTADDRSub]="00";
+				$BTADDRSub++;
+			}
+			else{
+				$MatchFirstVal="01\n";
+				$MatchStr.="00\n";
+				$AllSpill=1;
+				@BT_ADDR_3[$BTADDRSub]="00";
+				@BT_ADDR_3[0]="01";
+				$BTADDRSub++;
+			}
+			$Match=1;
+			$MatchBit++;
+		}
+		elsif($spill==0){
+			print Result ($text,"\n");
+			@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			$replace_str = $replace_str.$text."\n";
+			for($i=1;$i<6;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		else{
+			@BT_ADDR_3[$BTADDRSub]=&DeletEnter($text);
+			&spill_print($text);
+			print Result ("\n");
+			$replace_str=$replace_str."\n";
+			#@BT_ADDR_3[$BTADDRSub]=$text;
+			$BTADDRSub++;
+			for($i=1;$i<6-$MatchBit;$i++)
+			{
+				@BT_ADDR_3[$BTADDRSub]=&DeletEnter(@text[$count+$i]);
+				$BTADDRSub++;
+				$replace_str = $replace_str.@text[$count+$i];
+			}
+		}
+		}
+	}
+	else{
+		print Result ($text);
+		if(($Match == 0) && ($text eq @ave[$Sub])){
+			if($Sub < 5){
+				$Sub=$Sub+1;
+			}
+			else{
+				if(@text[$count+7] eq "aa\n" && @text[$count+8] eq "55\n"){
+					$Match=1;
+					$found_ave=1;
+				}
+				else{
+					$Match=0;
+				}
+				$Sub=0;
+			}
+		}
+		else{
+			$Sub=0;
+		}
+	}
+	if($AllSpill==1){
+		&spill_print("");
+	}
+}
+if($found_ave==1){
+	print ("Bluetooth 3.0 address:\t");
+	for($count=0;$count<6;$count++)
+	{
+		print (@BT_ADDR_3[5-$count]," ");
+	}
+	print ("\n");
+}
+close(file);
+close(Result);
+
+if($Die==1){
+	print ("ERROR :address structure is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+elsif($Die==2){
+	print ("ERROR :address data is error in address.hex\n");
+	open (Address , ">$address_path")||die ("Could not open file");
+	print Address ("00 00 00 00 00 00");
+	close(Address);
+}
+open (Address , ">$address_path")||die ("Could not open file");
+print Address ("00 00 00 00 00 00");
+close(Address);
+close(Result);
+
+sub hex_add{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	$data++;
+	return(sprintf("%02x",$data));
+}
+sub DeletEnter{
+	my($Original_data)=@_;
+	$data=hex($Original_data);
+	return(sprintf("%02x",$data));
+}
+sub spill_print{
+	my($localStr)=@_;
+	$AllSpill=0;
+	$Match=0;
+	$spill=0;
+	$text = $MatchFirstVal.$MatchStr.$localStr;
+	$replace_str = $text;
+	print Result ($text);
+	$MatchFirstVal="";
+	$MatchStr="";
+	$MatchBit=1;
+}
\ No newline at end of file
Index: download/updateADDR.bat
===================================================================
--- /branch/mouse_project/TestTools/1066_YC_TOOL/download/updateADDR.bat	(nonexistent)
+++ /branch/mouse_project/TestTools/1066_YC_TOOL/download/updateADDR.bat	(working copy)
@@ -0,0 +1,3 @@
+@echo off
+perl updataADDR_BT.pl output/flash.dat bt3.0_address.hex
+perl updataADDR_BLE.pl output/flash.dat ble_address.hex
\ No newline at end of file
