C# Class SendToC2.C2Flash

Inheritance: System.IO.Ports.SerialPort
Afficher le fichier Open project: x893/C2.Flash Class Usage Examples

Méthodes publiques

Méthode Description
C2Flash ( string portname ) : System
C2Flash ( string portname, int baud ) : System
FlashRead ( uint address, int length ) : byte[]
FlashWrite ( uint Address, byte bytes ) : C2_ERROR
Initialize ( ) : C2_ERROR
SendCommand ( string cmd ) : C2_ERROR
SendCommand ( string cmd, int timeout_ms ) : C2_ERROR

Send command to C2 flasher and wait response

Private Methods

Méthode Description
Bin2Hex ( byte bytes ) : string
Data_Received ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void
FlashCompare ( byte bytes, uint Address ) : bool
Hex2Bin ( string hex ) : byte
Hex2Nibble ( char ch ) : byte

Method Details

C2Flash() public méthode

public C2Flash ( string portname ) : System
portname string
Résultat System

C2Flash() public méthode

public C2Flash ( string portname, int baud ) : System
portname string
baud int
Résultat System

FlashRead() public méthode

public FlashRead ( uint address, int length ) : byte[]
address uint
length int
Résultat byte[]

FlashWrite() public méthode

public FlashWrite ( uint Address, byte bytes ) : C2_ERROR
Address uint
bytes byte
Résultat C2_ERROR

Initialize() public méthode

public Initialize ( ) : C2_ERROR
Résultat C2_ERROR

SendCommand() public méthode

public SendCommand ( string cmd ) : C2_ERROR
cmd string
Résultat C2_ERROR

SendCommand() public méthode

Send command to C2 flasher and wait response
public SendCommand ( string cmd, int timeout_ms ) : C2_ERROR
cmd string command
timeout_ms int #0 for timeout or =0 for infinite timeout
Résultat C2_ERROR