LINXx firmware
Extensions to LINX toolkit
Public Member Functions | List of all members
LinxWiringDevice Class Reference
Inheritance diagram for LinxWiringDevice:
LinxDevice LinxPjrc LinxZero TM4C123G LinxPjrcTeensy30 LinxPjrcTeensy31 LinxPjrcTeensy40 LinxPjrcTeensyLC LinxAdafruitFeatherM0WiFi

Public Member Functions

virtual int PwmSetDutyCycle (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
DIO
virtual int DigitalWrite (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int DigitalRead (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int DigitalWriteSquareWave (unsigned char channel, unsigned long freq, unsigned long duration)
 
virtual int DigitalReadPulseWidth (unsigned char stimChan, unsigned char stimType, unsigned char respChan, unsigned char respType, unsigned long timeout, unsigned long *width)
 
General
virtual unsigned long GetMilliSeconds ()
 
virtual unsigned long GetSeconds ()
 
virtual void DelayMs (unsigned long ms)
 
virtual void NonVolatileWrite (int address, unsigned char data)
 
virtual unsigned char NonVolatileRead (int address)
 
- Public Member Functions inherited from LinxDevice
virtual int AnalogRead (unsigned char numChans, unsigned char *channels, unsigned char *values)=0
 
virtual int AnalogReadNoPacking (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual int AnalogSetRef (unsigned char mode, unsigned long voltage)=0
 
virtual int AnalogWrite (unsigned char numChans, unsigned char *channels, unsigned char *values)=0
 
virtual int AnalogWriteNoPacking (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual int DigitalWrite (unsigned char numChans, unsigned char *channels, unsigned char *values)=0
 
virtual int DigitalWriteNoPacking (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int DigitalRead (unsigned char numChans, unsigned char *channels, unsigned char *values)=0
 
virtual int DigitalReadNoPacking (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int DigitalWriteSquareWave (unsigned char channel, unsigned long freq, unsigned long duration)=0
 
virtual int DigitalReadPulseWidth (unsigned char stimChan, unsigned char stimType, unsigned char respChan, unsigned char respType, unsigned long timeout, unsigned long *width)=0
 
virtual int PwmSetDutyCycle (unsigned char numChans, unsigned char *channels, unsigned char *values)=0
 
virtual int PwmSetFrequency (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual int SpiOpenMaster (unsigned char channel)=0
 
virtual int SpiSetBitOrder (unsigned char channel, unsigned char bitOrder)=0
 
virtual int SpiSetMode (unsigned char channel, unsigned char mode)=0
 
virtual int SpiSetSpeed (unsigned char channel, unsigned long speed, unsigned long *actualSpeed)=0
 
virtual int SpiWriteRead (unsigned char channel, unsigned char frameSize, unsigned char numFrames, unsigned char csChan, unsigned char csLL, unsigned char *sendBuffer, unsigned char *recBuffer)=0
 
virtual int I2cOpenMaster (unsigned char channel)=0
 
virtual int I2cSetSpeed (unsigned char channel, unsigned long speed, unsigned long *actualSpeed)=0
 
virtual int I2cWrite (unsigned char channel, unsigned char slaveAddress, unsigned char eofConfig, unsigned char numBytes, unsigned char *sendBuffer)=0
 
virtual int I2cRead (unsigned char channel, unsigned char slaveAddress, unsigned char eofConfig, unsigned char numBytes, unsigned int timeout, unsigned char *recBuffer)=0
 
virtual int I2cClose (unsigned char channel)=0
 
virtual int UartOpen (unsigned char channel, unsigned long baudRate, unsigned long *actualBaud)=0
 
virtual int UartSetBaudRate (unsigned char channel, unsigned long baudRate, unsigned long *actualBaud)=0
 
virtual int UartGetBytesAvailable (unsigned char channel, unsigned char *numBytes)=0
 
virtual int UartRead (unsigned char channel, unsigned char numBytes, unsigned char *recBuffer, unsigned char *numBytesRead)=0
 
virtual int UartWrite (unsigned char channel, unsigned char numBytes, unsigned char *sendBuffer)=0
 
virtual void UartWrite (unsigned char channel, char c)
 
virtual void UartWrite (unsigned char channel, const char s[])
 
virtual void UartWrite (unsigned char channel, unsigned char c)
 
virtual void UartWrite (unsigned char channel, int n)
 
virtual void UartWrite (unsigned char channel, unsigned int n)
 
virtual void UartWrite (unsigned char channel, long n)
 
virtual void UartWrite (unsigned char channel, unsigned long n)
 
virtual void UartWrite (unsigned char channel, long n, int base)
 
virtual void UartWriteln (unsigned char channel)
 
virtual void UartWriteln (unsigned char channel, char c)
 
virtual void UartWriteln (unsigned char channel, const char s[])
 
virtual void UartWriteln (unsigned char channel, unsigned char c)
 
virtual void UartWriteln (unsigned char channel, int n)
 
virtual void UartWriteln (unsigned char channel, long n)
 
virtual void UartWriteln (unsigned char channel, unsigned long n)
 
virtual void UartWriteln (unsigned char channel, long n, int base)
 
virtual int UartClose (unsigned char channel)=0
 
virtual int ServoOpen (unsigned char numChans, unsigned char *channels)=0
 
virtual int ServoSetPulseWidth (unsigned char numChans, unsigned char *channels, unsigned short *pulseWidths)=0
 
virtual int ServoClose (unsigned char numChans, unsigned char *channels)=0
 
virtual int Ws2812Open (unsigned short numLeds, unsigned char dataChan)
 
virtual int Ws2812WriteOnePixel (unsigned short pixelIndex, unsigned char red, unsigned char green, unsigned char blue, unsigned char refresh)
 
virtual int Ws2812WriteNPixels (unsigned short startPixel, unsigned short numPixels, unsigned char *data, unsigned char refresh)
 
virtual int Ws2812Refresh ()
 
virtual int Ws2812Close ()
 
unsigned char ReverseBits (unsigned char b)
 
virtual unsigned long GetMilliSeconds ()=0
 
virtual unsigned long GetSeconds ()=0
 
virtual void DelayMs (unsigned long ms)
 
virtual void NonVolatileWrite (int address, unsigned char data)=0
 
virtual unsigned char NonVolatileRead (int address)=0
 
virtual void EnableDebug (unsigned char channel)
 
virtual void DebugPrint (char c)
 
virtual void DebugPrint (const char s[])
 
virtual void DebugPrint (unsigned char c)
 
virtual void DebugPrint (int n)
 
virtual void DebugPrint (unsigned int n)
 
virtual void DebugPrint (long n)
 
virtual void DebugPrint (unsigned long n)
 
virtual void DebugPrint (long n, int base)
 
virtual void DebugPrintln ()
 
virtual void DebugPrintln (char c)
 
virtual void DebugPrintln (const char s[])
 
virtual void DebugPrintln (unsigned char c)
 
virtual void DebugPrintln (int n)
 
virtual void DebugPrintln (long n)
 
virtual void DebugPrintln (unsigned long n)
 
virtual void DebugPrintln (long n, int base)
 
virtual void DebugPrintPacket (unsigned char direction, const unsigned char *packetBuffer)
 
virtual int BoardCommands (unsigned char command, unsigned char numInputBytes, unsigned char *input, unsigned char *numResponseBytes, unsigned char *response)
 
virtual int Reset (ResetWhat target)
 
virtual int Ws2812Open (unsigned short numLeds, unsigned char dataChan)
 
virtual int Ws2812WriteOnePixel (unsigned short pixelIndex, unsigned char red, unsigned char green, unsigned char blue, unsigned char refresh)
 
virtual int Ws2812WriteNPixels (unsigned short startPixel, unsigned short numPixels, unsigned char *data, unsigned char refresh)
 
virtual int Ws2812Refresh ()
 
virtual int Ws2812Close ()
 
unsigned char ReverseBits (unsigned char b)
 
virtual void EnableDebug (unsigned char channel)
 
virtual void DebugPrint (char c)
 
virtual void DebugPrint (const char s[])
 
virtual void DebugPrint (unsigned char c)
 
virtual void DebugPrint (int n)
 
virtual void DebugPrint (unsigned int n)
 
virtual void DebugPrint (long n)
 
virtual void DebugPrint (unsigned long n)
 
virtual void DebugPrint (long n, int base)
 
virtual void DebugPrintln ()
 
virtual void DebugPrintln (char c)
 
virtual void DebugPrintln (const char s[])
 
virtual void DebugPrintln (unsigned char c)
 
virtual void DebugPrintln (int n)
 
virtual void DebugPrintln (long n)
 
virtual void DebugPrintln (unsigned long n)
 
virtual void DebugPrintln (long n, int base)
 
virtual void DebugPrintPacket (unsigned char direction, const unsigned char *packetBuffer)
 
virtual int DigitalWriteNoPacking (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int DigitalReadNoPacking (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int AnalogReadNoPacking (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual int AnalogWriteNoPacking (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual int PwmSetFrequency (unsigned char numChans, unsigned char *channels, unsigned long *values)
 
virtual void UartWrite (unsigned char channel, char c)
 
virtual void UartWrite (unsigned char channel, const char s[])
 
virtual void UartWrite (unsigned char channel, unsigned char c)
 
virtual void UartWrite (unsigned char channel, int n)
 
virtual void UartWrite (unsigned char channel, unsigned int n)
 
virtual void UartWrite (unsigned char channel, long n)
 
virtual void UartWrite (unsigned char channel, unsigned long n)
 
virtual void UartWrite (unsigned char channel, long n, int base)
 
virtual void UartWriteln (unsigned char channel)
 
virtual void UartWriteln (unsigned char channel, char c)
 
virtual void UartWriteln (unsigned char channel, const char s[])
 
virtual void UartWriteln (unsigned char channel, unsigned char c)
 
virtual void UartWriteln (unsigned char channel, int n)
 
virtual void UartWriteln (unsigned char channel, long n)
 
virtual void UartWriteln (unsigned char channel, unsigned long n)
 
virtual void UartWriteln (unsigned char channel, long n, int base)
 
virtual int BoardCommands (unsigned char command, unsigned char numInputBytes, unsigned char *input, unsigned char *numResponseBytes, unsigned char *response)
 
virtual int Reset (ResetWhat target)
 

AIO

unsigned char NumAiRefIntVals
 
const unsigned long * AiRefIntVals
 
const int * AiRefCodes
 
unsigned long AiRefExtMin
 
unsigned long AiRefExtMax
 
unsigned char NumAoRefIntVals
 
const unsigned long * AoRefIntVals
 
const int * AoRefCodes
 
unsigned long AoRefExtMin
 
unsigned long AoRefExtMax
 
virtual int AnalogRead (unsigned char numChans, unsigned char *channels, unsigned char *values)
 
virtual int AnalogSetRef (unsigned char mode, unsigned long voltage)
 
virtual int AnalogWrite (unsigned char numChans, unsigned char *channels, unsigned char *values)
 

UART

unsigned char NumUartSpeeds
 
unsigned long * UartSupportedSpeeds
 
virtual int UartOpen (unsigned char channel, unsigned long baudRate, unsigned long *actualBaud)
 
virtual int UartSetBaudRate (unsigned char channel, unsigned long baudRate, unsigned long *actualBaud)
 
virtual int UartGetBytesAvailable (unsigned char channel, unsigned char *numBytes)
 
virtual int UartRead (unsigned char channel, unsigned char numBytes, unsigned char *recBuffer, unsigned char *numBytesRead)
 
virtual int UartWrite (unsigned char channel, unsigned char numBytes, unsigned char *sendBuffer)
 
virtual int UartClose (unsigned char channel)
 

SPI

unsigned char NumSpiSpeeds
 
unsigned long * SpiSupportedSpeeds
 
int * SpiSpeedCodes
 
virtual int SpiOpenMaster (unsigned char channel)
 
virtual int SpiSetBitOrder (unsigned char channel, unsigned char bitOrder)
 
virtual int SpiSetMode (unsigned char channel, unsigned char mode)
 
virtual int SpiSetSpeed (unsigned char channel, unsigned long speed, unsigned long *actualSpeed)
 
virtual int SpiWriteRead (unsigned char channel, unsigned char frameSize, unsigned char numFrames, unsigned char csChan, unsigned char csLL, unsigned char *sendBuffer, unsigned char *recBuffer)
 

I2C

unsigned char * I2cRefCount
 
virtual int I2cOpenMaster (unsigned char channel)
 
virtual int I2cSetSpeed (unsigned char channel, unsigned long speed, unsigned long *actualSpeed)
 
virtual int I2cWrite (unsigned char channel, unsigned char slaveAddress, unsigned char eofConfig, unsigned char numBytes, unsigned char *sendBuffer)
 
virtual int I2cRead (unsigned char channel, unsigned char slaveAddress, unsigned char eofConfig, unsigned char numBytes, unsigned int timeout, unsigned char *recBuffer)
 
virtual int I2cClose (unsigned char channel)
 

Servo

Servo ** Servos
 
virtual int ServoOpen (unsigned char numChans, unsigned char *chans)
 
virtual int ServoSetPulseWidth (unsigned char numChans, unsigned char *chans, unsigned short *pulseWidths)
 
virtual int ServoClose (unsigned char numChans, unsigned char *chans)
 

Additional Inherited Members

- Public Attributes inherited from LinxDevice
unsigned long serialInterfaceMaxBaud
 
unsigned char DeviceFamily
 
unsigned char DeviceId
 
unsigned char DeviceNameLen
 
const unsigned char * DeviceName
 
unsigned char ListenerBufferSize
 
unsigned char LinxApiMajor
 
unsigned char LinxApiMinor
 
unsigned char LinxApiSubminor
 
unsigned char NumQeChans
 
const unsigned char * QeChans
 
unsigned char NumCanChans
 
const unsigned char * CanChans
 
unsigned short userId
 
unsigned long ethernetIp
 
unsigned short ethernetPort
 
unsigned long WifiIp
 
unsigned short WifiPort
 
unsigned char WifiSsidSize
 
char WifiSsid [32]
 
unsigned char WifiSecurity
 
unsigned char WifiPwSize
 
char WifiPw [64]
 
unsigned char NumDigitalChans
 
const unsigned char * DigitalChans
 
unsigned char NumAiChans
 
const unsigned char * AiChans
 
unsigned char AiResolution
 
unsigned long AiRefDefault
 
unsigned long AiRefSet
 
unsigned char NumAoChans
 
const unsigned char * AoChans
 
unsigned char AoResolution
 
unsigned long AoRefDefault
 
unsigned long AoRefSet
 
unsigned char NumPwmChans
 
const unsigned char * PwmChans
 
unsigned char NumUartChans
 
const unsigned char * UartChans
 
unsigned long UartMaxBaud
 
unsigned char NumI2cChans
 
const unsigned char * I2cChans
 
unsigned char NumSpiChans
 
const unsigned char * SpiChans
 
unsigned char NumServoChans
 
const unsigned char * ServoChans
 
ResetWhat ResetTarget =LRESET_NONE
 
unsigned char WifiStatus =0xFF
 

Member Function Documentation

◆ AnalogRead()

int LinxWiringDevice::AnalogRead ( unsigned char  numChans,
unsigned char *  channels,
unsigned char *  values 
)
virtual

Implements LinxDevice.

◆ AnalogSetRef()

int LinxWiringDevice::AnalogSetRef ( unsigned char  mode,
unsigned long  voltage 
)
virtual

Implements LinxDevice.

◆ AnalogWrite()

int LinxWiringDevice::AnalogWrite ( unsigned char  numChans,
unsigned char *  channels,
unsigned char *  values 
)
virtual

Implements LinxDevice.

◆ DelayMs()

void LinxWiringDevice::DelayMs ( unsigned long  ms)
virtual

Reimplemented from LinxDevice.

◆ DigitalRead()

int LinxWiringDevice::DigitalRead ( unsigned char  numChans,
unsigned char *  channels,
unsigned char *  values 
)
virtual

Implements LinxDevice.

◆ DigitalReadPulseWidth()

int LinxWiringDevice::DigitalReadPulseWidth ( unsigned char  stimChan,
unsigned char  stimType,
unsigned char  respChan,
unsigned char  respType,
unsigned long  timeout,
unsigned long *  width 
)
virtual

Implements LinxDevice.

◆ DigitalWrite()

int LinxWiringDevice::DigitalWrite ( unsigned char  numChans,
unsigned char *  channels,
unsigned char *  values 
)
virtual

Implements LinxDevice.

◆ DigitalWriteSquareWave()

int LinxWiringDevice::DigitalWriteSquareWave ( unsigned char  channel,
unsigned long  freq,
unsigned long  duration 
)
virtual

Implements LinxDevice.

◆ GetMilliSeconds()

unsigned long LinxWiringDevice::GetMilliSeconds ( )
virtual

Implements LinxDevice.

◆ GetSeconds()

unsigned long LinxWiringDevice::GetSeconds ( )
virtual

Implements LinxDevice.

◆ I2cClose()

int LinxWiringDevice::I2cClose ( unsigned char  channel)
virtual

Implements LinxDevice.

◆ I2cOpenMaster()

int LinxWiringDevice::I2cOpenMaster ( unsigned char  channel)
virtual
Todo:
ONLY SUPPORT ONE CHANNEL ATM

Implements LinxDevice.

◆ I2cRead()

int LinxWiringDevice::I2cRead ( unsigned char  channel,
unsigned char  slaveAddress,
unsigned char  eofConfig,
unsigned char  numBytes,
unsigned int  timeout,
unsigned char *  recBuffer 
)
virtual

Implements LinxDevice.

◆ I2cSetSpeed()

int LinxWiringDevice::I2cSetSpeed ( unsigned char  channel,
unsigned long  speed,
unsigned long *  actualSpeed 
)
virtual

Implements LinxDevice.

◆ I2cWrite()

int LinxWiringDevice::I2cWrite ( unsigned char  channel,
unsigned char  slaveAddress,
unsigned char  eofConfig,
unsigned char  numBytes,
unsigned char *  sendBuffer 
)
virtual

Implements LinxDevice.

◆ NonVolatileRead()

unsigned char LinxWiringDevice::NonVolatileRead ( int  address)
virtual

Implements LinxDevice.

◆ NonVolatileWrite()

void LinxWiringDevice::NonVolatileWrite ( int  address,
unsigned char  data 
)
virtual

Implements LinxDevice.

Reimplemented in LinxAdafruitFeatherM0WiFi.

◆ PwmSetDutyCycle()

int LinxWiringDevice::PwmSetDutyCycle ( unsigned char  numChans,
unsigned char *  channels,
unsigned char *  values 
)
virtual

Implements LinxDevice.

◆ ServoClose()

int LinxWiringDevice::ServoClose ( unsigned char  numChans,
unsigned char *  chans 
)
virtual

Implements LinxDevice.

◆ ServoOpen()

int LinxWiringDevice::ServoOpen ( unsigned char  numChans,
unsigned char *  chans 
)
virtual

Implements LinxDevice.

◆ ServoSetPulseWidth()

int LinxWiringDevice::ServoSetPulseWidth ( unsigned char  numChans,
unsigned char *  chans,
unsigned short *  pulseWidths 
)
virtual

Implements LinxDevice.

◆ SpiOpenMaster()

int LinxWiringDevice::SpiOpenMaster ( unsigned char  channel)
virtual

Implements LinxDevice.

◆ SpiSetBitOrder()

int LinxWiringDevice::SpiSetBitOrder ( unsigned char  channel,
unsigned char  bitOrder 
)
virtual

Implements LinxDevice.

◆ SpiSetMode()

int LinxWiringDevice::SpiSetMode ( unsigned char  channel,
unsigned char  mode 
)
virtual

Implements LinxDevice.

◆ SpiSetSpeed()

int LinxWiringDevice::SpiSetSpeed ( unsigned char  channel,
unsigned long  speed,
unsigned long *  actualSpeed 
)
virtual

Implements LinxDevice.

◆ SpiWriteRead()

int LinxWiringDevice::SpiWriteRead ( unsigned char  channel,
unsigned char  frameSize,
unsigned char  numFrames,
unsigned char  csChan,
unsigned char  csLL,
unsigned char *  sendBuffer,
unsigned char *  recBuffer 
)
virtual

Implements LinxDevice.

◆ UartClose()

int LinxWiringDevice::UartClose ( unsigned char  channel)
virtual

Implements LinxDevice.

◆ UartGetBytesAvailable()

int LinxWiringDevice::UartGetBytesAvailable ( unsigned char  channel,
unsigned char *  numBytes 
)
virtual

Implements LinxDevice.

◆ UartOpen()

int LinxWiringDevice::UartOpen ( unsigned char  channel,
unsigned long  baudRate,
unsigned long *  actualBaud 
)
virtual

Implements LinxDevice.

◆ UartRead()

int LinxWiringDevice::UartRead ( unsigned char  channel,
unsigned char  numBytes,
unsigned char *  recBuffer,
unsigned char *  numBytesRead 
)
virtual

Implements LinxDevice.

◆ UartSetBaudRate()

int LinxWiringDevice::UartSetBaudRate ( unsigned char  channel,
unsigned long  baudRate,
unsigned long *  actualBaud 
)
virtual

Implements LinxDevice.

◆ UartWrite()

int LinxWiringDevice::UartWrite ( unsigned char  channel,
unsigned char  numBytes,
unsigned char *  sendBuffer 
)
virtual

Implements LinxDevice.

Reimplemented in LinxPjrc.


The documentation for this class was generated from the following files: