Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

LOW_linkDS2490 Class Reference

Link class for DS2490 USB to 1-Wire Bridge Chip. More...

#include <LOW_linkDS2490.h>

Inheritance diagram for LOW_linkDS2490:

Inheritance graph
[legend]
Collaboration diagram for LOW_linkDS2490:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< LOW_link * > linkPtrVec_t
 Vector type of link class pointers.

typedef LOW_objectIDFactory::objectID_t linkID_t
 Type for individual link ID number.

enum  strongPullup_t {
  pullUp_16_4 = 0x00, pullUp_65_5, pullUp_131, pullUp_262,
  pullUp_524, pullUp_1048, pullUp_NONE = 0xff
}
 Type for strong pullup period specification. More...

enum  progPulse_t {
  progPulse_32 = 0x00, progPulse_64, progPulse_128, progPulse_256,
  progPulse_512, progPulse_1024, progPulse_2048
}
 Type for 12V program pulse period specification. More...

typedef std::vector< LOW_linkFlexibleSpeed * > flexLinkPtrVec_t
 Vector type of link class pointers.

enum  wireSpeed_t { normal_speed = 0, flexible_speed = 1, overdrive_speed = 2 }
 1-Wire communication speeds. More...

Configuration values.
enum  pdSlewRate_t {
  pdSlewRate_15 = 0x00, pdSlewRate_2_2, pdSlewRate_1_65, pdSlewRate_1_37,
  pdSlewRate_1_1, pdSlewRate_0_83, pdSlewRate_0_7, pdSlewRate_0_55
}
 Type for flexible speed pulldown slew rate in V/microsec. More...

enum  w1LowTime_t {
  w1LowTime_8 = 0x00, w1LowTime_9, w1LowTime_10, w1LowTime_11,
  w1LowTime_12, w1LowTime_13, w1LowTime_14, w1LowTime_15
}
 Type for flexible speed write-1 low time in microsec. More...

enum  soW0RecTime_t {
  soW0RecTime_3 = 0x00, soW0RecTime_4, soW0RecTime_5, soW0RecTime_6,
  soW0RecTime_7, soW0RecTime_8, soW0RecTime_9, soW0RecTime_10
}
 Type for flexible speed DSO/ W0R time in microsec. More...


Public Member Functions

 LOW_linkDS2490 (const LOW_portUsb_Factory::usbDeviceSpecifier_t inUsbDevSpec, const bool inHasExternalPower, const bool inAllowProgPulse=false)
 Constructor.

virtual ~LOW_linkDS2490 ()
 Destructor.

virtual std::string getLinkFamily () const
 Get the link's family type.

 class_DERIVE_FROM_EXCEPTION (link_error, LOW_exception)
 Exception base class for all exceptions thrown by LOW_link.

 class_DERIVE_FROM_EXCEPTION (comm_error, link_error)
 Exception class to be thrown on communication errors.

 class_DERIVE_FROM_EXCEPTION (internal_error, link_error)
 Exception class to be thrown on pure internal errors.

 class_DERIVE_FROM_EXCEPTION (illegalSpeed_error, link_error)
 Exception class to be thrown on errors related to currently selected wire speed.

 class_DERIVE_FROM_EXCEPTION (illegalLevel_error, link_error)
 Exception class to be thrown on errors related to requested voltage level.

 class_DERIVE_FROM_EXCEPTION (notAllowed_error, link_error)
 Exception class to be thrown on access violation errors.

 class_DERIVE_FROM_EXCEPTION (sizeMismatch_error, link_error)
virtual bool operator== (LOW_link &inLink) const
 Comparison based on linkID.

 class_DERIVE_FROM_EXCEPTION (incompatibleSpeed_error, LOW_exception)
 Exception base class for all exceptions thrown by LOW_link.

Bus touch (write/read) methods required by LOW_link
virtual bool touchBit (const bool inSendBit, const strongPullup_t inPullup=pullUp_NONE)
 Send 1 bit of communication to the 1-Wire net and return the result 1 bit read from the 1-Wire net.

virtual uint8_t touchByte (const uint8_t inSendByte, const strongPullup_t inPullup=pullUp_NONE)
 Send 8 bits of communication to the 1-Wire net and return the result 8 bits read from the 1-Wire net.

virtual byteVec_t touchBlock (const byteVec_t &inBytes, const strongPullup_t inPullup=pullUp_NONE)
 Send block of communication to the 1-Wire net and return the resulting bytes read from the 1-Wire net.

Higher level methods required by LOW_link
virtual LOW_deviceID::deviceIDVec_t searchDevices (const bool inOnlyAlarm, const LOW_deviceIDRaw inPreload, const LOW_deviceIDRaw::devFamCode_t inFamCode, const bool inDoReset)
 Execute a complete search sequence from preloaded ID vector.

Misc methods required by LOW_link
virtual void resetLinkAdapter ()
 Reset the adapter.

virtual bool resetBus ()
virtual void strongPullup (const unsigned long inMicroSecs)
 Set the 1-Wire net line level to strong pullup for a specified time.

virtual void strongPullup (const strongPullup_t inPullupTime)
 Set the 1-Wire net line level to strong pullup for a specified time.

virtual void programPulse (const unsigned long inMicroSecs)
 Create a 12 volt pulse on the 1-Wire net for programming EPROM devices.

virtual void programPulse (const progPulse_t inPulseTime)
 Create a 12 volt pulse on the 1-Wire net for programming EPROM devices.

Methods required by LOW_linkFlexibleSpeed
virtual void setWireSpeed (const wireSpeed_t inWireSpeed)
 Set the 1-Wire speed mode.

virtual wireSpeed_t getWireSpeed ()
 Get the 1-Wire speed mode.

virtual void setPullDownSlewRate (const pdSlewRate_t inPDSR)
 Set the Pulldown Slew Rate Control.

virtual pdSlewRate_t getPullDownSlewRate ()
 Get the Pulldown Slew Rate Control.

virtual void setWrite1LowTime (const w1LowTime_t inW1LT)
 Set the Write 1 Low Time.

virtual w1LowTime_t getWrite1LowTime ()
 Get the Write 1 Low Time.

virtual void setSampleOffsetWrite0Rec (const soW0RecTime_t inSOW0RT)
 Set the Sample Offset / Write 0 Recovery time.

virtual soW0RecTime_t getSampleOffsetWrite0Rec ()
 Get the Sample Offset / Write 0 Recovery time.

Bus read methods
virtual bool readDataBit (const strongPullup_t inPullup=pullUp_NONE)
 Receive 1 bit from the 1-Wire net by previously sending one bit of read communication to the 1-Wire net.

virtual uint8_t readDataByte (const strongPullup_t inPullup=pullUp_NONE)
 Receive 1 byte from the 1-Wire net by previously sending 8 bits of read communication to the 1-Wire net.

virtual void readData (byteVec_t &outBytes, const strongPullup_t inPullup=pullUp_NONE)
 Receive a block of bytes from the 1-Wire net by previously sending a block of bytes of read communication to the 1-Wire Net.

Bus write methods
virtual void writeData (const bool inSendBit, const strongPullup_t inPullup=pullUp_NONE)
 Send 1 bit to the 1-Wire net and verify that the bit read from the 1-Wire net is the same (bus write operation).

virtual void writeData (const uint8_t inSendByte, const strongPullup_t inPullup=pullUp_NONE)
 Send 1 byte to the 1-Wire net and verify that the byte read from the 1-Wire net is the same (bus write operation).

virtual void writeData (const byteVec_t &inSendBytes, const strongPullup_t inPullup=pullUp_NONE)
 Send block of bytes to the 1-Wire net and verify that the bytes block read from the 1-Wire net are the same (bus write operation).

Misc methods
linkID_t getID () const
 Get ID of the link.

bool getHasProgramPulse () const
 Get wether the adapter is capable of 12V Program pulse.

bool getHasExternalPower () const
 Get whether there is an external power line on the segment.

bool getAllowProgPulse () const
 Get wether the program pulse should be allowed.


Static Public Attributes

const LOW_portUsbDevice::usbVendorID_t usbVendorID = 0x04fa
 Dallas/Maxim USB vendor ID.

const LOW_portUsbDevice::usbProductID_t usbProductID = 0x2490
 Dallas/Maxim USB DS2490 product ID.


Protected Member Functions

virtual void doSearchSequence (const LOW_deviceIDRaw &inBranchVector, LOW_deviceIDRaw &outFoundID, LOW_deviceIDRaw &outDiscrVec)
 Execute a single search sequence on the bus.


Protected Attributes

const linkID_t linkID
 Individual ID of the link adapter.

bool hasProgramPulse
 Wether the adapter is capable of 12V Program pulse.

const bool hasExternalPower
 Wether the attached bus supplies external power.

const bool allowProgPulse
 Wether the program pulse should be allowed.

wireSpeed_t wireSpeed
 Saved value of wire speed.

pdSlewRate_t pdSlewRate
 Saved value of pulldown slew rate.

w1LowTime_t w1LowTime
 Saved value of write-1 low time.

soW0RecTime_t soW0RecTime
 Saved value of DSO/W0R time.


Private Types

enum  resultHandling_t { noResult_rsltHdl = 0x00, resultOnError_rsltHdl, resultAlways_rsltHdl }
 Type to define result handling with communication commands. More...

Status and result code types.
typedef LOW_linkDS2490::deviceFeedbackRaw_t deviceFeedbackRaw_t
 Status information, raw format from device.

typedef LOW_linkDS2490::resultCode_t resultCode_t
 Status information, decoded format.

typedef std::vector< resultCode_tresultCodeVec_t
 Vector type of resultCode_t.

typedef LOW_linkDS2490::deviceFeedback_t deviceFeedback_t
 Status information, decoded format.

DS2490 specific configuration values.
enum  OWSPEED_val_t { normal_OWSPEED = 0x00, flexible_OWSPEED, overdrive_OWSPEED }
 Type for wirespeed. More...

enum  PDSR_val_t {
  PDSR_15 = 0x00, PDSR_2_2, PDSR_1_65, PDSR_1_37,
  PDSR_1_1, PDSR_0_83, PDSR_0_7, PDSR_0_55
}
 Type for flexible speed pulldown slew rate in V/microsec. More...

enum  W1LT_val_t {
  W1LT_8 = 0x00, W1LT_9, W1LT_10, W1LT_11,
  W1LT_12, W1LT_13, W1LT_14, W1LT_15
}
 Type for flexible speed write-1 low time in microsec. More...

enum  SOW0RT_val_t {
  SOW0RT_3 = 0x00, SOW0RT_4, SOW0RT_5, SOW0RT_6,
  SOW0RT_7, SOW0RT_8, SOW0RT_9, SOW0RT_10
}
 Type for flexible speed DSO/ W0R time in microsec. More...


Private Member Functions

Mid-layer methods.
void commonConstructorActions ()
 Actions common to all constructors.

void readDeviceStatus (deviceFeedback_t &outDevFeedback, resultCodeVec_t &outResultCodeVec)
 Fetch device status and all available result codes.

void waitUntilIdle (deviceFeedback_t &outDeviceFeedback, resultCodeVec_t &outResultCodeVec, const LOW_portUsbDevice::usbTimeout_t inTimeout)
 Periodically poll the device status until the it's status is idle.

void strongPullupInternal (const unsigned int inPullupFactor)
 Universal and internal funtion for single strong pullups.

void progPulseInternal (const unsigned int inPulseFactor)
 Universal and internal funtion for program pulses.

Control command methods.
Control commands are used to control the processing of Communication commands/data and can also be used to issue a device Reset.

There are 9 Control commands. Like Mode commands, Control commands are immediately processed by the DS2490 when they are received.

virtual void ctlCmd_resetDevice ()
 Performs a hardware reset equivalent to the power-on reset.

virtual void ctlCmd_startExecution ()
 Starts execution of Communication commands.

virtual void ctlCmd_resumeExecution ()
 Used to resume execution of a Communication command that was halted with either of the HALT EXECUTION commands.

virtual void ctlCmd_haltExecutionWhenIdle ()
 Used to halt the execution of the current Communication command after the 1-Wire bus has returned to the idle state.

virtual void ctlCmd_haltExecutionWhenDone ()
 Used to halt the execution of a Communication command after the current command execution is complete.

virtual void ctlCmd_flushCommCmds ()
 Used to clear all unexecuted Communication commands from the command FIFO.

virtual void ctlCmd_flushDataRcvBuffer ()
 Used to clear EP3 receive data FIFO (data from 1- Wire device).

virtual void ctlCmd_flushDataXmtBuffer ()
 Used to clear EP2 transmit data FIFO (data to 1- Wire device).

virtual void ctlCmd_getCommCmds (byteVec_t &outBytes)
 Used to retrieve unexecuted Communication commands and parameters from the command FIFO.

Mode command methods.
1-Wire characteristics and features (speed, durations, slew rate, etc.) are controlled with discrete Mode commands and/or embedded Communication command parameters.

Parameter values and enable/disable settings are used for characteristic control. Mode settings are stored in the DS2490 State Registers and can be read at any time or at the polling interval of EP1. Enable/disable settings are used to control three global features:

  • Strong pullup to +5V

  • +12V EPROM programming pulse

  • Dynamic 1-Wire bus communication speed change through a communication command

The settings for these three global controls are accessible only through Mode commands; the features are either enabled or disabled with the appropriate Mode command. Specific Communication commands exist to issue a strong pullup, a programming pulse, or speed change. When the corresponding setting is enabled the feature is usable as part of a communication command when disabled the feature is not usable. Parameter values and codes are used to specify and control 1-Wire bus characteristics:

  • 1-Wire bus communication speed

  • +5V strong pullup duration

  • +12V programming pulse duration

  • Pulldown slew rate

  • Write-1 low time

  • Data sample offset/Write-0 Recovery time

These six settings are controllable with discrete Mode commands or as embedded command/parameter values in Communications commands. Mode commands are immediately processed by the DS2490 when they are received.

virtual void modCmd_setEnablePulse (const bool inEnableStrongPullup, const bool inEnableProgPulse)
 Used to enable or disable a 1-Wire strong pullup pulse to 5V and/or +12V EPROM programming pulse.

virtual void modCmd_setEnableSpeedChange (const bool inEnableSpeedChange)
 Used to enable or disable a 1-Wire communication speed change.

virtual void modCmd_setOneWireSpeed (const OWSPEED_val_t inWireSpeed)
 Used to set the speed of 1-Wire communication; three settings are possible.

virtual void modCmd_setStrongPullupDuration (const uint8_t inSpuDurationFactor)
 Used to set the time duration of a 1-Wire strong pullup.

virtual void modCmd_setProgPulseDuration (const uint8_t inPpDurationFactor)
 Used to set the time duration of a 1-Wire Programming Pulse.

virtual void modCmd_setPulldownSlewRate (const PDSR_val_t inPDSR)
 Used to select the pulldown slew rate for 1-Wire bus Flexible Speed operation.

virtual void modCmd_setWrite1LowTime (const W1LT_val_t inW1LT)
 Used to select the Write-1 low time for 1-Wire bus Flexible speed operation.

virtual void modCmd_setDsoW0RecoveryTime (const SOW0RT_val_t inSOW0RT)
 Used to select the Data Sample Offset (tDSO) / Write-0 recovery (tW0R) time (DSO/W0R) for 1-Wire bus Flexible Speed operation.

Communication command methods.
Communication commands are used to communicate with and control an attached 1-Wire device(s).

Communication commands also contain embedded command bits for conditional control or additional functionality.

Unlike Mode and Control commands, Communication command processing is controlled by host software by setting embedded command bits within a Communication command. For example, a command macro form is supported in which several Communication commands and parameter data are sent/buffered in the DS2490 and then processed as a group.

Embedded command bit ICP is used to create macro command sets. Also, unlike Mode and Control commands, several forms of Communication command monitoring exist for host software to track processing progress. Depending on the settings of embedded communication command bits ICP and NTF, a Result Register value may be generated to provide command processing feedback.

Communication command buffer (FIFO) status and 1-Wire data transmit/received buffers (EP2/3 FIFOs) status can also be monitored via the State Registers.

virtual void comCmd_setDuration (const uint8_t inTimeFactor, const bool inSpecifyProgPulse, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Changes the State Register pulse duration value for either the +12V programming pulse or strong pullup.

virtual void comCmd_pulse (const bool inSpecifyProgPulse, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to temporarily pull the 1-Wire bus to +12V in order to program an EPROM device or to generate a strong pullup to 5V in order to provide extra power for an attached iButton device, e.g., temperature sensor or crypto iButton.

virtual void comCmd_oneWireReset (const bool inLoopUntilPresenceDetect, const bool inEnableSpeedChange, const OWSPEED_val_t inSpeedSelector, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to generate a reset pulse on the 1-Wire bus and to optionally change the 1-Wire speed.

virtual void comCmd_bitIO (const bool inWriteBit, const bool inDoStrongPullup, const bool inSuppressPullupOnRead1, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Generates a single time slot on the 1-Wire bus and reads back the response.

virtual void comCmd_byteIO (const uint8_t inWriteByte, const bool inDoStrongPullup, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Accomplishes a direct 1-Wire write and read with optional strong pullup after the last bit of the byte.

virtual void comCmd_blockIO (const uint16_t inWriteSize, const bool inBusResetBefore, const bool inDoStrongPullup, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Accomplishes a direct 1-Wire write or read with optional strong pullup after the last byte of the block.

virtual void comCmd_matchAccess (const uint8_t inMatchCommand, const bool inBusResetBefore, const bool inEnableSpeedChange, const OWSPEED_val_t inSpeedSelector, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Is used to address a device on the active section of the 1-Wire bus using the Match ROM or Overdrive Match command code.

virtual void comCmd_readStraight (const uint8_t inWritePreambleSize, const uint16_t inReadSize, const bool inBusResetBefore, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Transmits a user-specified preamble of data to the 1-Wire bus and then reads back as many bytes as specified.

virtual void comCmd_doAndRelease (const uint8_t inWritePreambleSize, const bool inDoReadOperation, const bool inDoStrongPullup, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Typically used to control the activity of the CPU of the crypto iButton, which requires a release sequence.

virtual void comCmd_setPath (const uint8_t inPreloadPathSize, const bool inBusResetBefore, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to activate a series of couplers that finally provide the access to the target 1-Wire device.

virtual void comCmd_writeSramPage (const uint8_t inWriteSize, const bool inShortPreambleSize, const bool inActivateCrc16, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to write data to the scratchpad of an SRAM device and optionally check the CRC.

virtual void comCmd_writeEprom (const uint16_t inWriteSize, const bool inActivateCrc16, const bool inCheck0BitsOnly, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to write data directly to the data or status memory of a 1-Wire EPROM device.

virtual void comCmd_readCrcProtPage (const uint8_t inPageCount, const uint8_t inPageSizeLog2, const bool inShortPreambleSize, const bool inActivateCrc16, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to read one or multiple CRC-protected pages of EPROM devices and to read tamper-detect bytes and counter value of Monetary iButtons.

virtual void comCmd_readRedirectPageCrc (const uint8_t inPageNumber, const uint8_t inPageSize, const bool inFollowRedirect, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Used to read a single page of data and check the CRC.

virtual void comCmd_searchAccess (const uint8_t inMaxDevNum, const uint8_t inSearchCommand, const bool inSearchWithoutFullAccess, const bool inReturnDiscrepancyInfo, const bool inBusResetBefore, const bool inFlushBuffersOnErr, const resultHandling_t inResultHandling=resultOnError_rsltHdl, const bool inImmediateExec=true)
 Is used to either access a device using the Search ROM command or to identify the devices on the active segments of a 1-Wire Network.

void handleCommonComCmdBits (LOW_portUsbDevice::wValue_t &inOutValueCmd, const resultHandling_t inResultHandling, const bool inImmediateExec)
 Handle common bits of all communication commands.

Enumeration type conversion methods
virtual const pdSlewRate_t PDSR_val_2_pdSlewRate (const PDSR_val_t inPDSR_val) const
 Convert value of type PDSR_val_t to pdSlewRate_t.

virtual const PDSR_val_t pdSlewRate_2_PDSR_val (const pdSlewRate_t inPdSlewRate_t) const
 Convert value of type pdSlewRate_t to PDSR_val_t.

virtual const w1LowTime_t W1LT_val_2_w1LowTime (const W1LT_val_t inW1LT_val) const
 Convert value of type W1LT_val_t to w1LowTime_t.

virtual const W1LT_val_t w1LowTime_2_W1LT_val (const w1LowTime_t inW1LowTime) const
 Convert value of type w1LowTime_t to W1LT_val_t.

virtual const soW0RecTime_t SOW0RT_val_2_soW0RecTime (const SOW0RT_val_t inSOW0RT_val) const
 Convert value of type SOW0RT_val_t to soW0RecTime_t.

virtual const SOW0RT_val_t soW0RecTime_2_SOW0RT_val (const soW0RecTime_t inSoW0RecTime) const
 Convert value of type soW0RecTime_t to SOW0RT_val_t.

virtual const wireSpeed_t OWSPEED_val_2_wireSpeed (const OWSPEED_val_t inOWSPEED_val) const
 Convert value of type OWSPEED_val_t to wireSpeed_t.

virtual const OWSPEED_val_t wireSpeed_2_OWSPEED_val (const wireSpeed_t inWireSpeed) const
 Convert value of type wireSpeed_t to OWSPEED_val_t.

virtual const uint8_t strongPullup_2_spFactor (const strongPullup_t inPullup) const
 Convert value of type strongPullup_t to factor of 16ms.

virtual const uint8_t progPulse_2_ppFactor (const progPulse_t inPulse) const
 Convert value of type progPulse_t to factor of 8us.


Private Attributes

LOW_portUsbDeviceusbDevice
 The USB device we use.


Static Private Attributes

USB related constants.
const LOW_portUsbDevice::usbInterface_t usbDefaultInterface = 0
 Default and only USB interface of DS2490.

const LOW_portUsbDevice::bmRequestType_t vendorCmd_requestType = 0x40
 Request type of DS2490 vendor specific commands.

USB timeout constants.
const LOW_portUsbDevice::usbTimeout_t ctlCmd_usbTimeout = 1000
 Timeout in ms for control commands.

const LOW_portUsbDevice::usbTimeout_t modCmd_usbTimeout = 1000
 Timeout in ms for mode commands.

const LOW_portUsbDevice::usbTimeout_t comCmd_usbTimeout = 1000
 Timeout in ms for communicaton commands.

USB interface alternate settings.
const LOW_portUsbDevice::usbSetting_t usbAltSetting_10_16 = 0
 poll interval EP2/EP3 = 10ms; max packet size = 16 bytes; Long interrupt polling interval, small packet size for bulk pipes

const LOW_portUsbDevice::usbSetting_t usbAltSetting_10_64 = 1
 poll interval EP2/EP3 = 10ms; max packet size = 64 bytes; Long interrupt polling interval, large packet size for bulk pipes

const LOW_portUsbDevice::usbSetting_t usbAltSetting_1_16 = 2
 poll interval EP2/EP3 = 1ms; max packet size = 16 bytes; Short interrupt polling interval, small packet size for bulk pipes

const LOW_portUsbDevice::usbSetting_t usbAltSetting_1_64 = 3
 poll interval EP2/EP3 = 1ms; max packet size = 64 bytes; Short interrupt polling interval, large packet size for bulk pipes

USB endpoints.
const LOW_portUsbDevice::usbEndpoint_t usbControlEP = 0
 Endpoint for the bi-directional default control pipe.

const LOW_portUsbDevice::usbEndpoint_t usbStatusInEP = 1
 Endpoint for an interrupt pipe (device to host) and is used to relay DS2490 status register data and specific command execution completion and/or error information to the host.

const LOW_portUsbDevice::usbEndpoint_t usbDataOutEP = 2
 Endpoint for a bulk data out pipe (data from host) and is used to transmit 1-Wire device data from the host to the DS2490.

const unsigned int usbDataOutEP_FIFOsize = 128
 FIFO size in bytes of endpoint usbDataOutEP.

const LOW_portUsbDevice::usbEndpoint_t usbDataInEP = 3
 Endpoint for a bulk data in pipe (data to host) and is used to send data received by the DS2490 from the 1-Wire bus back to the host for processing.

const unsigned int usbDataInEP_FIFOsize = 128
 FIFO size in bytes of endpoint usbDataOutEP.

Command types.
Three different vendor-specific command types exist to control and communicate with the DS2490:

  • Control commands are used to manage various device functions including the processing of communication commands, buffer clearing, and SW reset.

  • Communication commands are used for 1-Wire data and command I/O.

  • Mode commands are used to establish the 1-Wire operational characteristics of the DS2490 such as slew rate, low time, strong pullup, etc.

Control, Communication and Mode commands, like USB core requests, are communicated over the default control pipe at EP0.

const LOW_portUsbDevice::bRequest_t control_cmdType = 0x00
const LOW_portUsbDevice::bRequest_t comm_cmdType = 0x01
const LOW_portUsbDevice::bRequest_t mode_cmdType = 0x02
Control commands.
const LOW_portUsbDevice::wValue_t resetDevice_ctlCmd = 0x0000
 Control command.

const LOW_portUsbDevice::wValue_t startExe_ctlCmd = 0x0001
 Control command.

const LOW_portUsbDevice::wValue_t resumeExe_ctlCmd = 0x0002
 Control command.

const LOW_portUsbDevice::wValue_t haltExeIdle_ctlCmd = 0x0003
 Control command.

const LOW_portUsbDevice::wValue_t haltExeDone_ctlCmd = 0x0004
 Control command.

const LOW_portUsbDevice::wValue_t flushCommCmds_ctlCmd = 0x0007
 Control command.

const LOW_portUsbDevice::wValue_t flushRcvBuffer_ctlCmd = 0x0008
 Control command.

const LOW_portUsbDevice::wValue_t flushXmtBuffer_ctlCmd = 0x0009
 Control command.

const LOW_portUsbDevice::wValue_t getCommCmds_ctlCmd = 0x000A
 Control command.

Mode commands.
const LOW_portUsbDevice::wValue_t pulseEn_modCmd = 0x0000
 Mode command.

const LOW_portUsbDevice::wValue_t speedChangeEn_modCmd = 0x0001
 Mode command.

const LOW_portUsbDevice::wValue_t oneWireSpeed_modCmd = 0x0002
 Mode command.

const LOW_portUsbDevice::wValue_t strongPuDuration_modCmd = 0x0003
 Mode command.

const LOW_portUsbDevice::wValue_t pulldownSlewRate_modCmd = 0x0004
 Mode command.

const LOW_portUsbDevice::wValue_t progPulseDuration_modCmd = 0x0005
 Mode command.

const LOW_portUsbDevice::wValue_t write1LowTime_modCmd = 0x0006
 Mode command.

const LOW_portUsbDevice::wValue_t dsow0Trec_modCmd = 0x0007
 Mode command.

Base for communication commands.
const LOW_portUsbDevice::wValue_t setDuration_comCmdBase = 0x0012
 Communication command.

const LOW_portUsbDevice::wValue_t pulse_comCmdBase = 0x0030
 Communication command.

const LOW_portUsbDevice::wValue_t oneWireReset_comCmdBase = 0x0042
 Communication command.

const LOW_portUsbDevice::wValue_t bitIO_comCmdBase = 0x0020
 Communication command.

const LOW_portUsbDevice::wValue_t byteIO_comCmdBase = 0x0052
 Communication command.

const LOW_portUsbDevice::wValue_t blockIO_comCmdBase = 0x0074
 Communication command.

const LOW_portUsbDevice::wValue_t matchAccess_comCmdBase = 0x0064
 Communication command.

const LOW_portUsbDevice::wValue_t readStraight_comCmdBase = 0x0080
 Communication command.

const LOW_portUsbDevice::wValue_t doAndRelease_comCmdBase = 0x6092
 Communication command.

const LOW_portUsbDevice::wValue_t setPath_comCmdBase = 0x00a2
 Communication command.

const LOW_portUsbDevice::wValue_t writeSramPage_comCmdBase = 0x00b2
 Communication command.

const LOW_portUsbDevice::wValue_t writeEprom_comCmdBase = 0x00c4
 Communication command.

const LOW_portUsbDevice::wValue_t readCrcProtPage_comCmdBase = 0x00d4
 Communication command.

const LOW_portUsbDevice::wValue_t readRedirectPageCrc_comCmdBase = 0x21e4
 Communication command.

const LOW_portUsbDevice::wValue_t searchAccess_comCmdBase = 0x00f4
 Communication command.

Communication command bitmasks.
const LOW_portUsbDevice::wValue_t RTS_bitmask = 0x4000
 RTS = 1 returns the discrepancy information to the host if SM = 1 and there are more devices than could be discovered in the current pass.

const LOW_portUsbDevice::wValue_t CIB_bitmask = 0x4000
 CIB = 1 prevents a strong pullup to 5V if SPU = 1 and the bit read back from the 1- Wire bus is 1.

const LOW_portUsbDevice::wValue_t PST_bitmask = 0x4000
 PST = 1 continuously generate 1-Wire Reset sequences until a presence pulse is discovered.

const LOW_portUsbDevice::wValue_t PS_bitmask = 0x4000
 PS = 1 reduces the preamble size to 2 bytes (rather than 3).

const LOW_portUsbDevice::wValue_t DT_bitmask = 0x2000
 DT = 1 activates/selects the CRC16 generator.

const LOW_portUsbDevice::wValue_t SPU_bitmask = 0x1000
 SPU = 1 inserts a strong pullup to 5V after a Bit or Byte or Block I/O or Do & Release command.

const LOW_portUsbDevice::wValue_t F_bitmask = 0x0800
 F = 1 clears the buffers in case an error occurred during the execution of the previous command; requires that ICP = 0 in the previous command.

const LOW_portUsbDevice::wValue_t NTF_bitmask = 0x0400
 NTF = 1 always generate communication command processing result feedback if ICP = 0 NTF = 0 generate communication command processing result feedback only if an error occurs and ICP = 0.

const LOW_portUsbDevice::wValue_t ICP_bitmask = 0x0200
 ICP = 1 indicates that the command is not the last one of a macro; as a consequence command processing result feedback messages are suppressed.

const LOW_portUsbDevice::wValue_t RST_bitmask = 0x0100
 RST = 1 inserts a 1-Wire Reset before executing the command.

const LOW_portUsbDevice::wValue_t SE_bitmask = 0x0008
 SE = 1 enable the speed change on the 1-Wire bus.

const LOW_portUsbDevice::wValue_t R_bitmask = 0x0008
 R = 1 performs a read function.

const LOW_portUsbDevice::wValue_t Z_bitmask = 0x0008
 Z = 1 checks if the 0-bits in the byte to be written are 0-bits in the byte read back form the device.

const LOW_portUsbDevice::wValue_t SM_bitmask = 0x0008
 SM = 1 searches for and reports ROM Ids without really accessing a particular device.

const LOW_portUsbDevice::wValue_t CH_bitmask = 0x0008
 CH = 1 follows the chain if the page is redirected.

const LOW_portUsbDevice::wValue_t D_bitmask = 0x0008
 D Data bit value to be written to the 1-Wire bus.

const LOW_portUsbDevice::wValue_t TYPE_bitmask = 0x0008
 TYPE = 1 specifies programming pulse duration.

const LOW_portUsbDevice::wValue_t IM_bitmask = 0x0001
 IM = 1 enables immediate execution of the command.

State register enable bitmasks.
const uint8_t SPUE_bitmask = 0x01
 SPUE If set to 1, the strong pullup to 5V is enabled, if set to 0, it is disabled.

const uint8_t PRGE_bitmask = 0x02
 PRGE If set to 1, a 12V programming pulse is enabled, if set to 0, it is disabled.

const uint8_t SPCE_bitmask = 0x04
 SPCE If set to 1, a dynamic 1-Wire bus speed change through a Communication command is enabled, if set to 0, it is disabled.

State register device status bitmasks.
const uint8_t SPUA_bitmask = 0x01
 SPUA if set to 1, the strong pullup to 5V is currently active, if set to 0, it is inactive.

const uint8_t PRGA_bitmask = 0x02
 PRGA if set to 1, a 12V programming pulse is currently being generated, if set to 0, it is not.

const uint8_t VP12_bitmask = 0x04
 12VP if set to 1, the external 12V programming voltage is present, if set to 0, it is not present.

const uint8_t PMOD_bitmask = 0x08
 PMOD if set to 1, the DS2490 is powered from USB and external sources, if set to 0, all DS2490 power is provided from USB.

const uint8_t HALT_bitmask = 0x10
 HALT if set to 1, the DS2490 is currently halted, if set to 0, the device is not halted.

const uint8_t IDLE_bitmask = 0x20
 IDLE if set to 1, the DS2490 is currently idle, if set to 0, the device is not idle.

const uint8_t EP0F_bitmask = 0x80
 EPOF Endpoint 0 FIFO status, see Note 1.

Communication command error bitmasks.
const uint8_t devDetect_code = 0xa5
 1-Wire Device Detect Byte

const uint8_t EOS_bitmask = 0x80
 EOS A value of 1 indicates that a SEARCH ACCESS with SM = 1 ended sooner than expected reporting less ROM ID s than specified in the number of devices parameter.

const uint8_t RDP_bitmask = 0x40
 RDP A value of 1 indicates that a READ REDIRECT PAGE WITH/CRC encountered a page that is redirected.

const uint8_t CRC_bitmask = 0x20
 CRC A value of 1 indicates that a CRC error occurred when executing one of the following commands: WRITE SRAM PAGE, WRITE EPROM, READ CRC PROT PAGE, or READ REDIRECT PAGE W/CRC.

const uint8_t CMP_bitmask = 0x10
 CMP A value of 1 indicates an error with one of the following: Error when reading the confirmation byte with a SET PATH command.

const uint8_t VPP_bitmask = 0x08
 VPP A value of 1 indicates that during a PULSE with TYPE = 1 or WRITE EPROM command the 12V programming pulse was not seen on the 1-Wire bus; this could indicate that there were other devices on the bus that clamped the voltage to a value lower than VPP or that the programming pulse was disabled with a mode command.

const uint8_t APP_bitmask = 0x04
 APP A value of 1 indicates that a 1-WIRE RESET revealed an Alarming Presence Pulse.

const uint8_t SH_bitmask = 0x02
 SH A value of 1 indicates that a 1-WIRE RESET revealed a short to the 1-Wire bus or the SET PATH command could not successfully connect a branch due to a short.

const uint8_t NRS_bitmask = 0x01
 NRS A value of 1 indicates an error with one of the following: 1-WIRE RESET did not reveal a Presence Pulse.


Detailed Description

Link class for DS2490 USB to 1-Wire Bridge Chip.

DS2490 features:

The DS2490 is a bridge chip that enables communication between a USB host system and a 1-Wire bus. It provides regular, overdrive, and flexible 1-Wire communication speeds and a full-speed 12Mbps connection to USB. USB vendor-specific commands defined in this specification are used to control the DS2490 and communicate with attached 1-Wire devices.

This class is thread-safe.

Todo:
Provide assignment operator and copy constructor

Finish documentation

Author:
Harald Roelle

Parts of the documentation by Dallas Semiconductors / Maxim Integrated Products

Definition at line 57 of file LOW_linkDS2490.h.


Member Typedef Documentation

typedef struct LOW_linkDS2490::deviceFeedback_t LOW_linkDS2490::deviceFeedback_t [private]
 

Status information, decoded format.

typedef struct LOW_linkDS2490::deviceFeedbackRaw_t LOW_linkDS2490::deviceFeedbackRaw_t [private]
 

Status information, raw format from device.

typedef std::vector<LOW_linkFlexibleSpeed*> LOW_linkFlexibleSpeed::flexLinkPtrVec_t [inherited]
 

Vector type of link class pointers.

Definition at line 64 of file LOW_linkFlexibleSpeed.h.

typedef LOW_objectIDFactory::objectID_t LOW_link::linkID_t [inherited]
 

Type for individual link ID number.

Definition at line 126 of file LOW_link.h.

typedef std::vector<LOW_link*> LOW_link::linkPtrVec_t [inherited]
 

Vector type of link class pointers.

Definition at line 124 of file LOW_link.h.

typedef struct LOW_linkDS2490::resultCode_t LOW_linkDS2490::resultCode_t [private]
 

Status information, decoded format.

typedef std::vector<resultCode_t> LOW_linkDS2490::resultCodeVec_t [private]
 

Vector type of resultCode_t.

Definition at line 548 of file LOW_linkDS2490.h.

Referenced by getPullDownSlewRate(), getSampleOffsetWrite0Rec(), getWireSpeed(), getWrite1LowTime(), progPulseInternal(), programPulse(), resetBus(), resetLinkAdapter(), searchDevices(), strongPullup(), strongPullupInternal(), touchBit(), touchBlock(), and touchByte().


Member Enumeration Documentation

enum LOW_linkDS2490::OWSPEED_val_t [private]
 

Type for wirespeed.

Enumeration values:
normal_OWSPEED  16 kbps
flexible_OWSPEED 
overdrive_OWSPEED  142 kbps

Definition at line 493 of file LOW_linkDS2490.h.

Referenced by wireSpeed_2_OWSPEED_val().

enum LOW_linkFlexibleSpeed::pdSlewRate_t [inherited]
 

Type for flexible speed pulldown slew rate in V/microsec.

Enumeration values:
pdSlewRate_15  Pulldown slew rate 15 V/microsec.
pdSlewRate_2_2  Pulldown slew rate 2.2 V/microsec.
pdSlewRate_1_65  Pulldown slew rate 1.65 V/microsec.
pdSlewRate_1_37  Pulldown slew rate 1.37 V/microsec.
pdSlewRate_1_1  Pulldown slew rate 1.1 V/microsec.
pdSlewRate_0_83  Pulldown slew rate 0.83 V/microsec.
pdSlewRate_0_7  Pulldown slew rate 0.7 V/microsec.
pdSlewRate_0_55  Pulldown slew rate 0.55 V/microsec.

Definition at line 76 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), getPullDownSlewRate(), LOW_linkDS2480B::getPullDownSlewRate(), PDSR_val_2_pdSlewRate(), and LOW_linkDS2480B::PDSR_val_2_pdSlewRate().

enum LOW_linkDS2490::PDSR_val_t [private]
 

Type for flexible speed pulldown slew rate in V/microsec.

Enumeration values:
PDSR_15 
PDSR_2_2 
PDSR_1_65 
PDSR_1_37 
PDSR_1_1 
PDSR_0_83 
PDSR_0_7 
PDSR_0_55 

Definition at line 495 of file LOW_linkDS2490.h.

Referenced by pdSlewRate_2_PDSR_val().

enum LOW_link::progPulse_t [inherited]
 

Type for 12V program pulse period specification.

Period may vary a little, depending on actual device.

Enumeration values:
progPulse_32  32 microsec
progPulse_64  64 microsec
progPulse_128  128 microsec
progPulse_256  256 microsec
progPulse_512  512 microsec
progPulse_1024  1024 microsec
progPulse_2048  2032 / 2048 microsec

Definition at line 141 of file LOW_link.h.

enum LOW_linkDS2490::resultHandling_t [private]
 

Type to define result handling with communication commands.

Enumeration values:
noResult_rsltHdl  NTF=x ICP=1, Never generate result register feedback.
resultOnError_rsltHdl  NTF=0 ICP=0, Generate result register on error and leave in EP1 FIFO.
resultAlways_rsltHdl  NTF=1 ICP=0, Always generate result register and leave in EP1 FIFO.

Definition at line 503 of file LOW_linkDS2490.h.

enum LOW_linkFlexibleSpeed::soW0RecTime_t [inherited]
 

Type for flexible speed DSO/ W0R time in microsec.

Enumeration values:
soW0RecTime_3  DSO/w0R time 3 microsec.
soW0RecTime_4  DSO/w0R time 4 microsec.
soW0RecTime_5  DSO/w0R time 5 microsec.
soW0RecTime_6  DSO/w0R time 6 microsec.
soW0RecTime_7  DSO/w0R time 7 microsec.
soW0RecTime_8  DSO/w0R time 8 microsec.
soW0RecTime_9  DSO/w0R time 9 microsec.
soW0RecTime_10  DSO/w0R time 10 microsec.

Definition at line 98 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), getSampleOffsetWrite0Rec(), LOW_linkDS2480B::getSampleOffsetWrite0Rec(), SOW0RT_val_2_soW0RecTime(), and LOW_linkDS2480B::SOW0RT_val_2_soW0RecTime().

enum LOW_linkDS2490::SOW0RT_val_t [private]
 

Type for flexible speed DSO/ W0R time in microsec.

Enumeration values:
SOW0RT_3 
SOW0RT_4 
SOW0RT_5 
SOW0RT_6 
SOW0RT_7 
SOW0RT_8 
SOW0RT_9 
SOW0RT_10 

Definition at line 499 of file LOW_linkDS2490.h.

Referenced by soW0RecTime_2_SOW0RT_val().

enum LOW_link::strongPullup_t [inherited]
 

Type for strong pullup period specification.

Period may vary a little, depending on actual device.

Enumeration values:
pullUp_16_4  16 / 16.4 ms
pullUp_65_5  64 / 65.5 ms
pullUp_131  128 / 131 ms
pullUp_262  256 / 262 ms
pullUp_524  512 / 524 ms
pullUp_1048  1024 / 1048 ms
pullUp_NONE  no pullup

Definition at line 130 of file LOW_link.h.

enum LOW_linkFlexibleSpeed::w1LowTime_t [inherited]
 

Type for flexible speed write-1 low time in microsec.

Enumeration values:
w1LowTime_8  Write-1 low time 8 microsec.
w1LowTime_9  Write-1 low time 9 microsec.
w1LowTime_10  Write-1 low time 10 microsec.
w1LowTime_11  Write-1 low time 11 microsec.
w1LowTime_12  Write-1 low time 12 microsec.
w1LowTime_13  Write-1 low time 13 microsec.
w1LowTime_14  Write-1 low time 14 microsec.
w1LowTime_15  Write-1 low time 15 microsec.

Definition at line 87 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getWrite1LowTime(), getWrite1LowTime(), LOW_linkDS2480B::getWrite1LowTime(), W1LT_val_2_w1LowTime(), and LOW_linkDS2480B::W1LT_val_2_w1LowTime().

enum LOW_linkDS2490::W1LT_val_t [private]
 

Type for flexible speed write-1 low time in microsec.

Enumeration values:
W1LT_8 
W1LT_9 
W1LT_10 
W1LT_11 
W1LT_12 
W1LT_13 
W1LT_14 
W1LT_15 

Definition at line 497 of file LOW_linkDS2490.h.

Referenced by w1LowTime_2_W1LT_val().

enum LOW_linkFlexibleSpeed::wireSpeed_t [inherited]
 

1-Wire communication speeds.

Enumeration values:
normal_speed  Normal 1-Wire speed, 16 kbps.
flexible_speed  Flexible 1-Wire speed.
overdrive_speed  Overdrive 1-Wire speed, 142 kbps.

Definition at line 67 of file LOW_linkFlexibleSpeed.h.

Referenced by getWireSpeed(), LOW_linkDS2480B::getWireSpeed(), OWSPEED_val_2_wireSpeed(), and LOW_linkDS2480B::OWSPEED_val_2_wireSpeed().


Constructor & Destructor Documentation

LOW_linkDS2490::LOW_linkDS2490 const LOW_portUsb_Factory::usbDeviceSpecifier_t  inUsbDevSpec,
const bool  inHasExternalPower,
const bool  inAllowProgPulse = false
 

Constructor.

Timings for flexible speed is configured to the recommeded optimal parameters as of app note #148.

Parameters:
inUsbDevSpec USB device specifier of the DS2490.
inHasExternalPower Whether the attached bus supplies external power.
inAllowProgPulse Whether the program pulse should be allowed.

Definition at line 29 of file LOW_linkDS2490.cpp.

References commonConstructorActions(), LOW_portUsbDevice::getProductID(), LOW_portUsbDevice::getVendorID(), LOW_portUsb_Factory::new_portUsbDevice(), usbDevice, usbProductID, and usbVendorID.

LOW_linkDS2490::~LOW_linkDS2490  )  [virtual]
 

Destructor.

Definition at line 43 of file LOW_linkDS2490.cpp.

References ctlCmd_resetDevice(), LOW_portUsbDevice::releaseInterface(), usbDefaultInterface, and usbDevice.


Member Function Documentation

LOW_linkFlexibleSpeed::class_DERIVE_FROM_EXCEPTION incompatibleSpeed_error  ,
LOW_exception 
[inherited]
 

Exception base class for all exceptions thrown by LOW_link.

LOW_link::class_DERIVE_FROM_EXCEPTION sizeMismatch_error  ,
link_error 
[inherited]
 

LOW_link::class_DERIVE_FROM_EXCEPTION notAllowed_error  ,
link_error 
[inherited]
 

Exception class to be thrown on access violation errors.

LOW_link::class_DERIVE_FROM_EXCEPTION illegalLevel_error  ,
link_error 
[inherited]
 

Exception class to be thrown on errors related to requested voltage level.

LOW_link::class_DERIVE_FROM_EXCEPTION illegalSpeed_error  ,
link_error 
[inherited]
 

Exception class to be thrown on errors related to currently selected wire speed.

LOW_link::class_DERIVE_FROM_EXCEPTION internal_error  ,
link_error 
[inherited]
 

Exception class to be thrown on pure internal errors.

LOW_link::class_DERIVE_FROM_EXCEPTION comm_error  ,
link_error 
[inherited]
 

Exception class to be thrown on communication errors.

LOW_link::class_DERIVE_FROM_EXCEPTION link_error  ,
LOW_exception 
[inherited]
 

Exception base class for all exceptions thrown by LOW_link.

void LOW_linkDS2490::comCmd_bitIO const bool  inWriteBit,
const bool  inDoStrongPullup,
const bool  inSuppressPullupOnRead1,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Generates a single time slot on the 1-Wire bus and reads back the response.

This time slot may optionally be followed by a strong pullup using embedded command bits SPU and CIB. With CIB = 1, a requested strong pullup will only occur if the read-back revealed a 0. Data is returned to the host only if the embedded command bit ICP = 0. If ICP = 0, the bit read from the 1-Wire device is stored in the EP3 FIFO and is read by the host using an EP3 bulk transaction.

Definition at line 1171 of file LOW_linkDS2490.cpp.

References bitIO_comCmdBase, CIB_bitmask, comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), D_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), SPU_bitmask, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wValue_t.

Referenced by touchBit().

void LOW_linkDS2490::comCmd_blockIO const uint16_t  inWriteSize,
const bool  inBusResetBefore,
const bool  inDoStrongPullup,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Accomplishes a direct 1-Wire write or read with optional strong pullup after the last byte of the block.

The optional strong pullup is controlled using embedded command bit SPU. Embedded command bit RST enables a 1-Wire reset before the command executes. To accomplish a READ function all input data should be 0xFF, otherwise the data read from the 1-Wire bus will be masked. For a block write sequence the EP2 FIFO must be pre-filled with data before command execution. Additionally, for block sizes greater then the FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary. A similar EP3 FIFO content monitoring requirement exists for block read sequences. During a block read the number of bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the FIFO overflows.

Definition at line 1212 of file LOW_linkDS2490.cpp.

References blockIO_comCmdBase, comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), RST_bitmask, SPU_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

Referenced by touchBlock().

void LOW_linkDS2490::comCmd_byteIO const uint8_t  inWriteByte,
const bool  inDoStrongPullup,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Accomplishes a direct 1-Wire write and read with optional strong pullup after the last bit of the byte.

The optional strong pullup is controlled using embedded command bit SPU. For a write sequence, the data byte to be written is included in the command setup packet as shown in Appendix 2. For a read sequence, the setup packet data byte value is set to 0xFF. Data is returned to the host only if the embedded command bit ICP = 0. If ICP = 0, the byte read from the 1-Wire device is stored in the EP3 FIFO and is read by the host using an EP3 bulk transaction.

Definition at line 1192 of file LOW_linkDS2490.cpp.

References byteIO_comCmdBase, comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), SPU_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

Referenced by touchByte().

void LOW_linkDS2490::comCmd_doAndRelease const uint8_t  inWritePreambleSize,
const bool  inDoReadOperation,
const bool  inDoStrongPullup,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Typically used to control the activity of the CPU of the crypto iButton, which requires a release sequence.

This command can also be used to read from or write to the I/O buffer or Status Register of the crypto iButton. A short preamble (3 bytes) consists of a 1-Wire command code followed by the release sequence. A four-byte preamble with embedded command bit R = 1 consists of a 1-Wire command code followed by length byte and the release sequence. A 4-byte preamble with embedded command bit R = 0 consists of a 1-Wire command code followed by a status byte and the release sequence. The long preamble (minimum 5 bytes, embedded command bit R = 0) consists of a 1-Wire command, a length byte, data bytes and the release sequence. In this case, the length byte indicates the total number of bytes between the length byte and release sequence. The least significant byte of the release sequence is transmitted first. Embedded command bit SPU must be 1 when trying to run (start, continue) the CPU of the crypto iButton. In all other cases, SPU should be 0. Additionally, embedded command bit F can be used to clear the communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be pre-filled with preamble data before command execution. Additionally, for preamble sizes greater then the FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary. A similar EP3 FIFO content monitoring requirement exists for the block read. During a block read the number of bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the FIFO overflows.

Definition at line 1289 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), doAndRelease_comCmdBase, F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), R_bitmask, SPU_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_matchAccess const uint8_t  inMatchCommand,
const bool  inBusResetBefore,
const bool  inEnableSpeedChange,
const OWSPEED_val_t  inSpeedSelector,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Is used to address a device on the active section of the 1-Wire bus using the Match ROM or Overdrive Match command code.

The EP2 FIFO must be pre-filled with the 8 bytes target ROM ID before command execution. Embedded command bit RST enables a 1-Wire reset before the command executes, and embedded command bit SE enables a 1-Wire speed change that takes effect before the command executes.

Definition at line 1234 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, matchAccess_comCmdBase, LOW_helper_msglog::printDebug(), RST_bitmask, SE_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_oneWireReset const bool  inLoopUntilPresenceDetect,
const bool  inEnableSpeedChange,
const OWSPEED_val_t  inSpeedSelector,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to generate a reset pulse on the 1-Wire bus and to optionally change the 1-Wire speed.

The new speed will take effect only if the embedded command bit SE is set to 1. When the 1-WIRE RESET is sent after an Overdrive Skip ROM command, SE must be 1 and the new speed must be 0x02. See MODE CONTROL section for additional communication speed information. To switch back to regular speed, set SE = 1 and the new speed parameter to 0x00 (regular) or 0x01 (flexible).

Definition at line 1147 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, oneWireReset_comCmdBase, LOW_helper_msglog::printDebug(), PST_bitmask, SE_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

Referenced by resetBus().

void LOW_linkDS2490::comCmd_pulse const bool  inSpecifyProgPulse,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to temporarily pull the 1-Wire bus to +12V in order to program an EPROM device or to generate a strong pullup to 5V in order to provide extra power for an attached iButton device, e.g., temperature sensor or crypto iButton.

The pulse duration is determined by the value in the respective mode register, programming pulse or strong pullup. The 12VP bit in the Device Status Flags (bit2) is used to determine whether +12V VPP programming voltage is present.

Definition at line 1128 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), pulse_comCmdBase, TYPE_bitmask, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wValue_t.

Referenced by progPulseInternal(), programPulse(), strongPullup(), and strongPullupInternal().

void LOW_linkDS2490::comCmd_readCrcProtPage const uint8_t  inPageCount,
const uint8_t  inPageSizeLog2,
const bool  inShortPreambleSize,
const bool  inActivateCrc16,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to read one or multiple CRC-protected pages of EPROM devices and to read tamper-detect bytes and counter value of Monetary iButtons.

If embedded command bit DT = 1, the CRC16 generator is selected; if DT = 0, CRC8 is used. Embedded command bit CIB is used to specify either a 2- or 3-byte read preamble. Additionally, embedded command bit F can be used to clear the Communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. The command can also be used to read a single partial page up to the end of that page and reading the PIOs of a DS2406. This command is also applicable to the Read IPR function of the crypto iButton if CIB = 1. The EP2 FIFO must be pre-filled with preamble data before command execution. To prevent overflow, the EP3 FIFO must be monitored (and read if necessary) during command execution if reading more data than the size of the EP3 FIFO.

Definition at line 1383 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), DT_bitmask, F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), PS_bitmask, readCrcProtPage_comCmdBase, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_readRedirectPageCrc const uint8_t  inPageNumber,
const uint8_t  inPageSize,
const bool  inFollowRedirect,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to read a single page of data and check the CRC.

If the page is not redirected, the host will receive the page number and all its data. If the page is redirected and embedded command bit CH = 1 the device will follow the trail of redirections until a page is found that is not redirected. When found, the host will receive the page number and all data of that particular page. If CH = 0 and the first read attempt reveals a redirection the host will only receive the number of the page the addressed page is redirected to. Reading starts at a page boundary. Additionally, embedded command bit F can be used to clear the communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. An NRS error code is an indication of an infinite loop. The EP2 FIFO must be pre-filled with ROM ID and command code data before command execution. To prevent overflow, the EP3 FIFO must be monitored (and read if necessary) during command execution if reading more data than the size of the EP3 FIFO.

Definition at line 1408 of file LOW_linkDS2490.cpp.

References CH_bitmask, comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), readRedirectPageCrc_comCmdBase, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_readStraight const uint8_t  inWritePreambleSize,
const uint16_t  inReadSize,
const bool  inBusResetBefore,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Transmits a user-specified preamble of data to the 1-Wire bus and then reads back as many bytes as specified.

The preamble typically consists of a 1-Wire command code followed by TA1 and TA2. It is possible to include a Match ROM command and ROM ID in the preamble to also address a device at the current speed. This command can also be used to copy the scratchpad or disconnect a path. Embedded command bit RST enables a 1-Wire reset before the command executes. The EP2 FIFO must be pre-filled with preamble data before command execution. Additionally, for preamble sizes greater then the FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary. A similar EP3 FIFO content monitoring requirement exists for the block read. During a block read, the number of bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the FIFO overflows.

Definition at line 1257 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, noResult_rsltHdl, LOW_helper_msglog::printDebug(), readStraight_comCmdBase, resultAlways_rsltHdl, resultOnError_rsltHdl, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, LOW_portUsbDevice::wLength_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_searchAccess const uint8_t  inMaxDevNum,
const uint8_t  inSearchCommand,
const bool  inSearchWithoutFullAccess,
const bool  inReturnDiscrepancyInfo,
const bool  inBusResetBefore,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Is used to either access a device using the Search ROM command or to identify the devices on the active segments of a 1-Wire Network.

Embedded command bit SM is used to specify the type of search. Embedded command bit RTS is used to control discrepancy information reporting. Additionally, embedded command bit F can be used to clear the Communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. An NRS error code indicates that there was no response on at least one of the 64 bits of the ROM search. The EP2 FIFO must be pre-filled with ROM ID data before command execution. To prevent overflow, the EP3 FIFO must be monitored (and read if necessary) during command execution if returning more data than the size of the EP3 FIFO.

Definition at line 1431 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), RST_bitmask, RTS_bitmask, searchAccess_comCmdBase, SM_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

Referenced by searchDevices().

void LOW_linkDS2490::comCmd_setDuration const uint8_t  inTimeFactor,
const bool  inSpecifyProgPulse,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Changes the State Register pulse duration value for either the +12V programming pulse or strong pullup.

The new duration value is loaded into the duration register specified. The duration values can alternatively be changed using a Mode command. The new duration setting remains effective until changed by another SET DURATION or MODE Command. See section MODE COMMANDS for duration parameter value setting.

Definition at line 1108 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), setDuration_comCmdBase, TYPE_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

Referenced by progPulseInternal(), programPulse(), strongPullup(), strongPullupInternal(), touchBit(), touchBlock(), and touchByte().

void LOW_linkDS2490::comCmd_setPath const uint8_t  inPreloadPathSize,
const bool  inBusResetBefore,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to activate a series of couplers that finally provide the access to the target 1-Wire device.

Embedded command bit RST enables a 1-Wire reset before the command executes. Additionally, embedded command bit F can be used to clear the communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be pre-filled with coupler data before command execution. Additionally, for coupler data sizes greater then the EP2 FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary. Upon completion of command execution, the EP3 FIFO is loaded with a 1-byte value that indicates the number of couplers activated. An NRS error code is an indication that there was no presence pulse on the branch that was to be connected.

Definition at line 1313 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), RST_bitmask, setPath_comCmdBase, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::comCmd_writeEprom const uint16_t  inWriteSize,
const bool  inActivateCrc16,
const bool  inCheck0BitsOnly,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to write data directly to the data or status memory of a 1-Wire EPROM device.

If embedded command bit DT = 1, the CRC16 generator is selected; if DT = 0, CRC8 is used. Embedded command bit Z controls the method used for comparison of the data written to the 1-Wire device. Additionally, embedded command bit F can be used to clear the Communication command buffer and EP2/3 FIFOs if an error occurs during execution of the command. The EP2 FIFO must be pre-filled with preamble and EPROM data before command execution. Additionally, for data block sizes greater then the EP2 FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary.

Definition at line 1359 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), DT_bitmask, F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, writeEprom_comCmdBase, LOW_portUsbDevice::wValue_t, and Z_bitmask.

void LOW_linkDS2490::comCmd_writeSramPage const uint8_t  inWriteSize,
const bool  inShortPreambleSize,
const bool  inActivateCrc16,
const bool  inFlushBuffersOnErr,
const resultHandling_t  inResultHandling = resultOnError_rsltHdl,
const bool  inImmediateExec = true
[private, virtual]
 

Used to write data to the scratchpad of an SRAM device and optionally check the CRC.

To copy the data to its final memory location, it is required to send the READ STRAIGHT command with a copy scratchpad preamble and a 0 block size. Embedded command bit DT = 1 activates the CRC16 generator. This command is also applicable to the Write IPR function of the Crypto iButton if embedded command bit CIB = 1. To write a partial page the page size parameter and the target address need to be set accordingly. The EP2 FIFO must be pre-filled with preamble and SRAM data before command execution. Additionally, for data page sizes greater then the EP2 FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary.

Definition at line 1335 of file LOW_linkDS2490.cpp.

References comCmd_usbTimeout, comm_cmdType, LOW_portUsbDevice::controlMsg(), DT_bitmask, F_bitmask, handleCommonComCmdBits(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), PS_bitmask, usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, writeSramPage_comCmdBase, and LOW_portUsbDevice::wValue_t.

void LOW_linkDS2490::commonConstructorActions  )  [private]
 

Actions common to all constructors.

Definition at line 664 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::claimInterface(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resetLinkAdapter(), usbDefaultInterface, and usbDevice.

Referenced by LOW_linkDS2490().

void LOW_linkDS2490::ctlCmd_flushCommCmds  )  [private, virtual]
 

Used to clear all unexecuted Communication commands from the command FIFO.

The DS2490 must be in a halted state before the FLUSH COMM CMDS command can be processed.

Definition at line 943 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, flushCommCmds_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

void LOW_linkDS2490::ctlCmd_flushDataRcvBuffer  )  [private, virtual]
 

Used to clear EP3 receive data FIFO (data from 1- Wire device).

The DS2490 must be in a halted state before the FLUSH DATA RCV BUFFER command can be processed.

Definition at line 954 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, flushRcvBuffer_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

void LOW_linkDS2490::ctlCmd_flushDataXmtBuffer  )  [private, virtual]
 

Used to clear EP2 transmit data FIFO (data to 1- Wire device).

The DS2490 must be in a halted state before the FLUSH DATA XMT BUFFER command can be processed.

Definition at line 965 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, flushXmtBuffer_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

void LOW_linkDS2490::ctlCmd_getCommCmds byteVec_t outBytes  )  [private, virtual]
 

Used to retrieve unexecuted Communication commands and parameters from the command FIFO.

The DS2490 must be in a halted state before the GET COMM CMDS command can be processed.

Unexecuted commands are returned over EP0 in the control transfer data phase. Host software is responsible for determining the number of command/parameter bytes to be returned and specifying the value in the wLength field of the control transfer setup packet.

Commands/parameters are deleted from the FIFO as they are transmitted to the host; the command pointer used with the FIFO is updated as values are read. Any commands/parameters that are not transferred remain in the FIFO and will be processed when command execution resumes.

If the wLength value passed is larger than the number of command/parameter bytes, the DS2490 will terminate the control transfer with a short data packet.

Definition at line 976 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, getCommCmds_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

void LOW_linkDS2490::ctlCmd_haltExecutionWhenDone  )  [private, virtual]
 

Used to halt the execution of a Communication command after the current command execution is complete.

Further Communication command processing is stopped until a RESUME EXECUTION command is received. This command, or the HALT EXECUTION WHEN IDLE command, is also used to terminate a strong pullup or programming pulse of semi-infinite or infinite duration.

Definition at line 932 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, haltExeDone_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

Referenced by programPulse(), and strongPullup().

void LOW_linkDS2490::ctlCmd_haltExecutionWhenIdle  )  [private, virtual]
 

Used to halt the execution of the current Communication command after the 1-Wire bus has returned to the idle state.

Further Communication command processing is stopped until a RESUME EXECUTION command is received. This command, or the HALT EXECUTION WHEN DONE command, is also used to terminate a strong pullup or programming pulse of semi-infinite or infinite duration.

Definition at line 921 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, haltExeIdle_ctlCmd, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), usbDevice, and vendorCmd_requestType.

void LOW_linkDS2490::ctlCmd_resetDevice  )  [private, virtual]
 

Performs a hardware reset equivalent to the power-on reset.

This includes clearing all endpoint buffers and loading the Mode control registers with their default values.

Definition at line 888 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resetDevice_ctlCmd, usbDevice, and vendorCmd_requestType.

Referenced by readDeviceStatus(), resetLinkAdapter(), and ~LOW_linkDS2490().

void LOW_linkDS2490::ctlCmd_resumeExecution  )  [private, virtual]
 

Used to resume execution of a Communication command that was halted with either of the HALT EXECUTION commands.

Definition at line 910 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resumeExe_ctlCmd, usbDevice, and vendorCmd_requestType.

Referenced by programPulse(), and strongPullup().

void LOW_linkDS2490::ctlCmd_startExecution  )  [private, virtual]
 

Starts execution of Communication commands.

This command is also required to start the execution of Communication commands with an IM (immediate execution control) bit set to logic 0.

Definition at line 899 of file LOW_linkDS2490.cpp.

References control_cmdType, LOW_portUsbDevice::controlMsg(), ctlCmd_usbTimeout, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), startExe_ctlCmd, usbDevice, and vendorCmd_requestType.

Referenced by resetBus(), searchDevices(), touchBit(), touchBlock(), and touchByte().

void LOW_linkDS2490::doSearchSequence const LOW_deviceIDRaw inBranchVector,
LOW_deviceIDRaw outFoundID,
LOW_deviceIDRaw outDiscrVec
[protected, virtual]
 

Execute a single search sequence on the bus.

A default implementation relying on bit i/o methods is provided.

Parameters:
inBranchVector ID vector to start the search sequence.
outFoundID Device ID found.
outDiscrVec Discrepancy vector after the search.

Reimplemented from LOW_link.

Definition at line 507 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, and LOW_helper_msglog::printDebug().

bool LOW_link::getAllowProgPulse  )  const [inherited]
 

Get wether the program pulse should be allowed.

Returns:
Wether the program pulse should be allowed.

Definition at line 80 of file LOW_link.cpp.

References LOW_link::allowProgPulse.

bool LOW_link::getHasExternalPower  )  const [inherited]
 

Get whether there is an external power line on the segment.

Returns:
Whether there is an external power line on the segment.

Definition at line 74 of file LOW_link.cpp.

References LOW_link::hasExternalPower.

Referenced by LOW_netSegment::LOW_netSegment().

bool LOW_link::getHasProgramPulse  )  const [inherited]
 

Get wether the adapter is capable of 12V Program pulse.

Returns:
Wether the adapter is capable of 12V Program pulse.

Definition at line 68 of file LOW_link.cpp.

References LOW_link::hasProgramPulse.

uint32_t LOW_link::getID  )  const [inherited]
 

Get ID of the link.

Returns:
ID of the link.

Definition at line 62 of file LOW_link.cpp.

References LOW_link::linkID.

virtual std::string LOW_linkDS2490::getLinkFamily  )  const [inline, virtual]
 

Get the link's family type.

Note: Subclasses must implement this method to return a clear text name of their kind.

Returns:
Family type name of the link.

Implements LOW_link.

Definition at line 99 of file LOW_linkDS2490.h.

LOW_linkDS2490::pdSlewRate_t LOW_linkDS2490::getPullDownSlewRate  )  [virtual]
 

Get the Pulldown Slew Rate Control.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 572 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::getPullDownSlewRate(), LOW_helper_msglog::linkDS2490_dl, LOW_linkFlexibleSpeed::pdSlewRate_t, PDSR_val_2_pdSlewRate(), LOW_helper_msglog::printDebug(), LOW_linkDS2490::deviceFeedback_t::pulldownSlewRate, readDeviceStatus(), and resultCodeVec_t.

LOW_linkDS2490::soW0RecTime_t LOW_linkDS2490::getSampleOffsetWrite0Rec  )  [virtual]
 

Get the Sample Offset / Write 0 Recovery time.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 634 of file LOW_linkDS2490.cpp.

References LOW_linkDS2490::deviceFeedback_t::dsow0RecTime, LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), readDeviceStatus(), resultCodeVec_t, LOW_linkFlexibleSpeed::soW0RecTime_t, and SOW0RT_val_2_soW0RecTime().

LOW_linkDS2490::wireSpeed_t LOW_linkDS2490::getWireSpeed  )  [virtual]
 

Get the 1-Wire speed mode.

Implements LOW_linkFlexibleSpeed.

Definition at line 543 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, LOW_linkDS2490::deviceFeedback_t::oneWireSpeed, OWSPEED_val_2_wireSpeed(), LOW_helper_msglog::printDebug(), readDeviceStatus(), resultCodeVec_t, and LOW_linkFlexibleSpeed::wireSpeed_t.

LOW_linkDS2490::w1LowTime_t LOW_linkDS2490::getWrite1LowTime  )  [virtual]
 

Get the Write 1 Low Time.

Current speed checking is done by provided implementation.

Note:Implementations should NOT simply return the value saved in this class, but read the actual values from the device.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 603 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::getWrite1LowTime(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), readDeviceStatus(), resultCodeVec_t, LOW_linkFlexibleSpeed::w1LowTime_t, W1LT_val_2_w1LowTime(), and LOW_linkDS2490::deviceFeedback_t::write1LowTime.

void LOW_linkDS2490::handleCommonComCmdBits LOW_portUsbDevice::wValue_t inOutValueCmd,
const resultHandling_t  inResultHandling,
const bool  inImmediateExec
[private]
 

Handle common bits of all communication commands.

Definition at line 1458 of file LOW_linkDS2490.cpp.

References ICP_bitmask, IM_bitmask, LOW_helper_msglog::linkDS2490_dl, noResult_rsltHdl, NTF_bitmask, LOW_helper_msglog::printDebug(), resultAlways_rsltHdl, and resultOnError_rsltHdl.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), comCmd_doAndRelease(), comCmd_matchAccess(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_searchAccess(), comCmd_setDuration(), comCmd_setPath(), comCmd_writeEprom(), and comCmd_writeSramPage().

void LOW_linkDS2490::modCmd_setDsoW0RecoveryTime const SOW0RT_val_t  inSOW0RT  )  [private, virtual]
 

Used to select the Data Sample Offset (tDSO) / Write-0 recovery (tW0R) time (DSO/W0R) for 1-Wire bus Flexible Speed operation.

Eight DSO/W0R times are possible. The nominal DSO/W0R time for Regular speed is 3us, for Overdrive speed the Data Sample Offset is 1us and the Write-0 Recovery Time is 3 s. The DS2490 DSO/W0R power-up default value for Flexible speed is 7us.

Definition at line 1089 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), dsow0Trec_modCmd, LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

Referenced by setSampleOffsetWrite0Rec().

void LOW_linkDS2490::modCmd_setEnablePulse const bool  inEnableStrongPullup,
const bool  inEnableProgPulse
[private, virtual]
 

Used to enable or disable a 1-Wire strong pullup pulse to 5V and/or +12V EPROM programming pulse.

Two bit positions in the parameter byte are used to control the enabled/disabled state for each pulse type. The specific pulse is enabled when the respective bit is set to a 1 and disabled when set to a 0. The DS2490 power-up default state for both strong pullup and programming pulse is disabled.

Definition at line 993 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), pulseEn_modCmd, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

Referenced by resetLinkAdapter().

void LOW_linkDS2490::modCmd_setEnableSpeedChange const bool  inEnableSpeedChange  )  [private, virtual]
 

Used to enable or disable a 1-Wire communication speed change.

Enabled when a TRUE parameter value is passed with the command, disabled with a FALSE. The DS2490 power-up default state for speed change is disabled.

Definition at line 1009 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), speedChangeEn_modCmd, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

Referenced by resetLinkAdapter().

void LOW_linkDS2490::modCmd_setOneWireSpeed const OWSPEED_val_t  inWireSpeed  )  [private, virtual]
 

Used to set the speed of 1-Wire communication; three settings are possible.

The DS2490 power-up default communication speed is regular.

Definition at line 1024 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, oneWireSpeed_modCmd, LOW_helper_msglog::printDebug(), usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

Referenced by setWireSpeed().

void LOW_linkDS2490::modCmd_setProgPulseDuration const uint8_t  inPpDurationFactor  )  [private, virtual]
 

Used to set the time duration of a 1-Wire Programming Pulse.

The time is controlled with a an unsigned 8-bit binary number between 0x00 and 0xFE specifying the duration in multiples of 8µs. A value of 0x00 stands for infinite duration. Parameter value 0xFF is reserved and will cause the device to deliver a pulse duration of <1µs. To terminate an infinite duration programming pulse use the HALT EXECUTION WHEN DONE or HALT EXECUTION WHEN IDLE command. The DS2490 power-up default strong pullup duration register value is 512µS.

Definition at line 1050 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), progPulseDuration_modCmd, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

void LOW_linkDS2490::modCmd_setPulldownSlewRate const PDSR_val_t  inPDSR  )  [private, virtual]
 

Used to select the pulldown slew rate for 1-Wire bus Flexible Speed operation.

Eight pulldown slew rates are possible. The nominal pulldown slew rate for Regular speed is 0.83V/s and for Overdrive speeds it is 15V/s. The DS2490 pulldown slew rate power-up default value for Flexible speed is 0.83V/ s.

Definition at line 1063 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), pulldownSlewRate_modCmd, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

Referenced by setPullDownSlewRate().

void LOW_linkDS2490::modCmd_setStrongPullupDuration const uint8_t  inSpuDurationFactor  )  [private, virtual]
 

Used to set the time duration of a 1-Wire strong pullup.

The time is controlled with an unsigned 8-bit binary number between 0x00 and 0xFE which specifies the duration in multiples of 16ms. A value of 0x01 specifies 16ms, 0x02 equals 32ms, etc. A value of 0x00 specifies infinite duration. Parameter value 0xFF is reserved and will cause the device to deliver a pullup duration of <1µs. To terminate an infinite duration pullup use either the HALT EXECUTION WHEN DONE or HALT EXECUTION WHEN IDLE Control commands as described in Appendix 1. The DS2490 power-up default strong pullup duration register value is 512ms.

Definition at line 1037 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), strongPuDuration_modCmd, usbDevice, vendorCmd_requestType, and LOW_portUsbDevice::wIndex_t.

void LOW_linkDS2490::modCmd_setWrite1LowTime const W1LT_val_t  inW1LT  )  [private, virtual]
 

Used to select the Write-1 low time for 1-Wire bus Flexible speed operation.

Eight Write-1 low time durations are possible. The nominal Write-1 Low Time for Regular speed is 8us, at Overdrive speed it is 1us. The DS2490 Write-1 Low Time power-up default value for Flexible speed is 12us.

Definition at line 1076 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::controlMsg(), LOW_helper_msglog::linkDS2490_dl, modCmd_usbTimeout, mode_cmdType, LOW_helper_msglog::printDebug(), usbDevice, vendorCmd_requestType, LOW_portUsbDevice::wIndex_t, and write1LowTime_modCmd.

Referenced by setWrite1LowTime().

bool LOW_link::operator== LOW_link inLink  )  const [virtual, inherited]
 

Comparison based on linkID.

Definition at line 50 of file LOW_link.cpp.

References LOW_link::linkID.

const LOW_linkDS2490::wireSpeed_t LOW_linkDS2490::OWSPEED_val_2_wireSpeed const OWSPEED_val_t  inOWSPEED_val  )  const [private, virtual]
 

Convert value of type OWSPEED_val_t to wireSpeed_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1588 of file LOW_linkDS2490.cpp.

References flexible_OWSPEED, LOW_linkFlexibleSpeed::flexible_speed, normal_OWSPEED, LOW_linkFlexibleSpeed::normal_speed, overdrive_OWSPEED, LOW_linkFlexibleSpeed::overdrive_speed, and LOW_linkFlexibleSpeed::wireSpeed_t.

Referenced by getWireSpeed().

const LOW_linkDS2490::PDSR_val_t LOW_linkDS2490::pdSlewRate_2_PDSR_val const pdSlewRate_t  inPdSlewRate_t  )  const [private, virtual]
 

Convert value of type pdSlewRate_t to PDSR_val_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1500 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::pdSlewRate_0_55, LOW_linkFlexibleSpeed::pdSlewRate_0_7, LOW_linkFlexibleSpeed::pdSlewRate_0_83, LOW_linkFlexibleSpeed::pdSlewRate_15, LOW_linkFlexibleSpeed::pdSlewRate_1_1, LOW_linkFlexibleSpeed::pdSlewRate_1_37, LOW_linkFlexibleSpeed::pdSlewRate_1_65, LOW_linkFlexibleSpeed::pdSlewRate_2_2, PDSR_0_55, PDSR_0_7, PDSR_0_83, PDSR_15, PDSR_1_1, PDSR_1_37, PDSR_1_65, PDSR_2_2, and PDSR_val_t.

Referenced by setPullDownSlewRate().

const LOW_linkDS2490::pdSlewRate_t LOW_linkDS2490::PDSR_val_2_pdSlewRate const PDSR_val_t  inPDSR_val  )  const [private, virtual]
 

Convert value of type PDSR_val_t to pdSlewRate_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1483 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::pdSlewRate_0_55, LOW_linkFlexibleSpeed::pdSlewRate_0_7, LOW_linkFlexibleSpeed::pdSlewRate_0_83, LOW_linkFlexibleSpeed::pdSlewRate_15, LOW_linkFlexibleSpeed::pdSlewRate_1_1, LOW_linkFlexibleSpeed::pdSlewRate_1_37, LOW_linkFlexibleSpeed::pdSlewRate_1_65, LOW_linkFlexibleSpeed::pdSlewRate_2_2, LOW_linkFlexibleSpeed::pdSlewRate_t, PDSR_0_55, PDSR_0_7, PDSR_0_83, PDSR_15, PDSR_1_1, PDSR_1_37, PDSR_1_65, and PDSR_2_2.

Referenced by getPullDownSlewRate().

const uint8_t LOW_linkDS2490::progPulse_2_ppFactor const progPulse_t  inPulse  )  const [private, virtual]
 

Convert value of type progPulse_t to factor of 8us.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1629 of file LOW_linkDS2490.cpp.

References LOW_link::progPulse_1024, LOW_link::progPulse_128, LOW_link::progPulse_2048, LOW_link::progPulse_256, LOW_link::progPulse_32, LOW_link::progPulse_512, and LOW_link::progPulse_64.

Referenced by programPulse().

void LOW_linkDS2490::progPulseInternal const unsigned int  inPulseFactor  )  [private]
 

Universal and internal funtion for program pulses.

Parameters:
inPullupFactor Factor of pulse length. Length will be factor times 8us.

Definition at line 852 of file LOW_linkDS2490.cpp.

References comCmd_pulse(), comCmd_setDuration(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resultAlways_rsltHdl, resultCodeVec_t, resultOnError_rsltHdl, and waitUntilIdle().

Referenced by programPulse().

void LOW_linkDS2490::programPulse const progPulse_t  inPulseTime  )  [virtual]
 

Create a 12 volt pulse on the 1-Wire net for programming EPROM devices.

For EPROM programming, only a single slave device should be connected to the 1-Wire bus and the cable must be short, not to exceed a few meters.

Note: One should not attempt generating a programming pulse with a non-EPROM device on the bus; this may damage the device as well as the link controller.

Note: Dependening on the implementation, time may only as accurate as the operating system permits (scheduling!).

Parameters:
inPulseTime Pulse time by predefined type.

Implements LOW_link.

Definition at line 489 of file LOW_linkDS2490.cpp.

References LOW_link::allowProgPulse, LOW_link::hasProgramPulse, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), progPulse_2_ppFactor(), and progPulseInternal().

void LOW_linkDS2490::programPulse const unsigned long  inMicroSecs  )  [virtual]
 

Create a 12 volt pulse on the 1-Wire net for programming EPROM devices.

For EPROM programming, only a single slave device should be connected to the 1-Wire bus and the cable must be short, not to exceed a few meters.

Note: One should not attempt generating a programming pulse with a non-EPROM device on the bus; this may damage the device as well as the link controller.

Note: Dependening on the implementation, time may only as accurate as the operating system permits (scheduling!).

Parameters:
inMicroSecs Pulse time in micro seconds.

Implements LOW_link.

Definition at line 443 of file LOW_linkDS2490.cpp.

References LOW_link::allowProgPulse, comCmd_pulse(), comCmd_setDuration(), ctlCmd_haltExecutionWhenDone(), ctlCmd_resumeExecution(), LOW_link::hasProgramPulse, LOW_helper_msglog::linkDS2490_dl, LOW_platformMisc::microSleep(), LOW_helper_msglog::printDebug(), progPulseInternal(), readDeviceStatus(), resultAlways_rsltHdl, resultCodeVec_t, and resultOnError_rsltHdl.

void LOW_link::readData byteVec_t outBytes,
const strongPullup_t  inPullup = pullUp_NONE
[virtual, inherited]
 

Receive a block of bytes from the 1-Wire net by previously sending a block of bytes of read communication to the 1-Wire Net.

Note: When the strong pullup is selected it will NOT appear after each byte sent, only after the last byte the pullup is done!

A default implementation relying on the touch methods is provided.

Parameters:
outBytes Values that were reveived. Read length is determined by the preset length of the vector.
inPullup Optional strong pullup time following each 8 bit write/read cycle.

Definition at line 130 of file LOW_link.cpp.

References byteVec_t, and LOW_link::touchBlock().

Referenced by LOW_devDS2890::cmd_ReadControlRegister(), LOW_devDS2890::cmd_ReadPosition(), LOW_netSegment::cmd_ReadROM(), LOW_devDS1820::cmd_ReadScratchpad(), LOW_devDS2406::cmd_ChannelAccess::readData(), and LOW_devDS2406::readMemUniversal().

bool LOW_link::readDataBit const strongPullup_t  inPullup = pullUp_NONE  )  [virtual, inherited]
 

Receive 1 bit from the 1-Wire net by previously sending one bit of read communication to the 1-Wire net.

A default implementation relying on the touch methods is provided.

Parameters:
inPullup Optional strong pullup time following the write/read cycle.
Returns:
Bit that was reveived.

Definition at line 114 of file LOW_link.cpp.

References LOW_link::touchBit().

Referenced by LOW_devDS1820::cmd_ConvertT(), LOW_devDS2405::cmd_MatchRead(), LOW_devDS1820::cmd_ReadPowerSupply(), LOW_devDS1820::cmd_RecallE2(), LOW_devDS2405::cmd_SearchRead(), LOW_devDS2890::cmd_WriteControlRegister(), LOW_devDS2890::cmd_WritePosition(), LOW_link::doSearchSequence(), and LOW_devDS2406::cmd_ChannelAccess::readDataBit().

uint8_t LOW_link::readDataByte const strongPullup_t  inPullup = pullUp_NONE  )  [virtual, inherited]
 

Receive 1 byte from the 1-Wire net by previously sending 8 bits of read communication to the 1-Wire net.

A default implementation relying on the touch methods is provided.

Parameters:
inPullup Optional strong pullup time following the write/read cycle.
Returns:
Byte that was reveived.

Definition at line 122 of file LOW_link.cpp.

References LOW_link::touchByte().

Referenced by LOW_devDS2406::cmd_ChannelAccess::cmd_ChannelAccess(), LOW_devDS2890::cmd_Decrement(), LOW_devDS2890::cmd_Increment(), LOW_devDS2890::cmd_WriteControlRegister(), LOW_devDS2890::cmd_WritePosition(), LOW_devDS2406::cmd_WriteStatus(), LOW_devDS2406::cmd_ChannelAccess::readDataByte(), and LOW_devDS2406::readMemUniversal().

void LOW_linkDS2490::readDeviceStatus deviceFeedback_t outDevFeedback,
resultCodeVec_t outResultCodeVec
[private]
 

Fetch device status and all available result codes.

Parameters:
outDevFeedback Device status read from the device.
outResultCodeVec All result codes which were available.

Definition at line 678 of file LOW_linkDS2490.cpp.

References LOW_linkDS2490::resultCode_t::alarmingPresencePulse, APP_bitmask, LOW_portUsbDevice::bulkRead(), CMP_bitmask, LOW_linkDS2490::deviceFeedback_t::commCmdBufferUsage, LOW_linkDS2490::resultCode_t::compareError, LOW_linkDS2490::deviceFeedback_t::compoundResults, CRC_bitmask, LOW_linkDS2490::resultCode_t::crcError, ctlCmd_resetDevice(), LOW_linkDS2490::deviceFeedback_t::currentCommCmd, LOW_linkDS2490::deviceFeedback_t::dataInBufferUsage, LOW_linkDS2490::deviceFeedback_t::dataOutBufferUsage, devDetect_code, LOW_linkDS2490::resultCode_t::deviceDetected, LOW_linkDS2490::deviceFeedback_t::deviceExternalPowered, LOW_linkDS2490::deviceFeedback_t::deviceHalted, LOW_linkDS2490::deviceFeedback_t::deviceIdle, LOW_linkDS2490::deviceFeedback_t::dsow0RecTime, EOS_bitmask, EP0F_bitmask, LOW_linkDS2490::deviceFeedback_t::ep0FifoOverflowError, HALT_bitmask, IDLE_bitmask, LOW_linkDS2490::deviceFeedback_t::isDynSpeedChangeEnabled, LOW_linkDS2490::deviceFeedback_t::isProgPulseEnabled, LOW_linkDS2490::deviceFeedback_t::isStrongPullupEnabled, LOW_helper_msglog::linkDS2490_dl, LOW_linkDS2490::resultCode_t::noPresencePulse, NRS_bitmask, LOW_linkDS2490::deviceFeedback_t::oneWireSpeed, LOW_linkDS2490::resultCode_t::pageIsRedirected, PMOD_bitmask, PRGA_bitmask, PRGE_bitmask, LOW_helper_msglog::printDebug(), LOW_linkDS2490::deviceFeedback_t::progPulseCurrentActive, LOW_linkDS2490::deviceFeedback_t::progPulseDurationFactor, LOW_linkDS2490::resultCode_t::progVoltageMissingOnBus, LOW_linkDS2490::deviceFeedback_t::progVoltagePresent, LOW_linkDS2490::deviceFeedback_t::pulldownSlewRate, RDP_bitmask, LOW_linkDS2490::deviceFeedback_t::resultCount, LOW_linkDS2490::resultCode_t::searchAccessDeviceUnderrun, SH_bitmask, LOW_linkDS2490::resultCode_t::shortToGround, SPCE_bitmask, SPUA_bitmask, SPUE_bitmask, LOW_linkDS2490::deviceFeedback_t::strongPullupCurrentActive, LOW_linkDS2490::deviceFeedback_t::strongPullupDurationFactor, usbDevice, usbStatusInEP, VP12_bitmask, VPP_bitmask, and LOW_linkDS2490::deviceFeedback_t::write1LowTime.

Referenced by getPullDownSlewRate(), getSampleOffsetWrite0Rec(), getWireSpeed(), getWrite1LowTime(), programPulse(), resetLinkAdapter(), strongPullup(), and waitUntilIdle().

bool LOW_linkDS2490::resetBus  )  [virtual]
 

Todo:
Check if and how "alarming presence pulse" response works.

Implements LOW_link.

Definition at line 339 of file LOW_linkDS2490.cpp.

References comCmd_oneWireReset(), ctlCmd_startExecution(), LOW_helper_msglog::linkDS2490_dl, normal_OWSPEED, LOW_helper_msglog::printDebug(), resultAlways_rsltHdl, resultCodeVec_t, and waitUntilIdle().

Referenced by searchDevices().

void LOW_linkDS2490::resetLinkAdapter  )  [virtual]
 

Reset the adapter.

Note: This does not necessarily include a reset on the 1-Wire net. Whether this is done or net is left to the concrete implementation.

Implements LOW_link.

Definition at line 310 of file LOW_linkDS2490.cpp.

References LOW_link::allowProgPulse, ctlCmd_resetDevice(), LOW_linkFlexibleSpeed::flexible_speed, LOW_link::hasProgramPulse, LOW_helper_msglog::linkDS2490_dl, modCmd_setEnablePulse(), modCmd_setEnableSpeedChange(), LOW_linkFlexibleSpeed::pdSlewRate, LOW_helper_msglog::printDebug(), LOW_linkDS2490::deviceFeedback_t::progVoltagePresent, readDeviceStatus(), resultCodeVec_t, setPullDownSlewRate(), setSampleOffsetWrite0Rec(), setWireSpeed(), setWrite1LowTime(), LOW_linkFlexibleSpeed::soW0RecTime, LOW_linkFlexibleSpeed::w1LowTime, and LOW_linkFlexibleSpeed::wireSpeed.

Referenced by commonConstructorActions().

LOW_deviceID::deviceIDVec_t LOW_linkDS2490::searchDevices const bool  inOnlyAlarm,
const LOW_deviceIDRaw  inPreload,
const LOW_deviceIDRaw::devFamCode_t  inFamCode,
const bool  inDoReset
[virtual]
 

Execute a complete search sequence from preloaded ID vector.

Search is executed on the currently active bus configuration. No branch selection is done in advance.

A default implementation relying on the doSearchSequence() method is provided.

Parameters:
inOnlyAlarm Select normal search or alarmin only search.
inPreload The ID vector to start the search from.
inFamCode Narrow search to given family code. To not narrow use LOW_device::anyDev_famCode.
Returns:
List of devices found on the currently active bus configuration.

Reimplemented from LOW_link.

Definition at line 220 of file LOW_linkDS2490.cpp.

References LOW_device::anyDev_famCode, LOW_portUsbDevice::bulkRead(), LOW_portUsbDevice::bulkWrite(), comCmd_searchAccess(), ctlCmd_startExecution(), LOW_linkDS2490::deviceFeedback_t::dataInBufferUsage, LOW_deviceID::deviceIDVec_t, LOW_deviceIDRaw::devRomID_t, LOW_deviceIDRaw::getFamilyCode(), LOW_deviceIDRaw::getRomIDVec(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resetBus(), resultAlways_rsltHdl, resultCodeVec_t, LOW_device::SearchAlarmROM_COMMAND, LOW_device::SearchROM_COMMAND, LOW_deviceIDRaw::setFamilyCode(), usbDataInEP, usbDataInEP_FIFOsize, usbDataOutEP, usbDevice, and waitUntilIdle().

void LOW_linkDS2490::setPullDownSlewRate const pdSlewRate_t  inPDSR  )  [virtual]
 

Set the Pulldown Slew Rate Control.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 558 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, modCmd_setPulldownSlewRate(), pdSlewRate_2_PDSR_val(), LOW_helper_msglog::printDebug(), and LOW_linkFlexibleSpeed::setPullDownSlewRate().

Referenced by resetLinkAdapter(), and setWireSpeed().

void LOW_linkDS2490::setSampleOffsetWrite0Rec const soW0RecTime_t  inSOW0RT  )  [virtual]
 

Set the Sample Offset / Write 0 Recovery time.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 620 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, modCmd_setDsoW0RecoveryTime(), LOW_helper_msglog::printDebug(), LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), and soW0RecTime_2_SOW0RT_val().

Referenced by resetLinkAdapter(), and setWireSpeed().

void LOW_linkDS2490::setWireSpeed const wireSpeed_t  inWireSpeed  )  [virtual]
 

Set the 1-Wire speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 522 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::flexible_speed, LOW_helper_msglog::linkDS2490_dl, modCmd_setOneWireSpeed(), LOW_linkFlexibleSpeed::pdSlewRate, LOW_helper_msglog::printDebug(), setPullDownSlewRate(), setSampleOffsetWrite0Rec(), LOW_linkFlexibleSpeed::setWireSpeed(), setWrite1LowTime(), LOW_linkFlexibleSpeed::soW0RecTime, LOW_linkFlexibleSpeed::w1LowTime, LOW_linkFlexibleSpeed::wireSpeed, and wireSpeed_2_OWSPEED_val().

Referenced by resetLinkAdapter().

void LOW_linkDS2490::setWrite1LowTime const w1LowTime_t  inW1LT  )  [virtual]
 

Set the Write 1 Low Time.

Current speed checking and remembering the value is done by provided implementation.

Exceptions:
incompatibleSpeed_error Thrown when not in flexible speed mode.

Reimplemented from LOW_linkFlexibleSpeed.

Definition at line 589 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, modCmd_setWrite1LowTime(), LOW_helper_msglog::printDebug(), LOW_linkFlexibleSpeed::setWrite1LowTime(), and w1LowTime_2_W1LT_val().

Referenced by resetLinkAdapter(), and setWireSpeed().

const LOW_linkDS2490::SOW0RT_val_t LOW_linkDS2490::soW0RecTime_2_SOW0RT_val const soW0RecTime_t  inSoW0RecTime  )  const [private, virtual]
 

Convert value of type soW0RecTime_t to SOW0RT_val_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1570 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::soW0RecTime_10, LOW_linkFlexibleSpeed::soW0RecTime_3, LOW_linkFlexibleSpeed::soW0RecTime_4, LOW_linkFlexibleSpeed::soW0RecTime_5, LOW_linkFlexibleSpeed::soW0RecTime_6, LOW_linkFlexibleSpeed::soW0RecTime_7, LOW_linkFlexibleSpeed::soW0RecTime_8, LOW_linkFlexibleSpeed::soW0RecTime_9, SOW0RT_10, SOW0RT_3, SOW0RT_4, SOW0RT_5, SOW0RT_6, SOW0RT_7, SOW0RT_8, SOW0RT_9, and SOW0RT_val_t.

Referenced by setSampleOffsetWrite0Rec().

const LOW_linkDS2490::soW0RecTime_t LOW_linkDS2490::SOW0RT_val_2_soW0RecTime const SOW0RT_val_t  inSOW0RT_val  )  const [private, virtual]
 

Convert value of type SOW0RT_val_t to soW0RecTime_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1553 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::soW0RecTime_10, LOW_linkFlexibleSpeed::soW0RecTime_3, LOW_linkFlexibleSpeed::soW0RecTime_4, LOW_linkFlexibleSpeed::soW0RecTime_5, LOW_linkFlexibleSpeed::soW0RecTime_6, LOW_linkFlexibleSpeed::soW0RecTime_7, LOW_linkFlexibleSpeed::soW0RecTime_8, LOW_linkFlexibleSpeed::soW0RecTime_9, LOW_linkFlexibleSpeed::soW0RecTime_t, SOW0RT_10, SOW0RT_3, SOW0RT_4, SOW0RT_5, SOW0RT_6, SOW0RT_7, SOW0RT_8, and SOW0RT_9.

Referenced by getSampleOffsetWrite0Rec().

void LOW_linkDS2490::strongPullup const strongPullup_t  inPullupTime  )  [virtual]
 

Set the 1-Wire net line level to strong pullup for a specified time.

Note: Dependening on the implementation, time may only as accurate as the operating system permits (scheduling!).

Parameters:
inPullupTime Pullup time by predefined type.

Implements LOW_link.

Definition at line 431 of file LOW_linkDS2490.cpp.

References LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), strongPullup_2_spFactor(), and strongPullupInternal().

void LOW_linkDS2490::strongPullup const unsigned long  inMicroSecs  )  [virtual]
 

Set the 1-Wire net line level to strong pullup for a specified time.

Note: Dependening on the implementation, time may only as accurate as the operating system permits (scheduling!).

Parameters:
inMicroSecs Pullup time in micro seconds.

Implements LOW_link.

Definition at line 394 of file LOW_linkDS2490.cpp.

References comCmd_pulse(), comCmd_setDuration(), ctlCmd_haltExecutionWhenDone(), ctlCmd_resumeExecution(), LOW_helper_msglog::linkDS2490_dl, LOW_platformMisc::milliSleep(), LOW_helper_msglog::printDebug(), readDeviceStatus(), resultCodeVec_t, resultOnError_rsltHdl, and strongPullupInternal().

const uint8_t LOW_linkDS2490::strongPullup_2_spFactor const strongPullup_t  inPullup  )  const [private, virtual]
 

Convert value of type strongPullup_t to factor of 16ms.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1613 of file LOW_linkDS2490.cpp.

References LOW_link::pullUp_1048, LOW_link::pullUp_131, LOW_link::pullUp_16_4, LOW_link::pullUp_262, LOW_link::pullUp_524, and LOW_link::pullUp_65_5.

Referenced by strongPullup(), touchBit(), touchBlock(), and touchByte().

void LOW_linkDS2490::strongPullupInternal const unsigned int  inPullupFactor  )  [private]
 

Universal and internal funtion for single strong pullups.

Parameters:
inPullupFactor Factor of pulse length. Length will be factor times 16ms.

Definition at line 825 of file LOW_linkDS2490.cpp.

References comCmd_pulse(), comCmd_setDuration(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), resultCodeVec_t, resultOnError_rsltHdl, and waitUntilIdle().

Referenced by strongPullup().

bool LOW_linkDS2490::touchBit const bool  inSendBit,
const strongPullup_t  inPullup = pullUp_NONE
[virtual]
 

Send 1 bit of communication to the 1-Wire net and return the result 1 bit read from the 1-Wire net.

Parameters:
inSendBit Bit to send.
inPullup Optional strong pullup time following the write/read cycle.
Returns:
Bit that was reveived.

Implements LOW_link.

Definition at line 61 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::bulkRead(), comCmd_bitIO(), comCmd_setDuration(), ctlCmd_startExecution(), LOW_linkDS2490::deviceFeedback_t::dataInBufferUsage, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), LOW_link::pullUp_NONE, resultCodeVec_t, resultOnError_rsltHdl, strongPullup_2_spFactor(), usbDataInEP, usbDevice, and waitUntilIdle().

byteVec_t LOW_linkDS2490::touchBlock const byteVec_t inBytes,
const strongPullup_t  inPullup = pullUp_NONE
[virtual]
 

Send block of communication to the 1-Wire net and return the resulting bytes read from the 1-Wire net.

A default implementation relying on the touchByte() method is provided.

Note: When the strong pullup is selected it will NOT appear after each byte sent, only after the last byte the pullup is done!

Parameters:
inBytes Byte block to send.
inPullup Optional strong pullup time following each 8 bit write/read cycle.
Returns:
Byte block that was reveived. Length is equal to number of sent bytes.

Reimplemented from LOW_link.

Definition at line 138 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::bulkRead(), LOW_portUsbDevice::bulkWrite(), byteVec_t, comCmd_blockIO(), comCmd_setDuration(), ctlCmd_startExecution(), LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), LOW_link::pullUp_NONE, resultCodeVec_t, resultOnError_rsltHdl, strongPullup_2_spFactor(), touchByte(), usbDataInEP, usbDataInEP_FIFOsize, usbDataOutEP, usbDataOutEP_FIFOsize, usbDevice, and waitUntilIdle().

uint8_t LOW_linkDS2490::touchByte const uint8_t  inSendByte,
const strongPullup_t  inPullup = pullUp_NONE
[virtual]
 

Send 8 bits of communication to the 1-Wire net and return the result 8 bits read from the 1-Wire net.

Parameters:
inSendByte Byte to send.
inPullup Optional strong pullup time following the 8 bit write/read cycle.
Returns:
Byte that was reveived.

Implements LOW_link.

Definition at line 100 of file LOW_linkDS2490.cpp.

References LOW_portUsbDevice::bulkRead(), comCmd_byteIO(), comCmd_setDuration(), ctlCmd_startExecution(), LOW_linkDS2490::deviceFeedback_t::dataInBufferUsage, LOW_helper_msglog::linkDS2490_dl, LOW_helper_msglog::printDebug(), LOW_link::pullUp_NONE, resultCodeVec_t, resultOnError_rsltHdl, strongPullup_2_spFactor(), usbDataInEP, usbDevice, and waitUntilIdle().

Referenced by touchBlock().

const LOW_linkDS2490::W1LT_val_t LOW_linkDS2490::w1LowTime_2_W1LT_val const w1LowTime_t  inW1LowTime  )  const [private, virtual]
 

Convert value of type w1LowTime_t to W1LT_val_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1535 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::w1LowTime_10, LOW_linkFlexibleSpeed::w1LowTime_11, LOW_linkFlexibleSpeed::w1LowTime_12, LOW_linkFlexibleSpeed::w1LowTime_13, LOW_linkFlexibleSpeed::w1LowTime_14, LOW_linkFlexibleSpeed::w1LowTime_15, LOW_linkFlexibleSpeed::w1LowTime_8, LOW_linkFlexibleSpeed::w1LowTime_9, W1LT_10, W1LT_11, W1LT_12, W1LT_13, W1LT_14, W1LT_15, W1LT_8, W1LT_9, and W1LT_val_t.

Referenced by setWrite1LowTime().

const LOW_linkDS2490::w1LowTime_t LOW_linkDS2490::W1LT_val_2_w1LowTime const W1LT_val_t  inW1LT_val  )  const [private, virtual]
 

Convert value of type W1LT_val_t to w1LowTime_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1518 of file LOW_linkDS2490.cpp.

References LOW_linkFlexibleSpeed::w1LowTime_10, LOW_linkFlexibleSpeed::w1LowTime_11, LOW_linkFlexibleSpeed::w1LowTime_12, LOW_linkFlexibleSpeed::w1LowTime_13, LOW_linkFlexibleSpeed::w1LowTime_14, LOW_linkFlexibleSpeed::w1LowTime_15, LOW_linkFlexibleSpeed::w1LowTime_8, LOW_linkFlexibleSpeed::w1LowTime_9, LOW_linkFlexibleSpeed::w1LowTime_t, W1LT_10, W1LT_11, W1LT_12, W1LT_13, W1LT_14, W1LT_15, W1LT_8, and W1LT_9.

Referenced by getWrite1LowTime().

void LOW_linkDS2490::waitUntilIdle deviceFeedback_t outDeviceFeedback,
resultCodeVec_t outResultCodeVec,
const LOW_portUsbDevice::usbTimeout_t  inTimeout
[private]
 

Periodically poll the device status until the it's status is idle.

Parameters:
outDeviceFeedback Feedback status of the last poll.
outResultCodeVec All result codes being available during polling.
inTimeout Maximum time to wait for the device to become idle.

Definition at line 787 of file LOW_linkDS2490.cpp.

References LOW_linkDS2490::resultCode_t::alarmingPresencePulse, LOW_linkDS2490::deviceFeedback_t::commCmdBufferUsage, LOW_linkDS2490::resultCode_t::compareError, LOW_linkDS2490::deviceFeedback_t::compoundResults, LOW_linkDS2490::resultCode_t::crcError, LOW_linkDS2490::resultCode_t::deviceDetected, LOW_linkDS2490::deviceFeedback_t::deviceIdle, LOW_helper_msglog::linkDS2490_dl, LOW_platformMisc::milliSleep(), LOW_linkDS2490::resultCode_t::noPresencePulse, LOW_linkDS2490::resultCode_t::pageIsRedirected, LOW_helper_msglog::printDebug(), LOW_linkDS2490::resultCode_t::progVoltageMissingOnBus, readDeviceStatus(), LOW_linkDS2490::resultCode_t::searchAccessDeviceUnderrun, and LOW_linkDS2490::resultCode_t::shortToGround.

Referenced by progPulseInternal(), resetBus(), searchDevices(), strongPullupInternal(), touchBit(), touchBlock(), and touchByte().

const LOW_linkDS2490::OWSPEED_val_t LOW_linkDS2490::wireSpeed_2_OWSPEED_val const wireSpeed_t  inWireSpeed  )  const [private, virtual]
 

Convert value of type wireSpeed_t to OWSPEED_val_t.

Exceptions:
internal_error Thrown when conversion not possible (should not happen).

Definition at line 1600 of file LOW_linkDS2490.cpp.

References flexible_OWSPEED, LOW_linkFlexibleSpeed::flexible_speed, normal_OWSPEED, LOW_linkFlexibleSpeed::normal_speed, overdrive_OWSPEED, LOW_linkFlexibleSpeed::overdrive_speed, and OWSPEED_val_t.

Referenced by setWireSpeed().

void LOW_link::writeData const byteVec_t inSendBytes,
const strongPullup_t  inPullup = pullUp_NONE
[virtual, inherited]
 

Send block of bytes to the 1-Wire net and verify that the bytes block read from the 1-Wire net are the same (bus write operation).

A default implementation relying on the touch methods is provided.

Note: When the strong pullup is selected it will NOT appear after each byte sent, only after the last byte the pullup is done!

Parameters:
inSendBytes Block of bytes to send.
inPullup Optional strong pullup time following each 8 bit write/read cycle.

Definition at line 166 of file LOW_link.cpp.

References byteVec_t, and LOW_link::touchBlock().

void LOW_link::writeData const uint8_t  inSendByte,
const strongPullup_t  inPullup = pullUp_NONE
[virtual, inherited]
 

Send 1 byte to the 1-Wire net and verify that the byte read from the 1-Wire net is the same (bus write operation).

A default implementation relying on the touch methods is provided.

Parameters:
inSendByte Byte to send.
inPullup Optional strong pullup time following the write/read cycle.

Definition at line 157 of file LOW_link.cpp.

References LOW_link::touchByte().

void LOW_link::writeData const bool  inSendBit,
const strongPullup_t  inPullup = pullUp_NONE
[virtual, inherited]
 

Send 1 bit to the 1-Wire net and verify that the bit read from the 1-Wire net is the same (bus write operation).

A default implementation relying on the touch methods is provided.

Parameters:
inSendBit Bit to send.
inPullup Optional strong pullup time following the write/read cycle.

Definition at line 148 of file LOW_link.cpp.

References LOW_link::touchBit().

Referenced by LOW_devDS2406::cmd_ChannelAccess::cmd_ChannelAccess(), LOW_devDS1820::cmd_ConvertT(), LOW_devDS1820::cmd_CopyScratchpad(), LOW_devDS2890::cmd_Decrement(), LOW_devDS2890::cmd_Increment(), LOW_netSegment::cmd_MatchROM(), LOW_devDS2890::cmd_ReadControlRegister(), LOW_devDS2890::cmd_ReadPosition(), LOW_devDS1820::cmd_ReadPowerSupply(), LOW_netSegment::cmd_ReadROM(), LOW_devDS1820::cmd_ReadScratchpad(), LOW_devDS1820::cmd_RecallE2(), LOW_netSegment::cmd_SkipROM(), LOW_devDS2890::cmd_WriteControlRegister(), LOW_devDS2890::cmd_WritePosition(), LOW_devDS1820::cmd_WriteScratchpad(), LOW_devDS2406::cmd_WriteStatus(), LOW_link::doSearchSequence(), LOW_devDS2406::readMemUniversal(), LOW_link::searchDevices(), and LOW_devDS2406::cmd_ChannelAccess::writeData().


Member Data Documentation

const bool LOW_link::allowProgPulse [protected, inherited]
 

Wether the program pulse should be allowed.

Definition at line 460 of file LOW_link.h.

Referenced by LOW_link::getAllowProgPulse(), LOW_linkPassiveSerial::programPulse(), programPulse(), LOW_linkDS2480B::programPulse(), and resetLinkAdapter().

const uint8_t LOW_linkDS2490::APP_bitmask = 0x04 [static, private]
 

APP A value of 1 indicates that a 1-WIRE RESET revealed an Alarming Presence Pulse.

Definition at line 469 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::bitIO_comCmdBase = 0x0020 [static, private]
 

Communication command.

Definition at line 274 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::blockIO_comCmdBase = 0x0074 [static, private]
 

Communication command.

Definition at line 276 of file LOW_linkDS2490.h.

Referenced by comCmd_blockIO().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::byteIO_comCmdBase = 0x0052 [static, private]
 

Communication command.

Definition at line 275 of file LOW_linkDS2490.h.

Referenced by comCmd_byteIO().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::CH_bitmask = 0x0008 [static, private]
 

CH = 1 follows the chain if the page is redirected.

CH = 0 stops reading if the page is redirected.

Definition at line 371 of file LOW_linkDS2490.h.

Referenced by comCmd_readRedirectPageCrc().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::CIB_bitmask = 0x4000 [static, private]
 

CIB = 1 prevents a strong pullup to 5V if SPU = 1 and the bit read back from the 1- Wire bus is 1.

CIB = 0 generally enables the strong pullup to 5V.

Definition at line 301 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO().

const uint8_t LOW_linkDS2490::CMP_bitmask = 0x10 [static, private]
 

CMP A value of 1 indicates an error with one of the following: Error when reading the confirmation byte with a SET PATH command.

The WRITE EPROM command did not program successfully. There was a difference between the byte written and then read back with a BYTE I/O command

Definition at line 458 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::usbTimeout_t LOW_linkDS2490::comCmd_usbTimeout = 1000 [static, private]
 

Timeout in ms for communicaton commands.

Definition at line 177 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), comCmd_doAndRelease(), comCmd_matchAccess(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_readStraight(), comCmd_searchAccess(), comCmd_setDuration(), comCmd_setPath(), comCmd_writeEprom(), and comCmd_writeSramPage().

const LOW_portUsbDevice::bRequest_t LOW_linkDS2490::comm_cmdType = 0x01 [static, private]
 

Definition at line 239 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), comCmd_doAndRelease(), comCmd_matchAccess(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_readStraight(), comCmd_searchAccess(), comCmd_setDuration(), comCmd_setPath(), comCmd_writeEprom(), and comCmd_writeSramPage().

const LOW_portUsbDevice::bRequest_t LOW_linkDS2490::control_cmdType = 0x00 [static, private]
 

Definition at line 238 of file LOW_linkDS2490.h.

Referenced by ctlCmd_flushCommCmds(), ctlCmd_flushDataRcvBuffer(), ctlCmd_flushDataXmtBuffer(), ctlCmd_getCommCmds(), ctlCmd_haltExecutionWhenDone(), ctlCmd_haltExecutionWhenIdle(), ctlCmd_resetDevice(), ctlCmd_resumeExecution(), and ctlCmd_startExecution().

const uint8_t LOW_linkDS2490::CRC_bitmask = 0x20 [static, private]
 

CRC A value of 1 indicates that a CRC error occurred when executing one of the following commands: WRITE SRAM PAGE, WRITE EPROM, READ CRC PROT PAGE, or READ REDIRECT PAGE W/CRC.

Definition at line 452 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::usbTimeout_t LOW_linkDS2490::ctlCmd_usbTimeout = 1000 [static, private]
 

Timeout in ms for control commands.

Definition at line 175 of file LOW_linkDS2490.h.

Referenced by ctlCmd_flushCommCmds(), ctlCmd_flushDataRcvBuffer(), ctlCmd_flushDataXmtBuffer(), ctlCmd_getCommCmds(), ctlCmd_haltExecutionWhenDone(), ctlCmd_haltExecutionWhenIdle(), ctlCmd_resetDevice(), ctlCmd_resumeExecution(), and ctlCmd_startExecution().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::D_bitmask = 0x0008 [static, private]
 

D Data bit value to be written to the 1-Wire bus.

Definition at line 375 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO().

const uint8_t LOW_linkDS2490::devDetect_code = 0xa5 [static, private]
 

1-Wire Device Detect Byte

Definition at line 438 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::doAndRelease_comCmdBase = 0x6092 [static, private]
 

Communication command.

Definition at line 279 of file LOW_linkDS2490.h.

Referenced by comCmd_doAndRelease().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::dsow0Trec_modCmd = 0x0007 [static, private]
 

Mode command.

Definition at line 266 of file LOW_linkDS2490.h.

Referenced by modCmd_setDsoW0RecoveryTime().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::DT_bitmask = 0x2000 [static, private]
 

DT = 1 activates/selects the CRC16 generator.

DT = 0 specifies no CRC.

Definition at line 316 of file LOW_linkDS2490.h.

Referenced by comCmd_readCrcProtPage(), comCmd_writeEprom(), and comCmd_writeSramPage().

const uint8_t LOW_linkDS2490::EOS_bitmask = 0x80 [static, private]
 

EOS A value of 1 indicates that a SEARCH ACCESS with SM = 1 ended sooner than expected reporting less ROM ID s than specified in the number of devices parameter.

Definition at line 443 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const uint8_t LOW_linkDS2490::EP0F_bitmask = 0x80 [static, private]
 

EPOF Endpoint 0 FIFO status, see Note 1.

Definition at line 429 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::F_bitmask = 0x0800 [static, private]
 

F = 1 clears the buffers in case an error occurred during the execution of the previous command; requires that ICP = 0 in the previous command.

F = 0 prevents the buffers from being cleared.

Definition at line 327 of file LOW_linkDS2490.h.

Referenced by comCmd_doAndRelease(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_searchAccess(), comCmd_setPath(), comCmd_writeEprom(), and comCmd_writeSramPage().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::flushCommCmds_ctlCmd = 0x0007 [static, private]
 

Control command.

Definition at line 251 of file LOW_linkDS2490.h.

Referenced by ctlCmd_flushCommCmds().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::flushRcvBuffer_ctlCmd = 0x0008 [static, private]
 

Control command.

Definition at line 252 of file LOW_linkDS2490.h.

Referenced by ctlCmd_flushDataRcvBuffer().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::flushXmtBuffer_ctlCmd = 0x0009 [static, private]
 

Control command.

Definition at line 253 of file LOW_linkDS2490.h.

Referenced by ctlCmd_flushDataXmtBuffer().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::getCommCmds_ctlCmd = 0x000A [static, private]
 

Control command.

Definition at line 254 of file LOW_linkDS2490.h.

Referenced by ctlCmd_getCommCmds().

const uint8_t LOW_linkDS2490::HALT_bitmask = 0x10 [static, private]
 

HALT if set to 1, the DS2490 is currently halted, if set to 0, the device is not halted.

Definition at line 423 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::haltExeDone_ctlCmd = 0x0004 [static, private]
 

Control command.

Definition at line 250 of file LOW_linkDS2490.h.

Referenced by ctlCmd_haltExecutionWhenDone().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::haltExeIdle_ctlCmd = 0x0003 [static, private]
 

Control command.

Definition at line 249 of file LOW_linkDS2490.h.

Referenced by ctlCmd_haltExecutionWhenIdle().

const bool LOW_link::hasExternalPower [protected, inherited]
 

Wether the attached bus supplies external power.

Definition at line 459 of file LOW_link.h.

Referenced by LOW_link::getHasExternalPower().

bool LOW_link::hasProgramPulse [protected, inherited]
 

Wether the adapter is capable of 12V Program pulse.

Definition at line 458 of file LOW_link.h.

Referenced by LOW_link::getHasProgramPulse(), LOW_linkPassiveSerial::programPulse(), programPulse(), LOW_linkDS2480B::programPulse(), LOW_linkDS2480B::resetBus(), and resetLinkAdapter().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::ICP_bitmask = 0x0200 [static, private]
 

ICP = 1 indicates that the command is not the last one of a macro; as a consequence command processing result feedback messages are suppressed.

ICP = 0 indicates that the command is the last one of a macro or single command operation; enables command processing result feedback signaling.

Definition at line 341 of file LOW_linkDS2490.h.

Referenced by handleCommonComCmdBits().

const uint8_t LOW_linkDS2490::IDLE_bitmask = 0x20 [static, private]
 

IDLE if set to 1, the DS2490 is currently idle, if set to 0, the device is not idle.

Definition at line 426 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::IM_bitmask = 0x0001 [static, private]
 

IM = 1 enables immediate execution of the command.

Assumes that all 1-Wire device data required by the command has been received at EP2. IM = 0 prevents immediate execution of the command; execution must be started through a control function command.

Definition at line 387 of file LOW_linkDS2490.h.

Referenced by handleCommonComCmdBits().

const linkID_t LOW_link::linkID [protected, inherited]
 

Individual ID of the link adapter.

Definition at line 457 of file LOW_link.h.

Referenced by LOW_link::getID(), and LOW_link::operator==().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::matchAccess_comCmdBase = 0x0064 [static, private]
 

Communication command.

Definition at line 277 of file LOW_linkDS2490.h.

Referenced by comCmd_matchAccess().

const LOW_portUsbDevice::usbTimeout_t LOW_linkDS2490::modCmd_usbTimeout = 1000 [static, private]
 

Timeout in ms for mode commands.

Definition at line 176 of file LOW_linkDS2490.h.

Referenced by modCmd_setDsoW0RecoveryTime(), modCmd_setEnablePulse(), modCmd_setEnableSpeedChange(), modCmd_setOneWireSpeed(), modCmd_setProgPulseDuration(), modCmd_setPulldownSlewRate(), modCmd_setStrongPullupDuration(), and modCmd_setWrite1LowTime().

const LOW_portUsbDevice::bRequest_t LOW_linkDS2490::mode_cmdType = 0x02 [static, private]
 

Definition at line 240 of file LOW_linkDS2490.h.

Referenced by modCmd_setDsoW0RecoveryTime(), modCmd_setEnablePulse(), modCmd_setEnableSpeedChange(), modCmd_setOneWireSpeed(), modCmd_setProgPulseDuration(), modCmd_setPulldownSlewRate(), modCmd_setStrongPullupDuration(), and modCmd_setWrite1LowTime().

const uint8_t LOW_linkDS2490::NRS_bitmask = 0x01 [static, private]
 

NRS A value of 1 indicates an error with one of the following: 1-WIRE RESET did not reveal a Presence Pulse.

SET PATH command did not get a Presence Pulse from the branch that was to be connected. No response from one or more ROM ID bits during a SEARCH ACCESS command.

Definition at line 480 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::NTF_bitmask = 0x0400 [static, private]
 

NTF = 1 always generate communication command processing result feedback if ICP = 0 NTF = 0 generate communication command processing result feedback only if an error occurs and ICP = 0.

If ICP = 1 command result feedback is suppressed for either case, see the ICP bit above.

Definition at line 334 of file LOW_linkDS2490.h.

Referenced by handleCommonComCmdBits().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::oneWireReset_comCmdBase = 0x0042 [static, private]
 

Communication command.

Definition at line 273 of file LOW_linkDS2490.h.

Referenced by comCmd_oneWireReset().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::oneWireSpeed_modCmd = 0x0002 [static, private]
 

Mode command.

Definition at line 261 of file LOW_linkDS2490.h.

Referenced by modCmd_setOneWireSpeed().

pdSlewRate_t LOW_linkFlexibleSpeed::pdSlewRate [protected, inherited]
 

Saved value of pulldown slew rate.

Definition at line 187 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkFlexibleSpeed::setPullDownSlewRate(), and setWireSpeed().

const uint8_t LOW_linkDS2490::PMOD_bitmask = 0x08 [static, private]
 

PMOD if set to 1, the DS2490 is powered from USB and external sources, if set to 0, all DS2490 power is provided from USB.

Definition at line 420 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const uint8_t LOW_linkDS2490::PRGA_bitmask = 0x02 [static, private]
 

PRGA if set to 1, a 12V programming pulse is currently being generated, if set to 0, it is not.

Definition at line 413 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const uint8_t LOW_linkDS2490::PRGE_bitmask = 0x02 [static, private]
 

PRGE If set to 1, a 12V programming pulse is enabled, if set to 0, it is disabled.

Definition at line 398 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::progPulseDuration_modCmd = 0x0005 [static, private]
 

Mode command.

Definition at line 264 of file LOW_linkDS2490.h.

Referenced by modCmd_setProgPulseDuration().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::PS_bitmask = 0x4000 [static, private]
 

PS = 1 reduces the preamble size to 2 bytes (rather than 3).

PS = 0 sets preamble size to 3 bytes.

Definition at line 311 of file LOW_linkDS2490.h.

Referenced by comCmd_readCrcProtPage(), and comCmd_writeSramPage().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::PST_bitmask = 0x4000 [static, private]
 

PST = 1 continuously generate 1-Wire Reset sequences until a presence pulse is discovered.

PST = 0 generate only one 1-Wire Reset sequence.

Definition at line 306 of file LOW_linkDS2490.h.

Referenced by comCmd_oneWireReset().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::pulldownSlewRate_modCmd = 0x0004 [static, private]
 

Mode command.

Definition at line 263 of file LOW_linkDS2490.h.

Referenced by modCmd_setPulldownSlewRate().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::pulse_comCmdBase = 0x0030 [static, private]
 

Communication command.

Definition at line 272 of file LOW_linkDS2490.h.

Referenced by comCmd_pulse().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::pulseEn_modCmd = 0x0000 [static, private]
 

Mode command.

Definition at line 259 of file LOW_linkDS2490.h.

Referenced by modCmd_setEnablePulse().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::R_bitmask = 0x0008 [static, private]
 

R = 1 performs a read function.

R = 0 performs a write function.

Definition at line 356 of file LOW_linkDS2490.h.

Referenced by comCmd_doAndRelease().

const uint8_t LOW_linkDS2490::RDP_bitmask = 0x40 [static, private]
 

RDP A value of 1 indicates that a READ REDIRECT PAGE WITH/CRC encountered a page that is redirected.

Definition at line 447 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::readCrcProtPage_comCmdBase = 0x00d4 [static, private]
 

Communication command.

Definition at line 283 of file LOW_linkDS2490.h.

Referenced by comCmd_readCrcProtPage().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::readRedirectPageCrc_comCmdBase = 0x21e4 [static, private]
 

Communication command.

Definition at line 284 of file LOW_linkDS2490.h.

Referenced by comCmd_readRedirectPageCrc().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::readStraight_comCmdBase = 0x0080 [static, private]
 

Communication command.

Definition at line 278 of file LOW_linkDS2490.h.

Referenced by comCmd_readStraight().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::resetDevice_ctlCmd = 0x0000 [static, private]
 

Control command.

Definition at line 246 of file LOW_linkDS2490.h.

Referenced by ctlCmd_resetDevice().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::resumeExe_ctlCmd = 0x0002 [static, private]
 

Control command.

Definition at line 248 of file LOW_linkDS2490.h.

Referenced by ctlCmd_resumeExecution().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::RST_bitmask = 0x0100 [static, private]
 

RST = 1 inserts a 1-Wire Reset before executing the command.

RST = 0 no 1-Wire Reset inserted.

Definition at line 346 of file LOW_linkDS2490.h.

Referenced by comCmd_blockIO(), comCmd_matchAccess(), comCmd_searchAccess(), and comCmd_setPath().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::RTS_bitmask = 0x4000 [static, private]
 

RTS = 1 returns the discrepancy information to the host if SM = 1 and there are more devices than could be discovered in the current pass.

RTS = 0 does not return discrepancy information.

Definition at line 296 of file LOW_linkDS2490.h.

Referenced by comCmd_searchAccess().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::SE_bitmask = 0x0008 [static, private]
 

SE = 1 enable the speed change on the 1-Wire bus.

SE = 0 disable the speed change on the 1-Wire bus.

Definition at line 351 of file LOW_linkDS2490.h.

Referenced by comCmd_matchAccess(), and comCmd_oneWireReset().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::searchAccess_comCmdBase = 0x00f4 [static, private]
 

Communication command.

Definition at line 285 of file LOW_linkDS2490.h.

Referenced by comCmd_searchAccess().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::setDuration_comCmdBase = 0x0012 [static, private]
 

Communication command.

Definition at line 271 of file LOW_linkDS2490.h.

Referenced by comCmd_setDuration().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::setPath_comCmdBase = 0x00a2 [static, private]
 

Communication command.

Definition at line 280 of file LOW_linkDS2490.h.

Referenced by comCmd_setPath().

const uint8_t LOW_linkDS2490::SH_bitmask = 0x02 [static, private]
 

SH A value of 1 indicates that a 1-WIRE RESET revealed a short to the 1-Wire bus or the SET PATH command could not successfully connect a branch due to a short.

Definition at line 474 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::SM_bitmask = 0x0008 [static, private]
 

SM = 1 searches for and reports ROM Ids without really accessing a particular device.

SM = 0 makes a Strong Access to a particular device.

Definition at line 366 of file LOW_linkDS2490.h.

Referenced by comCmd_searchAccess().

soW0RecTime_t LOW_linkFlexibleSpeed::soW0RecTime [protected, inherited]
 

Saved value of DSO/W0R time.

Definition at line 189 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), and setWireSpeed().

const uint8_t LOW_linkDS2490::SPCE_bitmask = 0x04 [static, private]
 

SPCE If set to 1, a dynamic 1-Wire bus speed change through a Communication command is enabled, if set to 0, it is disabled.

Definition at line 402 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::speedChangeEn_modCmd = 0x0001 [static, private]
 

Mode command.

Definition at line 260 of file LOW_linkDS2490.h.

Referenced by modCmd_setEnableSpeedChange().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::SPU_bitmask = 0x1000 [static, private]
 

SPU = 1 inserts a strong pullup to 5V after a Bit or Byte or Block I/O or Do & Release command.

SPU = 0 no strong pullup.

Definition at line 321 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), and comCmd_doAndRelease().

const uint8_t LOW_linkDS2490::SPUA_bitmask = 0x01 [static, private]
 

SPUA if set to 1, the strong pullup to 5V is currently active, if set to 0, it is inactive.

Definition at line 410 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const uint8_t LOW_linkDS2490::SPUE_bitmask = 0x01 [static, private]
 

SPUE If set to 1, the strong pullup to 5V is enabled, if set to 0, it is disabled.

Definition at line 395 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::startExe_ctlCmd = 0x0001 [static, private]
 

Control command.

Definition at line 247 of file LOW_linkDS2490.h.

Referenced by ctlCmd_startExecution().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::strongPuDuration_modCmd = 0x0003 [static, private]
 

Mode command.

Definition at line 262 of file LOW_linkDS2490.h.

Referenced by modCmd_setStrongPullupDuration().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::TYPE_bitmask = 0x0008 [static, private]
 

TYPE = 1 specifies programming pulse duration.

TYPE = 0 specifies strong pullup duration.

Definition at line 380 of file LOW_linkDS2490.h.

Referenced by comCmd_pulse(), and comCmd_setDuration().

const LOW_portUsbDevice::usbSetting_t LOW_linkDS2490::usbAltSetting_10_16 = 0 [static, private]
 

poll interval EP2/EP3 = 10ms; max packet size = 16 bytes; Long interrupt polling interval, small packet size for bulk pipes

Definition at line 183 of file LOW_linkDS2490.h.

const LOW_portUsbDevice::usbSetting_t LOW_linkDS2490::usbAltSetting_10_64 = 1 [static, private]
 

poll interval EP2/EP3 = 10ms; max packet size = 64 bytes; Long interrupt polling interval, large packet size for bulk pipes

Definition at line 185 of file LOW_linkDS2490.h.

const LOW_portUsbDevice::usbSetting_t LOW_linkDS2490::usbAltSetting_1_16 = 2 [static, private]
 

poll interval EP2/EP3 = 1ms; max packet size = 16 bytes; Short interrupt polling interval, small packet size for bulk pipes

Definition at line 187 of file LOW_linkDS2490.h.

const LOW_portUsbDevice::usbSetting_t LOW_linkDS2490::usbAltSetting_1_64 = 3 [static, private]
 

poll interval EP2/EP3 = 1ms; max packet size = 64 bytes; Short interrupt polling interval, large packet size for bulk pipes

Definition at line 189 of file LOW_linkDS2490.h.

const LOW_portUsbDevice::usbEndpoint_t LOW_linkDS2490::usbControlEP = 0 [static, private]
 

Endpoint for the bi-directional default control pipe.

It is used for the USB enumeration process, USB core request communication, and all DS2490 specific command communication.

Definition at line 199 of file LOW_linkDS2490.h.

const LOW_portUsbDevice::usbEndpoint_t LOW_linkDS2490::usbDataInEP = 3 [static, private]
 

Endpoint for a bulk data in pipe (data to host) and is used to send data received by the DS2490 from the 1-Wire bus back to the host for processing.

Definition at line 216 of file LOW_linkDS2490.h.

Referenced by searchDevices(), touchBit(), touchBlock(), and touchByte().

const unsigned int LOW_linkDS2490::usbDataInEP_FIFOsize = 128 [static, private]
 

FIFO size in bytes of endpoint usbDataOutEP.

Definition at line 219 of file LOW_linkDS2490.h.

Referenced by searchDevices(), and touchBlock().

const LOW_portUsbDevice::usbEndpoint_t LOW_linkDS2490::usbDataOutEP = 2 [static, private]
 

Endpoint for a bulk data out pipe (data from host) and is used to transmit 1-Wire device data from the host to the DS2490.

The information received at this endpoint will be transmitted as data on the 1-Wire bus.

Definition at line 209 of file LOW_linkDS2490.h.

Referenced by searchDevices(), and touchBlock().

const unsigned int LOW_linkDS2490::usbDataOutEP_FIFOsize = 128 [static, private]
 

FIFO size in bytes of endpoint usbDataOutEP.

Definition at line 212 of file LOW_linkDS2490.h.

Referenced by touchBlock().

const LOW_portUsbDevice::usbInterface_t LOW_linkDS2490::usbDefaultInterface = 0 [static, private]
 

Default and only USB interface of DS2490.

Definition at line 168 of file LOW_linkDS2490.h.

Referenced by commonConstructorActions(), and ~LOW_linkDS2490().

LOW_portUsbDevice* LOW_linkDS2490::usbDevice [private]
 

The USB device we use.

Definition at line 585 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), comCmd_doAndRelease(), comCmd_matchAccess(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_readStraight(), comCmd_searchAccess(), comCmd_setDuration(), comCmd_setPath(), comCmd_writeEprom(), comCmd_writeSramPage(), commonConstructorActions(), ctlCmd_flushCommCmds(), ctlCmd_flushDataRcvBuffer(), ctlCmd_flushDataXmtBuffer(), ctlCmd_getCommCmds(), ctlCmd_haltExecutionWhenDone(), ctlCmd_haltExecutionWhenIdle(), ctlCmd_resetDevice(), ctlCmd_resumeExecution(), ctlCmd_startExecution(), LOW_linkDS2490(), modCmd_setDsoW0RecoveryTime(), modCmd_setEnablePulse(), modCmd_setEnableSpeedChange(), modCmd_setOneWireSpeed(), modCmd_setProgPulseDuration(), modCmd_setPulldownSlewRate(), modCmd_setStrongPullupDuration(), modCmd_setWrite1LowTime(), readDeviceStatus(), searchDevices(), touchBit(), touchBlock(), touchByte(), and ~LOW_linkDS2490().

const LOW_portUsbDevice::usbProductID_t LOW_linkDS2490::usbProductID = 0x2490 [static]
 

Dallas/Maxim USB DS2490 product ID.

Definition at line 68 of file LOW_linkDS2490.h.

Referenced by LOW_linkDS2490().

const LOW_portUsbDevice::usbEndpoint_t LOW_linkDS2490::usbStatusInEP = 1 [static, private]
 

Endpoint for an interrupt pipe (device to host) and is used to relay DS2490 status register data and specific command execution completion and/or error information to the host.

It is also used to inform the host of 1-Wire device-attach detection. The polling period requested for EP1 depends on the alternate interface setting of the 1-Wire interface.

Definition at line 205 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const LOW_portUsbDevice::usbVendorID_t LOW_linkDS2490::usbVendorID = 0x04fa [static]
 

Dallas/Maxim USB vendor ID.

Definition at line 67 of file LOW_linkDS2490.h.

Referenced by LOW_linkDS2490().

const LOW_portUsbDevice::bmRequestType_t LOW_linkDS2490::vendorCmd_requestType = 0x40 [static, private]
 

Request type of DS2490 vendor specific commands.

Definition at line 169 of file LOW_linkDS2490.h.

Referenced by comCmd_bitIO(), comCmd_blockIO(), comCmd_byteIO(), comCmd_doAndRelease(), comCmd_matchAccess(), comCmd_oneWireReset(), comCmd_pulse(), comCmd_readCrcProtPage(), comCmd_readRedirectPageCrc(), comCmd_readStraight(), comCmd_searchAccess(), comCmd_setDuration(), comCmd_setPath(), comCmd_writeEprom(), comCmd_writeSramPage(), ctlCmd_flushCommCmds(), ctlCmd_flushDataRcvBuffer(), ctlCmd_flushDataXmtBuffer(), ctlCmd_getCommCmds(), ctlCmd_haltExecutionWhenDone(), ctlCmd_haltExecutionWhenIdle(), ctlCmd_resetDevice(), ctlCmd_resumeExecution(), ctlCmd_startExecution(), modCmd_setDsoW0RecoveryTime(), modCmd_setEnablePulse(), modCmd_setEnableSpeedChange(), modCmd_setOneWireSpeed(), modCmd_setProgPulseDuration(), modCmd_setPulldownSlewRate(), modCmd_setStrongPullupDuration(), and modCmd_setWrite1LowTime().

const uint8_t LOW_linkDS2490::VP12_bitmask = 0x04 [static, private]
 

12VP if set to 1, the external 12V programming voltage is present, if set to 0, it is not present.

Definition at line 416 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

const uint8_t LOW_linkDS2490::VPP_bitmask = 0x08 [static, private]
 

VPP A value of 1 indicates that during a PULSE with TYPE = 1 or WRITE EPROM command the 12V programming pulse was not seen on the 1-Wire bus; this could indicate that there were other devices on the bus that clamped the voltage to a value lower than VPP or that the programming pulse was disabled with a mode command.

Definition at line 465 of file LOW_linkDS2490.h.

Referenced by readDeviceStatus().

w1LowTime_t LOW_linkFlexibleSpeed::w1LowTime [protected, inherited]
 

Saved value of write-1 low time.

Definition at line 188 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getWrite1LowTime(), resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), setWireSpeed(), and LOW_linkFlexibleSpeed::setWrite1LowTime().

wireSpeed_t LOW_linkFlexibleSpeed::wireSpeed [protected, inherited]
 

Saved value of wire speed.

Definition at line 186 of file LOW_linkFlexibleSpeed.h.

Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), LOW_linkDS2480B::getWireSpeed(), LOW_linkFlexibleSpeed::getWrite1LowTime(), LOW_linkDS2480B::reset_cmd(), resetLinkAdapter(), LOW_linkDS2480B::resetLinkAdapter(), LOW_linkDS2480B::searchAccelCtrl_cmd(), LOW_linkFlexibleSpeed::setPullDownSlewRate(), LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), LOW_linkFlexibleSpeed::setWireSpeed(), setWireSpeed(), LOW_linkFlexibleSpeed::setWrite1LowTime(), and LOW_linkDS2480B::singleBit_cmd().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::write1LowTime_modCmd = 0x0006 [static, private]
 

Mode command.

Definition at line 265 of file LOW_linkDS2490.h.

Referenced by modCmd_setWrite1LowTime().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::writeEprom_comCmdBase = 0x00c4 [static, private]
 

Communication command.

Definition at line 282 of file LOW_linkDS2490.h.

Referenced by comCmd_writeEprom().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::writeSramPage_comCmdBase = 0x00b2 [static, private]
 

Communication command.

Definition at line 281 of file LOW_linkDS2490.h.

Referenced by comCmd_writeSramPage().

const LOW_portUsbDevice::wValue_t LOW_linkDS2490::Z_bitmask = 0x0008 [static, private]
 

Z = 1 checks if the 0-bits in the byte to be written are 0-bits in the byte read back form the device.

Z = 0 checks if the byte to be written is identical to the one read back from the device.

Definition at line 361 of file LOW_linkDS2490.h.

Referenced by comCmd_writeEprom().


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 11:31:00 2004 for OneWireLibrary++ by doxygen 1.3.2