The PropellerLoader class provides an implementation of the Propeller download protocol. More...

#include <PropellerLoader>

Inherits QObject.

Public Types

enum  LoaderError {
  NoError, DeviceBusyError, DeviceNotOpenError, DeviceNotFoundError,
  DownloadInProgressError, InvalidImageError, VerifyRamError, WriteEepromError,
  VerifyEepromError, TimeoutError, HandshakeError, InvalidHandshakeError,
  UnknownError
}
 

Signals

void finished ()
 
void success ()
 
void failure ()
 
void prepared ()
 
void payload_sent ()
 
void handshake_received ()
 
void upload_completed ()
 
void acknowledged ()
 
void statusChanged (const QString &message)
 

Public Member Functions

 PropellerLoader (PropellerManager *manager, const QString &portname=QString(), QObject *parent=0)
 
 ~PropellerLoader ()
 
int version ()
 
QString versionString (int version)
 
bool upload (PropellerImage image, bool write=false, bool run=true, bool wait=false)
 

Properties

QString status
 
int stat
 

Detailed Description

The PropellerLoader class provides an implementation of the Propeller download protocol.

PropellerLoader automatically selects the best download strategy based on the given image to download and the target device.

  • If downloading to an XBee device, high-speed loading must be used. If a crystal oscillator is not defined, PropellerManager errors.
  • If downloading through a serial connection, use high-speed download if a crystal oscillator is defined, otherwise use the basic protocol.

PropellerDevice selects the reset strategy based on the port name. This can be overridden via the useReset() function. At present, all devices assume DTR reset as the default, except ttyAMA as this is specific to the ARM architecture and uses GPIO.

See also
PropellerTerminal

Member Enumeration Documentation

Enumerator
NoError 
DeviceBusyError 
DeviceNotOpenError 
DeviceNotFoundError 
DownloadInProgressError 
InvalidImageError 
VerifyRamError 
WriteEepromError 
VerifyEepromError 
TimeoutError 
HandshakeError 
InvalidHandshakeError 
UnknownError 

Constructor & Destructor Documentation

PropellerLoader::PropellerLoader ( PropellerManager manager,
const QString &  portname = QString(),
QObject *  parent = 0 
)
PropellerLoader::~PropellerLoader ( )

Member Function Documentation

void PropellerLoader::acknowledged ( )
signal
void PropellerLoader::failure ( )
signal
void PropellerLoader::finished ( )
signal
void PropellerLoader::handshake_received ( )
signal
void PropellerLoader::payload_sent ( )
signal
void PropellerLoader::prepared ( )
signal
void PropellerLoader::statusChanged ( const QString &  message)
signal
void PropellerLoader::success ( )
signal
bool PropellerLoader::upload ( PropellerImage  image,
bool  write = false,
bool  run = true,
bool  wait = false 
)

Upload a PropellerImage object to the target.

Parameters
imageThe PropellerImage to upload.
writeWrite the image to the EEPROM.
runRun the image after downloading.
void PropellerLoader::upload_completed ( )
signal
int PropellerLoader::version ( )

Get the version of the connected device.

Returns
The version number, or 0 if not found.
QString PropellerLoader::versionString ( int  version)

Property Documentation

int PropellerLoader::stat
QString PropellerLoader::status