Classes | Macros | Typedefs | Enumerations | Functions
yocto_spiport.h File Reference
#include "yocto_api.h"
#include <cfloat>
#include <cmath>
#include <map>
Include dependency graph for yocto_spiport.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  YSpiPort
 

Macros

#define _Y_SHITFTSAMPLING_ENUM
 
#define _Y_SSPOLARITY_ENUM
 
#define _Y_VOLTAGELEVEL_ENUM
 
#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)
 
#define Y_CURRENTJOB_INVALID   (YAPI_INVALID_STRING)
 
#define Y_ERRCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_LASTMSG_INVALID   (YAPI_INVALID_STRING)
 
#define Y_PROTOCOL_INVALID   (YAPI_INVALID_STRING)
 
#define Y_RXCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_RXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_SPIMODE_INVALID   (YAPI_INVALID_STRING)
 
#define Y_STARTUPJOB_INVALID   (YAPI_INVALID_STRING)
 
#define Y_TXCOUNT_INVALID   (YAPI_INVALID_UINT)
 
#define Y_TXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)
 

Typedefs

typedef void(* YSpiPortValueCallback) (YSpiPort *func, const string &functionValue)
 

Enumerations

enum  Y_SHITFTSAMPLING_enum { Y_SHITFTSAMPLING_OFF = 0, Y_SHITFTSAMPLING_ON = 1, Y_SHITFTSAMPLING_INVALID = -1 }
 
enum  Y_SSPOLARITY_enum { Y_SSPOLARITY_ACTIVE_LOW = 0, Y_SSPOLARITY_ACTIVE_HIGH = 1, Y_SSPOLARITY_INVALID = -1 }
 
enum  Y_VOLTAGELEVEL_enum {
  Y_VOLTAGELEVEL_OFF = 0, Y_VOLTAGELEVEL_TTL3V = 1, Y_VOLTAGELEVEL_TTL3VR = 2, Y_VOLTAGELEVEL_TTL5V = 3,
  Y_VOLTAGELEVEL_TTL5VR = 4, Y_VOLTAGELEVEL_RS232 = 5, Y_VOLTAGELEVEL_RS485 = 6, Y_VOLTAGELEVEL_INVALID = -1,
  Y_VOLTAGELEVEL_OFF = 0, Y_VOLTAGELEVEL_TTL3V = 1, Y_VOLTAGELEVEL_TTL3VR = 2, Y_VOLTAGELEVEL_TTL5V = 3,
  Y_VOLTAGELEVEL_TTL5VR = 4, Y_VOLTAGELEVEL_RS232 = 5, Y_VOLTAGELEVEL_RS485 = 6, Y_VOLTAGELEVEL_INVALID = -1
}
 

Functions

YSpiPortyFindSpiPort (const string &func)
 
YSpiPortyFirstSpiPort (void)
 

Macro Definition Documentation

#define _Y_SHITFTSAMPLING_ENUM

Definition at line 77 of file yocto_spiport.h.

#define _Y_SSPOLARITY_ENUM

Definition at line 69 of file yocto_spiport.h.

#define _Y_VOLTAGELEVEL_ENUM

Definition at line 56 of file yocto_spiport.h.

#define Y_COMMAND_INVALID   (YAPI_INVALID_STRING)

Definition at line 92 of file yocto_spiport.h.

#define Y_CURRENTJOB_INVALID   (YAPI_INVALID_STRING)

Definition at line 90 of file yocto_spiport.h.

#define Y_ERRCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 86 of file yocto_spiport.h.

#define Y_LASTMSG_INVALID   (YAPI_INVALID_STRING)

Definition at line 89 of file yocto_spiport.h.

#define Y_PROTOCOL_INVALID   (YAPI_INVALID_STRING)

Definition at line 93 of file yocto_spiport.h.

#define Y_RXCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 84 of file yocto_spiport.h.

#define Y_RXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 87 of file yocto_spiport.h.

#define Y_SPIMODE_INVALID   (YAPI_INVALID_STRING)

Definition at line 94 of file yocto_spiport.h.

#define Y_STARTUPJOB_INVALID   (YAPI_INVALID_STRING)

Definition at line 91 of file yocto_spiport.h.

#define Y_TXCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 85 of file yocto_spiport.h.

#define Y_TXMSGCOUNT_INVALID   (YAPI_INVALID_UINT)

Definition at line 88 of file yocto_spiport.h.

Typedef Documentation

typedef void(* YSpiPortValueCallback) (YSpiPort *func, const string &functionValue)

Definition at line 54 of file yocto_spiport.h.

Enumeration Type Documentation

Enumerator
Y_SHITFTSAMPLING_OFF 
Y_SHITFTSAMPLING_ON 
Y_SHITFTSAMPLING_INVALID 

Definition at line 78 of file yocto_spiport.h.

Enumerator
Y_SSPOLARITY_ACTIVE_LOW 
Y_SSPOLARITY_ACTIVE_HIGH 
Y_SSPOLARITY_INVALID 

Definition at line 70 of file yocto_spiport.h.

Enumerator
Y_VOLTAGELEVEL_OFF 
Y_VOLTAGELEVEL_TTL3V 
Y_VOLTAGELEVEL_TTL3VR 
Y_VOLTAGELEVEL_TTL5V 
Y_VOLTAGELEVEL_TTL5VR 
Y_VOLTAGELEVEL_RS232 
Y_VOLTAGELEVEL_RS485 
Y_VOLTAGELEVEL_INVALID 
Y_VOLTAGELEVEL_OFF 
Y_VOLTAGELEVEL_TTL3V 
Y_VOLTAGELEVEL_TTL3VR 
Y_VOLTAGELEVEL_TTL5V 
Y_VOLTAGELEVEL_TTL5VR 
Y_VOLTAGELEVEL_RS232 
Y_VOLTAGELEVEL_RS485 
Y_VOLTAGELEVEL_INVALID 

Definition at line 57 of file yocto_spiport.h.

Function Documentation

YSpiPort* yFindSpiPort ( const string &  func)
inline

Retrieves a SPI port for a given identifier. The identifier can be specified using several formats:

  • FunctionLogicalName
  • ModuleSerialNumber.FunctionIdentifier
  • ModuleSerialNumber.FunctionLogicalName
  • ModuleLogicalName.FunctionIdentifier
  • ModuleLogicalName.FunctionLogicalName

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.

Parameters
func: a string that uniquely characterizes the SPI port
Returns
a YSpiPort object allowing you to drive the SPI port.

Definition at line 824 of file yocto_spiport.h.

YSpiPort* yFirstSpiPort ( void  )
inline

Starts the enumeration of SPI ports currently accessible. Use the method YSpiPort.nextSpiPort() to iterate on next SPI ports.

Returns
a pointer to a YSpiPort object, corresponding to the first SPI port currently online, or a NULL pointer if there are none.

Definition at line 835 of file yocto_spiport.h.



yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:13