-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,465 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace SenhaixFreqWriter.Constants.Shx8800Pro; | ||
|
||
public enum OpType | ||
{ | ||
Read, | ||
Write | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace SenhaixFreqWriter.Constants.Shx8800Pro; | ||
|
||
public enum Step | ||
{ | ||
StepHandshake1, | ||
StepHandshake2, | ||
StepHandshake3, | ||
StepHandshake4, | ||
StepRead1, | ||
StepRead2, | ||
StepWrite1, | ||
StepWrite2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace SenhaixFreqWriter.DataModels.Shx8800Pro; | ||
|
||
public class ProgressBarValue | ||
{ | ||
public string Content; | ||
public int Value; | ||
|
||
public ProgressBarValue(int value, string content) | ||
{ | ||
Value = value; | ||
Content = content; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace SenhaixFreqWriter.Utils.Serial; | ||
|
||
public class DataHelper | ||
{ | ||
private byte command; | ||
|
||
private ushort args; | ||
|
||
public byte[] payload = new byte[68]; | ||
|
||
public byte[] LoadPackage(byte cmd, ushort address, byte[] dat, byte len) | ||
{ | ||
byte[] array = new byte[68]; | ||
for (int i = 0; i < 64; i++) | ||
{ | ||
array[4 + i] = 0; | ||
} | ||
array[0] = cmd; | ||
array[1] = (byte)(address >> 8); | ||
array[2] = (byte)address; | ||
array[3] = len; | ||
for (int j = 0; j < len; j++) | ||
{ | ||
array[4 + j] = dat[j]; | ||
} | ||
return array; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.