#include <yocto_spiport.h>
Public Member Functions | |
virtual int | _invokeValueCallback (string value) |
string | command (void) |
string | currentJob (void) |
int | errCount (void) |
string | get_command (void) |
string | get_currentJob (void) |
int | get_errCount (void) |
string | get_lastMsg (void) |
string | get_protocol (void) |
int | get_rxCount (void) |
int | get_rxMsgCount (void) |
Y_SHITFTSAMPLING_enum | get_shitftSampling (void) |
string | get_spiMode (void) |
Y_SSPOLARITY_enum | get_ssPolarity (void) |
string | get_startupJob (void) |
int | get_txCount (void) |
int | get_txMsgCount (void) |
Y_VOLTAGELEVEL_enum | get_voltageLevel (void) |
string | lastMsg (void) |
YSpiPort * | next (void) |
YSpiPort * | nextSpiPort (void) |
string | protocol (void) |
virtual string | queryLine (string query, int maxWait) |
virtual int | read_avail (void) |
virtual int | read_seek (int absPos) |
virtual int | read_tell (void) |
virtual vector< int > | readArray (int nChars) |
virtual string | readBin (int nChars) |
virtual int | readByte (void) |
virtual string | readHex (int nBytes) |
virtual string | readLine (void) |
virtual vector< string > | readMessages (string pattern, int maxWait) |
virtual string | readStr (int nChars) |
virtual int | registerValueCallback (YSpiPortValueCallback callback) |
virtual int | reset (void) |
int | rxCount (void) |
int | rxMsgCount (void) |
virtual int | selectJob (string jobfile) |
virtual int | sendCommand (string text) |
int | set_command (const string &newval) |
int | set_currentJob (const string &newval) |
int | set_protocol (const string &newval) |
int | set_shitftSampling (Y_SHITFTSAMPLING_enum newval) |
int | set_spiMode (const string &newval) |
virtual int | set_SS (int val) |
int | set_ssPolarity (Y_SSPOLARITY_enum newval) |
int | set_startupJob (const string &newval) |
int | set_voltageLevel (Y_VOLTAGELEVEL_enum newval) |
int | setCommand (const string &newval) |
int | setCurrentJob (const string &newval) |
int | setProtocol (const string &newval) |
int | setShitftSampling (Y_SHITFTSAMPLING_enum newval) |
int | setSpiMode (const string &newval) |
int | setSsPolarity (Y_SSPOLARITY_enum newval) |
int | setStartupJob (const string &newval) |
int | setVoltageLevel (Y_VOLTAGELEVEL_enum newval) |
Y_SHITFTSAMPLING_enum | shitftSampling (void) |
string | spiMode (void) |
Y_SSPOLARITY_enum | ssPolarity (void) |
string | startupJob (void) |
int | txCount (void) |
int | txMsgCount (void) |
virtual int | uploadJob (string jobfile, string jsonDef) |
Y_VOLTAGELEVEL_enum | voltageLevel (void) |
virtual int | writeArray (vector< int > byteList) |
virtual int | writeBin (string buff) |
virtual int | writeByte (int code) |
virtual int | writeHex (string hexString) |
virtual int | writeLine (string text) |
virtual int | writeStr (string text) |
~YSpiPort () | |
Public Member Functions inherited from YFunction | |
void | _clearDataStreamCache () |
string | _decode_json_string (const string &json) |
string | _download (const string &url) |
YDataStream * | _findDataStream (YDataSet &dataset, const string &def) |
string | _get_json_path (const string &json, const string &path) |
vector< string > | _json_get_array (const string &json) |
string | _json_get_key (const string &json, const string &data) |
string | _json_get_string (const string &json) |
int | _parseEx (yJsonStateMachine &j) |
virtual int | _parserHelper (void) |
string | _parseString (yJsonStateMachine &j) |
string | _request (const string &request) |
string | _requestEx (int tcpchan, const string &request, yapiRequestProgressCallback callback, void *context) |
void | _throw (YRETCODE errType, string errMsg) |
YRETCODE | _upload (const string &path, const string &content) |
YRETCODE | _uploadWithProgress (const string &path, const string &content, yapiRequestProgressCallback callback, void *context) |
string | advertisedValue (void) |
void | clearCache () |
string | describe (void) |
string | errMessage (void) |
string | errorMessage (void) |
YRETCODE | errorType (void) |
YRETCODE | errType (void) |
YFUN_DESCR | functionDescriptor (void) |
string | get_advertisedValue (void) |
string | get_errorMessage (void) |
YRETCODE | get_errorType (void) |
virtual string | get_friendlyName (void) |
YFUN_DESCR | get_functionDescriptor (void) |
string | get_functionId (void) |
string | get_hardwareId (void) |
string | get_hubSerial () |
string | get_logicalName (void) |
YModule * | get_module (void) |
void * | get_userData (void) |
bool | isOnline (void) |
YRETCODE | load (int msValidity) |
virtual string | loadAttribute (string attrName) |
string | logicalName (void) |
YModule * | module (void) |
virtual int | muteValueCallbacks (void) |
YFunction * | next (void) |
YFunction * | nextFunction (void) |
virtual int | registerValueCallback (YFunctionValueCallback callback) |
int | set_advertisedValue (const string &newval) |
int | set_logicalName (const string &newval) |
void | set_userData (void *data) |
int | setAdvertisedValue (const string &newval) |
int | setLogicalName (const string &newval) |
void | setUserData (void *data) |
virtual int | unmuteValueCallbacks (void) |
void * | userData (void) |
virtual | ~YFunction () |
Static Public Member Functions | |
static YSpiPort * | Find (string func) |
static YSpiPort * | FindSpiPort (string func) |
static YSpiPort * | First (void) |
static YSpiPort * | FirstSpiPort (void) |
Static Public Member Functions inherited from YFunction | |
static void | _ClearCache (void) |
static YFunction * | Find (string func) |
static YFunction * | FindFunction (string func) |
static YFunction * | First (void) |
static YFunction * | FirstFunction (void) |
Protected Member Functions | |
virtual int | _parseAttr (YJSONObject *json_val) |
YSpiPort (const string &func) | |
Protected Member Functions inherited from YFunction | |
YRETCODE | _buildSetRequest (const string &changeattr, const string *changeval, string &request, string &errmsg) |
string | _escapeAttr (const string &changeval) |
YRETCODE | _getDescriptor (YFUN_DESCR &fundescr, string &errMsg) |
YRETCODE | _getDevice (YDevice *&dev, string &errMsg) |
YRETCODE | _load_unsafe (int msValidity) |
YRETCODE | _nextFunction (string &hwId) |
int | _parse (YJSONObject *j) |
YRETCODE | _setAttr (string attrname, string newvalue) |
YFunction (const string &func) | |
Protected Attributes | |
string | _command |
string | _currentJob |
int | _errCount |
string | _lastMsg |
string | _protocol |
string | _rxbuff |
int | _rxbuffptr |
int | _rxCount |
int | _rxMsgCount |
int | _rxptr |
Y_SHITFTSAMPLING_enum | _shitftSampling |
string | _spiMode |
Y_SSPOLARITY_enum | _ssPolarity |
string | _startupJob |
int | _txCount |
int | _txMsgCount |
YSpiPortValueCallback | _valueCallbackSpiPort |
Y_VOLTAGELEVEL_enum | _voltageLevel |
Protected Attributes inherited from YFunction | |
string | _advertisedValue |
u64 | _cacheExpiration |
string | _className |
std::map< string, YDataStream * > | _dataStreams |
string | _func |
YFUN_DESCR | _fundescr |
string | _funId |
string | _hwId |
string | _lastErrorMsg |
YRETCODE | _lastErrorType |
string | _logicalName |
string | _serial |
yCRITICAL_SECTION | _this_cs |
void * | _userData |
YFunctionValueCallback | _valueCallbackFunction |
Friends | |
YSpiPort * | yFindSpiPort (const string &func) |
YSpiPort * | yFirstSpiPort (void) |
Additional Inherited Members | |
Static Protected Member Functions inherited from YFunction | |
static void | _AddToCache (const string &classname, const string &func, YFunction *obj) |
static YFunction * | _FindFromCache (const string &classname, const string &func) |
static void | _UpdateTimedReportCallbackList (YFunction *func, bool add) |
static void | _UpdateValueCallbackList (YFunction *func, bool add) |
Static Protected Attributes inherited from YFunction | |
static std::map< string, YFunction * > | _cache |
YSpiPort Class: SPI Port function interface
The SpiPort function interface allows you to fully drive a Yoctopuce SPI port, to send and receive data, and to configure communication parameters (baud rate, bit count, parity, flow control and protocol). Note that Yoctopuce SPI ports are not exposed as virtual COM ports. They are meant to be used in the same way as all Yoctopuce devices.
Definition at line 107 of file yocto_spiport.h.
|
protected |
Definition at line 51 of file yocto_spiport.cpp.
YSpiPort::~YSpiPort | ( | ) |
Definition at line 75 of file yocto_spiport.cpp.
|
virtual |
Reimplemented from YFunction.
Definition at line 836 of file yocto_spiport.cpp.
|
protectedvirtual |
Reimplemented from YFunction.
Definition at line 89 of file yocto_spiport.cpp.
|
inline |
Definition at line 302 of file yocto_spiport.h.
|
inline |
Definition at line 255 of file yocto_spiport.h.
|
inline |
Definition at line 207 of file yocto_spiport.h.
|
inlinestatic |
Definition at line 763 of file yocto_spiport.h.
|
static |
Retrieves a SPI port for a given identifier. The identifier can be specified using several formats:
This function does not require that the SPI port is online at the time it is invoked. The returned object is nevertheless valid. Use the method YSpiPort.isOnline() to test if the SPI port is indeed online at a given time. In case of ambiguity when looking for a SPI port by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.
If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.
func | : a string that uniquely characterizes the SPI port |
Definition at line 785 of file yocto_spiport.cpp.
|
inlinestatic |
Definition at line 787 of file yocto_spiport.h.
|
static |
Starts the enumeration of SPI ports currently accessible. Use the method YSpiPort.nextSpiPort() to iterate on next SPI ports.
Definition at line 1495 of file yocto_spiport.cpp.
string YSpiPort::get_command | ( | void | ) |
Definition at line 423 of file yocto_spiport.cpp.
string YSpiPort::get_currentJob | ( | void | ) |
Returns the name of the job file currently in use.
On failure, throws an exception or returns Y_CURRENTJOB_INVALID.
Definition at line 318 of file yocto_spiport.cpp.
int YSpiPort::get_errCount | ( | void | ) |
Returns the total number of communication errors detected since last reset.
On failure, throws an exception or returns Y_ERRCOUNT_INVALID.
Definition at line 202 of file yocto_spiport.cpp.
string YSpiPort::get_lastMsg | ( | void | ) |
Returns the latest message fully received (for Line and Frame protocols).
On failure, throws an exception or returns Y_LASTMSG_INVALID.
Definition at line 289 of file yocto_spiport.cpp.
string YSpiPort::get_protocol | ( | void | ) |
Returns the type of protocol used over the serial line, as a string. Possible values are "Line" for ASCII messages separated by CR and/or LF, "Frame:[timeout]ms" for binary messages separated by a delay time, "Char" for a continuous ASCII stream or "Byte" for a continuous binary stream.
On failure, throws an exception or returns Y_PROTOCOL_INVALID.
Definition at line 534 of file yocto_spiport.cpp.
int YSpiPort::get_rxCount | ( | void | ) |
Returns the total number of bytes received since last reset.
On failure, throws an exception or returns Y_RXCOUNT_INVALID.
Definition at line 144 of file yocto_spiport.cpp.
int YSpiPort::get_rxMsgCount | ( | void | ) |
Returns the total number of messages received since last reset.
On failure, throws an exception or returns Y_RXMSGCOUNT_INVALID.
Definition at line 231 of file yocto_spiport.cpp.
Y_SHITFTSAMPLING_enum YSpiPort::get_shitftSampling | ( | void | ) |
Returns true when the SDI line phase is shifted with regards to the SDO line.
On failure, throws an exception or returns Y_SHITFTSAMPLING_INVALID.
Definition at line 709 of file yocto_spiport.cpp.
string YSpiPort::get_spiMode | ( | void | ) |
Returns the SPI port communication parameters, as a string such as "125000,0,msb". The string includes the baud rate, the SPI mode (between 0 and 3) and the bit order.
On failure, throws an exception or returns Y_SPIMODE_INVALID.
Definition at line 597 of file yocto_spiport.cpp.
Y_SSPOLARITY_enum YSpiPort::get_ssPolarity | ( | void | ) |
Returns the SS line polarity.
On failure, throws an exception or returns Y_SSPOLARITY_INVALID.
Definition at line 654 of file yocto_spiport.cpp.
string YSpiPort::get_startupJob | ( | void | ) |
Returns the job file to use when the device is powered on.
On failure, throws an exception or returns Y_STARTUPJOB_INVALID.
Definition at line 374 of file yocto_spiport.cpp.
int YSpiPort::get_txCount | ( | void | ) |
Returns the total number of bytes transmitted since last reset.
On failure, throws an exception or returns Y_TXCOUNT_INVALID.
Definition at line 173 of file yocto_spiport.cpp.
int YSpiPort::get_txMsgCount | ( | void | ) |
Returns the total number of messages send since last reset.
On failure, throws an exception or returns Y_TXMSGCOUNT_INVALID.
Definition at line 260 of file yocto_spiport.cpp.
Y_VOLTAGELEVEL_enum YSpiPort::get_voltageLevel | ( | void | ) |
Returns the voltage level used on the serial line.
On failure, throws an exception or returns Y_VOLTAGELEVEL_INVALID.
Definition at line 470 of file yocto_spiport.cpp.
|
inline |
Definition at line 243 of file yocto_spiport.h.
|
inline |
Definition at line 774 of file yocto_spiport.h.
YSpiPort * YSpiPort::nextSpiPort | ( | void | ) |
Continues the enumeration of SPI ports started using yFirstSpiPort().
Definition at line 1485 of file yocto_spiport.cpp.
|
inline |
Definition at line 355 of file yocto_spiport.h.
|
virtual |
Sends a text line query to the serial port, and reads the reply, if any. This function is intended to be used when the serial port is configured for 'Line' protocol.
query | : the line query to send (without CR/LF) |
maxWait | : the maximum number of milliseconds to wait for a reply. |
On failure, throws an exception or returns an empty array.
Definition at line 1412 of file yocto_spiport.cpp.
|
virtual |
Returns the number of bytes available to read in the input buffer starting from the current absolute stream position pointer of the API object.
Definition at line 1385 of file yocto_spiport.cpp.
|
virtual |
Changes the current internal stream position to the specified value. This function does not affect the device, it only changes the value stored in the API object for the next read operations.
absPos | : the absolute position index for next read operations. |
Definition at line 1363 of file yocto_spiport.cpp.
|
virtual |
Returns the current absolute stream position pointer of the API object.
Definition at line 1374 of file yocto_spiport.cpp.
|
virtual |
Reads data from the receive buffer as a list of bytes, starting at current stream position. If data at current stream position is not available anymore in the receive buffer, the function performs a short read.
nChars | : the maximum number of bytes to read |
On failure, throws an exception or returns a negative error code.
Definition at line 1189 of file yocto_spiport.cpp.
|
virtual |
Reads data from the receive buffer as a binary buffer, starting at current stream position. If data at current stream position is not available anymore in the receive buffer, the function performs a short read.
nChars | : the maximum number of bytes to read |
On failure, throws an exception or returns a negative error code.
Definition at line 1147 of file yocto_spiport.cpp.
|
virtual |
Reads one byte from the receive buffer, starting at current stream position. If data at current stream position is not available anymore in the receive buffer, or if there is no data available yet, the function returns YAPI_NO_MORE_DATA.
On failure, throws an exception or returns a negative error code.
Definition at line 1040 of file yocto_spiport.cpp.
|
virtual |
Reads data from the receive buffer as a hexadecimal string, starting at current stream position. If data at current stream position is not available anymore in the receive buffer, the function performs a short read.
nBytes | : the maximum number of bytes to read |
On failure, throws an exception or returns a negative error code.
Definition at line 1233 of file yocto_spiport.cpp.
|
virtual |
Reads a single line (or message) from the receive buffer, starting at current stream position. This function is intended to be used when the serial port is configured for a message protocol, such as 'Line' mode or frame protocols.
If data at current stream position is not available anymore in the receive buffer, the function returns the oldest available line and moves the stream position just after. If no new full line is received, the function returns an empty line.
On failure, throws an exception or returns a negative error code.
Definition at line 1281 of file yocto_spiport.cpp.
|
virtual |
Searches for incoming messages in the serial port receive buffer matching a given pattern, starting at current position. This function will only compare and return printable characters in the message strings. Binary protocols are handled as hexadecimal strings.
The search returns all messages matching the expression provided as argument in the buffer. If no matching message is found, the search waits for one up to the specified maximum timeout (in milliseconds).
pattern | : a limited regular expression describing the expected message format, or an empty string if all messages should be returned (no filtering). When using binary protocols, the format applies to the hexadecimal representation of the message. |
maxWait | : the maximum number of milliseconds to wait for a message if none is found in the receive buffer. |
On failure, throws an exception or returns an empty array.
Definition at line 1327 of file yocto_spiport.cpp.
|
virtual |
Reads data from the receive buffer as a string, starting at current stream position. If data at current stream position is not available anymore in the receive buffer, the function performs a short read.
nChars | : the maximum number of characters to read |
On failure, throws an exception or returns a negative error code.
Definition at line 1111 of file yocto_spiport.cpp.
|
virtual |
Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a NULL pointer as argument.
callback | : the callback function to call, or a NULL pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value. |
Definition at line 817 of file yocto_spiport.cpp.
|
virtual |
Clears the serial port buffer and resets counters to zero.
On failure, throws an exception or returns a negative error code.
Definition at line 858 of file yocto_spiport.cpp.
|
inline |
Definition at line 183 of file yocto_spiport.h.
|
inline |
Definition at line 219 of file yocto_spiport.h.
|
virtual |
Load and start processing the specified job file. The file must have been previously created using the user interface or uploaded on the device filesystem using the uploadJob() function.
jobfile | : name of the job file (on the device filesystem) |
On failure, throws an exception or returns a negative error code.
Definition at line 1465 of file yocto_spiport.cpp.
|
virtual |
Definition at line 846 of file yocto_spiport.cpp.
int YSpiPort::set_command | ( | const string & | newval | ) |
Definition at line 445 of file yocto_spiport.cpp.
int YSpiPort::set_currentJob | ( | const string & | newval | ) |
Changes the job to use when the device is powered on. Remember to call the saveToFlash() method of the module if the modification must be kept.
newval | : a string corresponding to the job to use when the device is powered on |
On failure, throws an exception or returns a negative error code.
Definition at line 351 of file yocto_spiport.cpp.
int YSpiPort::set_protocol | ( | const string & | newval | ) |
Changes the type of protocol used over the serial line. Possible values are "Line" for ASCII messages separated by CR and/or LF, "Frame:[timeout]ms" for binary messages separated by a delay time, "Char" for a continuous ASCII stream or "Byte" for a continuous binary stream. The suffix "/[wait]ms" can be added to reduce the transmit rate so that there is always at lest the specified number of milliseconds between each bytes sent.
newval | : a string corresponding to the type of protocol used over the serial line |
On failure, throws an exception or returns a negative error code.
Definition at line 571 of file yocto_spiport.cpp.
int YSpiPort::set_shitftSampling | ( | Y_SHITFTSAMPLING_enum | newval | ) |
Changes the SDI line sampling shift. When disabled, SDI line is sampled in the middle of data output time. When enabled, SDI line is samples at the end of data output time.
newval | : either Y_SHITFTSAMPLING_OFF or Y_SHITFTSAMPLING_ON, according to the SDI line sampling shift |
On failure, throws an exception or returns a negative error code.
Definition at line 742 of file yocto_spiport.cpp.
int YSpiPort::set_spiMode | ( | const string & | newval | ) |
Changes the SPI port communication parameters, with a string such as "125000,0,msb". The string includes the baud rate, the SPI mode (between 0 and 3) and the bit order.
newval | : a string corresponding to the SPI port communication parameters, with a string such as "125000,0,msb" |
On failure, throws an exception or returns a negative error code.
Definition at line 631 of file yocto_spiport.cpp.
|
virtual |
Manually sets the state of the SS line. This function has no effect when the SS line is handled automatically.
val | : 1 to turn SS active, 0 to release SS. |
On failure, throws an exception or returns a negative error code.
Definition at line 1480 of file yocto_spiport.cpp.
int YSpiPort::set_ssPolarity | ( | Y_SSPOLARITY_enum | newval | ) |
Changes the SS line polarity.
newval | : either Y_SSPOLARITY_ACTIVE_LOW or Y_SSPOLARITY_ACTIVE_HIGH, according to the SS line polarity |
On failure, throws an exception or returns a negative error code.
Definition at line 685 of file yocto_spiport.cpp.
int YSpiPort::set_startupJob | ( | const string & | newval | ) |
Changes the job to use when the device is powered on. Remember to call the saveToFlash() method of the module if the modification must be kept.
newval | : a string corresponding to the job to use when the device is powered on |
On failure, throws an exception or returns a negative error code.
Definition at line 407 of file yocto_spiport.cpp.
int YSpiPort::set_voltageLevel | ( | Y_VOLTAGELEVEL_enum | newval | ) |
Changes the voltage type used on the serial line. Valid values will depend on the Yoctopuce device model featuring the serial port feature. Check your device documentation to find out which values are valid for that specific model. Trying to set an invalid value will have no effect.
newval | : a value among Y_VOLTAGELEVEL_OFF, Y_VOLTAGELEVEL_TTL3V, Y_VOLTAGELEVEL_TTL3VR, Y_VOLTAGELEVEL_TTL5V, Y_VOLTAGELEVEL_TTL5VR, Y_VOLTAGELEVEL_RS232 and Y_VOLTAGELEVEL_RS485 corresponding to the voltage type used on the serial line |
On failure, throws an exception or returns a negative error code.
Definition at line 507 of file yocto_spiport.cpp.
|
inline |
Definition at line 306 of file yocto_spiport.h.
|
inline |
Definition at line 270 of file yocto_spiport.h.
|
inline |
Definition at line 374 of file yocto_spiport.h.
|
inline |
Definition at line 458 of file yocto_spiport.h.
|
inline |
Definition at line 405 of file yocto_spiport.h.
|
inline |
Definition at line 430 of file yocto_spiport.h.
|
inline |
Definition at line 297 of file yocto_spiport.h.
|
inline |
Definition at line 339 of file yocto_spiport.h.
|
inline |
Definition at line 443 of file yocto_spiport.h.
|
inline |
Definition at line 389 of file yocto_spiport.h.
|
inline |
Definition at line 417 of file yocto_spiport.h.
|
inline |
Definition at line 282 of file yocto_spiport.h.
|
inline |
Definition at line 195 of file yocto_spiport.h.
|
inline |
Definition at line 231 of file yocto_spiport.h.
|
virtual |
Saves the job definition string (JSON data) into a job file. The job file can be later enabled using selectJob().
jobfile | : name of the job file to save on the device filesystem |
jsonDef | : a string containing a JSON definition of the job |
On failure, throws an exception or returns a negative error code.
Definition at line 1448 of file yocto_spiport.cpp.
|
inline |
Definition at line 320 of file yocto_spiport.h.
|
virtual |
Sends a byte sequence (provided as a list of bytes) to the serial port.
byteList | : a list of byte codes |
On failure, throws an exception or returns a negative error code.
Definition at line 941 of file yocto_spiport.cpp.
|
virtual |
Sends a binary buffer to the serial port, as is.
buff | : the binary buffer to send |
On failure, throws an exception or returns a negative error code.
Definition at line 927 of file yocto_spiport.cpp.
|
virtual |
Sends a single byte to the serial port.
code | : the byte to send |
On failure, throws an exception or returns a negative error code.
Definition at line 876 of file yocto_spiport.cpp.
|
virtual |
Sends a byte sequence (provided as a hexadecimal string) to the serial port.
hexString | : a string of hexadecimal byte codes |
On failure, throws an exception or returns a negative error code.
Definition at line 970 of file yocto_spiport.cpp.
|
virtual |
Sends an ASCII string to the serial port, followed by a line break (CR LF).
text | : the text string to send |
On failure, throws an exception or returns a negative error code.
Definition at line 1003 of file yocto_spiport.cpp.
|
virtual |
Sends an ASCII string to the serial port, as is.
text | : the text string to send |
On failure, throws an exception or returns a negative error code.
Definition at line 890 of file yocto_spiport.cpp.
|
friend |
Retrieves a SPI port for a given identifier. The identifier can be specified using several formats:
This function does not require that the SPI port is online at the time it is invoked. The returned object is nevertheless valid. Use the method YSpiPort.isOnline() to test if the SPI port is indeed online at a given time. In case of ambiguity when looking for a SPI port by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.
If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.
func | : a string that uniquely characterizes the SPI port |
Definition at line 824 of file yocto_spiport.h.
|
friend |
Starts the enumeration of SPI ports currently accessible. Use the method YSpiPort.nextSpiPort() to iterate on next SPI ports.
Definition at line 835 of file yocto_spiport.h.
|
protected |
Definition at line 123 of file yocto_spiport.h.
|
protected |
Definition at line 121 of file yocto_spiport.h.
|
protected |
Definition at line 117 of file yocto_spiport.h.
|
protected |
Definition at line 120 of file yocto_spiport.h.
|
protected |
Definition at line 125 of file yocto_spiport.h.
|
protected |
Definition at line 131 of file yocto_spiport.h.
|
protected |
Definition at line 132 of file yocto_spiport.h.
|
protected |
Definition at line 115 of file yocto_spiport.h.
|
protected |
Definition at line 118 of file yocto_spiport.h.
|
protected |
Definition at line 130 of file yocto_spiport.h.
|
protected |
Definition at line 128 of file yocto_spiport.h.
|
protected |
Definition at line 126 of file yocto_spiport.h.
|
protected |
Definition at line 127 of file yocto_spiport.h.
|
protected |
Definition at line 122 of file yocto_spiport.h.
|
protected |
Definition at line 116 of file yocto_spiport.h.
|
protected |
Definition at line 119 of file yocto_spiport.h.
|
protected |
Definition at line 129 of file yocto_spiport.h.
|
protected |
Definition at line 124 of file yocto_spiport.h.
|
static |
Definition at line 156 of file yocto_spiport.h.
|
static |
Definition at line 154 of file yocto_spiport.h.
|
static |
Definition at line 150 of file yocto_spiport.h.
|
static |
Definition at line 153 of file yocto_spiport.h.
|
static |
Definition at line 165 of file yocto_spiport.h.
|
static |
Definition at line 148 of file yocto_spiport.h.
|
static |
Definition at line 151 of file yocto_spiport.h.
|
static |
Definition at line 172 of file yocto_spiport.h.
|
static |
Definition at line 170 of file yocto_spiport.h.
|
static |
Definition at line 171 of file yocto_spiport.h.
|
static |
Definition at line 166 of file yocto_spiport.h.
|
static |
Definition at line 168 of file yocto_spiport.h.
|
static |
Definition at line 167 of file yocto_spiport.h.
|
static |
Definition at line 169 of file yocto_spiport.h.
|
static |
Definition at line 155 of file yocto_spiport.h.
|
static |
Definition at line 149 of file yocto_spiport.h.
|
static |
Definition at line 152 of file yocto_spiport.h.
|
static |
Definition at line 164 of file yocto_spiport.h.
|
static |
Definition at line 157 of file yocto_spiport.h.
|
static |
Definition at line 162 of file yocto_spiport.h.
|
static |
Definition at line 163 of file yocto_spiport.h.
|
static |
Definition at line 158 of file yocto_spiport.h.
|
static |
Definition at line 159 of file yocto_spiport.h.
|
static |
Definition at line 160 of file yocto_spiport.h.
|
static |
Definition at line 161 of file yocto_spiport.h.