LINXx firmware
Extensions to LINX toolkit
Public Member Functions | Public Attributes | List of all members
LinxDevice Class Referenceabstract

Base class for board functionality; extended by family and board-specific code. More...

#include <LinxDevice.h>

Inheritance diagram for LinxDevice:
LinxWiringDevice LinxPjrc LinxZero TM4C123G LinxPjrcTeensy30 LinxPjrcTeensy31 LinxPjrcTeensy40 LinxPjrcTeensyLC LinxAdafruitFeatherM0WiFi

Public Member Functions

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)
 
WS2812
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 ()
 
General
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
 
Debug
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)
 

Public Attributes

unsigned long serialInterfaceMaxBaud
 
IDs
unsigned char DeviceFamily
 
unsigned char DeviceId
 
unsigned char DeviceNameLen
 
const unsigned char * DeviceName
 
unsigned char ListenerBufferSize
 
LINX API Version
unsigned char LinxApiMajor
 
unsigned char LinxApiMinor
 
unsigned char LinxApiSubminor
 
QE
unsigned char NumQeChans
 
const unsigned char * QeChans
 
CAN
unsigned char NumCanChans
 
const unsigned char * CanChans
 
User
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]
 

DIO

unsigned char NumDigitalChans
 
const unsigned char * DigitalChans
 
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
 

AIO

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
 
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)
 

PWM

unsigned char NumPwmChans
 
const unsigned char * PwmChans
 
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)
 

UART

unsigned char NumUartChans
 
const unsigned char * UartChans
 
unsigned long UartMaxBaud
 
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
 

I2C

unsigned char NumI2cChans
 
const unsigned char * I2cChans
 
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
 

SPI

unsigned char NumSpiChans
 
const unsigned char * SpiChans
 
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
 

Servo

unsigned char NumServoChans
 
const unsigned char * ServoChans
 
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
 

LINXx

ResetWhat ResetTarget =LRESET_NONE
 
unsigned char WifiStatus =0xFF
 
virtual int BoardCommands (unsigned char command, unsigned char numInputBytes, unsigned char *input, unsigned char *numResponseBytes, unsigned char *response)
 
virtual int Reset (ResetWhat target)
 

Detailed Description

Base class for board functionality; extended by family and board-specific code.

Member Function Documentation

◆ BoardCommands() [1/2]

int LinxDevice::BoardCommands ( unsigned char  command,
unsigned char  numInputBytes,
unsigned char *  input,
unsigned char *  numResponseBytes,
unsigned char *  response 
)
virtual

◆ BoardCommands() [2/2]

virtual int LinxDevice::BoardCommands ( unsigned char  command,
unsigned char  numInputBytes,
unsigned char *  input,
unsigned char *  numResponseBytes,
unsigned char *  response 
)
virtual

◆ I2cOpenMaster() [1/2]

virtual int LinxDevice::I2cOpenMaster ( unsigned char  channel)
pure virtual

Implemented in LinxWiringDevice.

◆ I2cOpenMaster() [2/2]

virtual int LinxDevice::I2cOpenMaster ( unsigned char  channel)
pure virtual

Implemented in LinxWiringDevice.

◆ NonVolatileWrite() [1/2]

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

Implemented in LinxAdafruitFeatherM0WiFi.

◆ NonVolatileWrite() [2/2]

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

Implemented in LinxAdafruitFeatherM0WiFi.

◆ Reset() [1/2]

int LinxDevice::Reset ( ResetWhat  target)
virtual

◆ Reset() [2/2]

virtual int LinxDevice::Reset ( ResetWhat  target)
virtual

◆ UartWrite() [1/2]

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

Implemented in LinxPjrc.

◆ UartWrite() [2/2]

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

Implemented in LinxPjrc.


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