C# Class BusPirate.BPPort

Inheritance: System.IO.Ports.SerialPort, IDisposable
Mostra file Open project: x893/BusPirateConsole Class Usage Examples

Public Properties

Property Type Description
Pins Pin[]

Public Methods

Method Description
AuxHigh ( ) : BP_RESPONSE
AuxLow ( ) : BP_RESPONSE
AuxRead ( ) : BP_RESPONSE
BPPort ( string portName ) : System
BPPort_DataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void
Bootloader ( ) : BP_RESPONSE
Connect ( ) : BP_RESPONSE
DisablePWM ( ) : BP_RESPONSE
Disconnect ( ) : void
Execute ( string cmd ) : BP_RESPONSE
Info ( ) : BP_RESPONSE
ModeDIO ( ) : BP_RESPONSE
ModeHiZ ( ) : BP_RESPONSE
ModeI2C ( BP_I2C_SPEED speed ) : BP_RESPONSE
ModeLCD ( ) : BP_RESPONSE
ModeSPI ( BP_SPI_SPEED speed, BP_SPI_CLOCK_POLARITY polarity, BP_SPI_CLOCK_EDGE edge, BP_SPI_INPUT_PHASE phase, BP_CS_POLARITY cs, BP_OUTPUT output ) : BP_RESPONSE
ModeUART ( BP_UART_SPEED speed, BP_UART_PROTOCOL protocol, BP_UART_STOP stop, BP_UART_POLARITY polarity, BP_OUTPUT output ) : BP_RESPONSE
ModeWIRE1 ( ) : BP_RESPONSE
ModeWIRE2 ( BP_WIRE_SPEED speed, BP_OUTPUT output ) : BP_RESPONSE
ModeWIRE3 ( BP_WIRE_SPEED speed, BP_CS_POLARITY cs, BP_OUTPUT output ) : BP_RESPONSE
OutputBin ( ) : BP_RESPONSE
OutputDec ( ) : BP_RESPONSE
OutputHex ( ) : BP_RESPONSE
OutputRaw ( ) : BP_RESPONSE
Pullup ( BP_PUULUP pullup ) : BP_RESPONSE
Pullup3V3 ( ) : BP_RESPONSE
Pullup5V ( ) : BP_RESPONSE
PullupOff ( ) : BP_RESPONSE
PullupOn ( ) : BP_RESPONSE
PullupVPU ( ) : BP_RESPONSE
Reset ( ) : BP_RESPONSE
Send ( char c ) : BP_RESPONSE
SendWait ( int command ) : BP_RESPONSE
SendWait ( string command ) : BP_RESPONSE

Send command and wait for command prompt

SendWait ( string command, List waitFor, int retry, uint timeout ) : BP_RESPONSE
SetAUX2AUX ( ) : BP_RESPONSE
SetAUX2CS ( ) : BP_RESPONSE
SetLSB ( ) : BP_RESPONSE
SetMSB ( ) : BP_RESPONSE

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
Delay_mS ( int delay ) : BP_RESPONSE
Delay_uS ( int delay ) : BP_RESPONSE
GetLine ( int index ) : string
OutputFormat ( BP_OUTPUT_FORMAT format ) : BP_RESPONSE
ParsePinMode ( string modes ) : BP_RESPONSE
ParsePinName ( string names ) : BP_RESPONSE
ParseVoltage ( string values ) : BP_RESPONSE
PowerOff ( ) : BP_RESPONSE
PowerOn ( ) : BP_RESPONSE
PrepareSend ( ) : void
ProcessResponse ( string cmd ) : void
Voltage ( ) : BP_RESPONSE

Method Details

AuxHigh() public method

public AuxHigh ( ) : BP_RESPONSE
return BP_RESPONSE

AuxLow() public method

public AuxLow ( ) : BP_RESPONSE
return BP_RESPONSE

AuxRead() public method

public AuxRead ( ) : BP_RESPONSE
return BP_RESPONSE

BPPort() public method

public BPPort ( string portName ) : System
portName string
return System

BPPort_DataReceived() public method

public BPPort_DataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void
sender object
e System.IO.Ports.SerialDataReceivedEventArgs
return void

Bootloader() public method

public Bootloader ( ) : BP_RESPONSE
return BP_RESPONSE

Connect() public method

public Connect ( ) : BP_RESPONSE
return BP_RESPONSE

DisablePWM() public method

public DisablePWM ( ) : BP_RESPONSE
return BP_RESPONSE

Disconnect() public method

public Disconnect ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Execute() public method

public Execute ( string cmd ) : BP_RESPONSE
cmd string
return BP_RESPONSE

Info() public method

public Info ( ) : BP_RESPONSE
return BP_RESPONSE

ModeDIO() public method

public ModeDIO ( ) : BP_RESPONSE
return BP_RESPONSE

ModeHiZ() public method

public ModeHiZ ( ) : BP_RESPONSE
return BP_RESPONSE

ModeI2C() public method

public ModeI2C ( BP_I2C_SPEED speed ) : BP_RESPONSE
speed BP_I2C_SPEED
return BP_RESPONSE

ModeLCD() public method

public ModeLCD ( ) : BP_RESPONSE
return BP_RESPONSE

ModeSPI() public method

public ModeSPI ( BP_SPI_SPEED speed, BP_SPI_CLOCK_POLARITY polarity, BP_SPI_CLOCK_EDGE edge, BP_SPI_INPUT_PHASE phase, BP_CS_POLARITY cs, BP_OUTPUT output ) : BP_RESPONSE
speed BP_SPI_SPEED
polarity BP_SPI_CLOCK_POLARITY
edge BP_SPI_CLOCK_EDGE
phase BP_SPI_INPUT_PHASE
cs BP_CS_POLARITY
output BP_OUTPUT
return BP_RESPONSE

ModeUART() public method

public ModeUART ( BP_UART_SPEED speed, BP_UART_PROTOCOL protocol, BP_UART_STOP stop, BP_UART_POLARITY polarity, BP_OUTPUT output ) : BP_RESPONSE
speed BP_UART_SPEED
protocol BP_UART_PROTOCOL
stop BP_UART_STOP
polarity BP_UART_POLARITY
output BP_OUTPUT
return BP_RESPONSE

ModeWIRE1() public method

public ModeWIRE1 ( ) : BP_RESPONSE
return BP_RESPONSE

ModeWIRE2() public method

public ModeWIRE2 ( BP_WIRE_SPEED speed, BP_OUTPUT output ) : BP_RESPONSE
speed BP_WIRE_SPEED
output BP_OUTPUT
return BP_RESPONSE

ModeWIRE3() public method

public ModeWIRE3 ( BP_WIRE_SPEED speed, BP_CS_POLARITY cs, BP_OUTPUT output ) : BP_RESPONSE
speed BP_WIRE_SPEED
cs BP_CS_POLARITY
output BP_OUTPUT
return BP_RESPONSE

OutputBin() public method

public OutputBin ( ) : BP_RESPONSE
return BP_RESPONSE

OutputDec() public method

public OutputDec ( ) : BP_RESPONSE
return BP_RESPONSE

OutputHex() public method

public OutputHex ( ) : BP_RESPONSE
return BP_RESPONSE

OutputRaw() public method

public OutputRaw ( ) : BP_RESPONSE
return BP_RESPONSE

Pullup() public method

public Pullup ( BP_PUULUP pullup ) : BP_RESPONSE
pullup BP_PUULUP
return BP_RESPONSE

Pullup3V3() public method

public Pullup3V3 ( ) : BP_RESPONSE
return BP_RESPONSE

Pullup5V() public method

public Pullup5V ( ) : BP_RESPONSE
return BP_RESPONSE

PullupOff() public method

public PullupOff ( ) : BP_RESPONSE
return BP_RESPONSE

PullupOn() public method

public PullupOn ( ) : BP_RESPONSE
return BP_RESPONSE

PullupVPU() public method

public PullupVPU ( ) : BP_RESPONSE
return BP_RESPONSE

Reset() public method

public Reset ( ) : BP_RESPONSE
return BP_RESPONSE

Send() public method

public Send ( char c ) : BP_RESPONSE
c char
return BP_RESPONSE

SendWait() public method

public SendWait ( int command ) : BP_RESPONSE
command int
return BP_RESPONSE

SendWait() public method

Send command and wait for command prompt
public SendWait ( string command ) : BP_RESPONSE
command string
return BP_RESPONSE

SendWait() public method

public SendWait ( string command, List waitFor, int retry, uint timeout ) : BP_RESPONSE
command string
waitFor List
retry int
timeout uint
return BP_RESPONSE

SetAUX2AUX() public method

public SetAUX2AUX ( ) : BP_RESPONSE
return BP_RESPONSE

SetAUX2CS() public method

public SetAUX2CS ( ) : BP_RESPONSE
return BP_RESPONSE

SetLSB() public method

public SetLSB ( ) : BP_RESPONSE
return BP_RESPONSE

SetMSB() public method

public SetMSB ( ) : BP_RESPONSE
return BP_RESPONSE

Property Details

Pins public_oe property

public Pin[] Pins
return Pin[]