C# Class SendToC2.C2Flash

Inheritance: System.IO.Ports.SerialPort
Mostrar archivo Open project: x893/C2.Flash Class Usage Examples

Public Methods

Method 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

Method 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 method

public C2Flash ( string portname ) : System
portname string
return System

C2Flash() public method

public C2Flash ( string portname, int baud ) : System
portname string
baud int
return System

FlashRead() public method

public FlashRead ( uint address, int length ) : byte[]
address uint
length int
return byte[]

FlashWrite() public method

public FlashWrite ( uint Address, byte bytes ) : C2_ERROR
Address uint
bytes byte
return C2_ERROR

Initialize() public method

public Initialize ( ) : C2_ERROR
return C2_ERROR

SendCommand() public method

public SendCommand ( string cmd ) : C2_ERROR
cmd string
return C2_ERROR

SendCommand() public method

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
return C2_ERROR