#include <LOW_linkDS2480B.h>
Inheritance diagram for LOW_linkDS2480B:
Public Types | |
enum | RXPOL_val_t { RXPOL_NORM = 0x00, RXPOL_INV } |
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_linkDS2480B (const LOW_portSerialFactory::portSpecifier_t &inSerPortSpec, const RXPOL_val_t inRXPOL, const bool inHasExternalPower, const bool inAllowProgPulse=false) | |
Constructor. | |
virtual | ~LOW_linkDS2480B () |
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. | |
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). | |
Higher level actions | |
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 | |
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. | |
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 | |
typedef LOW_linkDS2480B::resetAnswer_t | resetAnswer_t |
Reset command reply. | |
enum | busStatus_t { oneWireShorted_busStat = 0x00, presencePulse_busStat, alarmingPresencePulse_busStat, noPresencePulse_busStat } |
Bus status in reset command reply. More... | |
enum | internalMode_t { command_mode, data_mode } |
Type for internal mode flag. More... | |
DS2480B 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... | |
enum | PPD_val_t { PPD_32 = 0x00, PPD_64, PPD_128, PPD_256, PPD_512, PPD_1024, PPD_2048, PPD_inf } |
Programming Pulse Duration values. More... | |
enum | SPUD_val_t { SPUD_16_4 = 0x00, SPUD_65_5, SPUD_131, SPUD_262, SPUD_524, SPUD_1048, SPUD_dyn, SPUD_inf } |
Strong Pullup Duration values. More... | |
enum | LST_val_t { LST_1_8 = 0x00, LST_2_1, LST_2_4, LST_2_7, LST_3_0, LST_3_3, LST_3_6, LST_3_9 } |
Load Sensor Threshold values. More... | |
enum | RBR_val_t { RBR_9_6 = 0x00, RBR_19_2, RBR_57_6, RBR_115_2 } |
RS232 Baud Rate values. More... | |
Private Member Functions | |
DS2480B communication commands | |
The DS2480B supports four communication function commands: Reset, Single Bit, Pulse, and Search Accelerator control.
The Reset, Search Accelerator Control and Single Bit commands include bits to select the 1-Wire communication speed (regular, flexible regular, Overdrive). Even if a command does not generate activity on the 1-Wire bus, these bits are latched inside the device and will take effect immediately. | |
virtual void | reset_cmd (resetAnswer_t *outAnswer) |
Send Reset command. | |
virtual bool | singleBit_cmd (const bool inBitVal, const bool inStrongPullup=false) |
Send Single Bit command. | |
virtual void | pulse_cmd (const bool inArm, const bool inProgPulse=false, const bool inImmidiateTerm=false, const unsigned int inSecTimeout=5) |
Send Pulse command. | |
virtual void | pulse_cmd_manual (const unsigned long inSleepTime, const bool inProgPulse=false) |
Generate a pulse by manually sleeping. | |
virtual void | searchAccelCtrl_cmd (const bool inAccelOn) |
The Search Accelerator Control command is used to set or reset the Search Accelerator control flag. | |
DS2480B configuration commands | |
The DS2480B is designed to be configurable for the varying requirements of its application. When the device powers up and/or performs a master reset cycle, the hard wired default configuration settings take effect. These settings will work on a short 1-Wire bus and assume regular 1-Wire communication speed. To change these default settings and to verify the current settings, the logic of the DS2480B supports configuration commands. A summary of the available configuration parameters, their default settings at regular and Overdrive speed and their applicability is shown in Table 3. Parameters not related to the communication speed on the 1-Wire bus specify the duration of the 12V programming pulse, the duration of the strong pull up to 5V, the threshold current of the load sensor for dynamic strong pullup duration, and the baud rate on the interface that connects the DS2480B to the host. The remaining three parameters are used to modify the 1-Wire communication wave forms if one selects Flexible Speed. Configuration parameter overview:
| |
virtual void | setPullDownSlewRate_cmd (const PDSR_val_t inPDSR) |
Set the Pulldown Slew Rate Control. | |
virtual PDSR_val_t | getPullDownSlewRate_cmd () |
Get the Pulldown Slew Rate Control. | |
virtual void | setProgPulseDuration_cmd (const PPD_val_t inPPD) |
Set the Programming Pulse Duration. | |
virtual PPD_val_t | getProgPulseDuration_cmd () |
Get the Programming Pulse Duration. | |
virtual void | setStrongPullupDuration_cmd (const SPUD_val_t inSPUD) |
Set the Strong Pullup Duration. | |
virtual SPUD_val_t | getStrongPullupDuration_cmd () |
Get the Strong Pullup Duration. | |
virtual void | setWrite1LowTime_cmd (const W1LT_val_t inW1LT) |
Set the Write 1 Low Time. | |
virtual W1LT_val_t | getWrite1LowTime_cmd () |
Get the Write 1 Low Time. | |
virtual void | setSampleOffsetWrite0Rec_cmd (const SOW0RT_val_t inSOW0RT) |
Set the Sample Offset / Write 0 Recovery time. | |
virtual SOW0RT_val_t | getSampleOffsetWrite0Rec_cmd () |
Get the Sample Offset / Write 0 Recovery time. | |
virtual void | setLoadSensorThreshold_cmd (const LST_val_t inLST) |
Set the Load Sensor Threshold. | |
virtual LST_val_t | getLoadSensorThreshold_cmd () |
Set the Load Sensor Threshold. | |
virtual void | setRS232BaudRate_cmd (const RBR_val_t inRBR, const RXPOL_val_t inRXPOL) |
Set the RS232 Baud Rate and RXD polarity. | |
virtual RBR_val_t | getRS232BaudRate_cmd () |
Get the RS232 Baud Rate. | |
virtual RXPOL_val_t | getRS232RxPol_cmd () |
Get the RS232 RXD polarity. | |
Internal methods | |
virtual void | writeConfigValue (const uint8_t inParamCode, const uint8_t inParamValue) |
Write a config value to DS2480B and do sanity checking. | |
virtual uint8_t | readConfigValue (const uint8_t inParamCode) |
Read a config value from DS2480B and do sanity checking. | |
virtual void | setMode (const internalMode_t inMode) |
Switch between DS2480B data/command mode and vice versa. | |
Enumeration type conversion methods | |
virtual const SPUD_val_t | strongPullup_2_SPUD_val (const strongPullup_t inStrongPullup) const |
Convert value of type strongPullup_t to SPUD_val_t. | |
virtual const LOW_linkDS2480B::PPD_val_t | progPulse_2_PPD_val (const progPulse_t inProgPulse) const |
Convert value of type progPulse_t to PPD_val_t. | |
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. | |
Private Attributes | |
LOW_portSerial * | serialPort |
The serial port the adapter is attached to. | |
const RXPOL_val_t | receivePolarity |
Polarity of RXD pin. | |
internalMode_t | internalMode |
Mode (cmd/data) of DS2480B. | |
Static Private Attributes | |
Communication command bytes | |
const uint8_t | SerialSpeedAdapt_Cmd = 0xc1 |
Communication command byte. | |
const uint8_t | SwitchToDataMode_Cmd = 0xe1 |
Communication command byte. | |
const uint8_t | SwitchToCommandMode_Cmd = 0xe3 |
Communication command byte. | |
const uint8_t | PulseTermination_Cmd = 0xf1 |
Communication command byte. | |
const uint8_t | Reset_Cmd = 0xc1 |
Communication command byte. | |
const uint8_t | SearchAccel_Cmd = 0xa1 |
Communication command byte. | |
const uint8_t | Pulse_Cmd = 0xe1 |
Communication command byte. | |
const uint8_t | SingleBit_Cmd = 0x81 |
Communication command byte. | |
Configuration command bytes | |
const uint8_t | PullDownSlewRate_cfgCmd = 0x01 |
Configuration command byte. | |
const uint8_t | ProgPulseDuration_cfgCmd = 0x02 |
Configuration command byte. | |
const uint8_t | StrongPullupDuration_cfgCmd = 0x03 |
Configuration command byte. | |
const uint8_t | Write1LowTime_cfgCmd = 0x04 |
Configuration command byte. | |
const uint8_t | SampleOffsetWrite0Rec_cfgCmd = 0x05 |
Configuration command byte. | |
const uint8_t | LoadSensorThreshold_cfgCmd = 0x06 |
Configuration command byte. | |
const uint8_t | RS232BaudRate_cfgCmd = 0x07 |
Configuration command byte. |
DS2480B features:
The DS2480B is a serial port to 1-Wire interface chip that supports regular and Overdrive speeds. It connects directly to UARTs and 5V RS232 systems. Interfacing to RS232C (± 12V levels) requires a passive clamping circuit and one 5V to ±12V level translator. Internal timers relieve the host of the burden of generating the time-critical 1-Wire communication waveforms. In contrast to the DS9097(E) where a full character must be sent by the host for each 1-Wire time slot, the DS2480B can translate each character into eight 1-Wire time slots, thereby increasing the data throughput significantly. In addition, the DS2480B can be set to communicate at four different data rates, including 115.2 kbps, 57.6 kbps and 19.2 kbps with 9.6 kbps being the power-on default. Command codes received from the host s crystal controlled UART serve as a reference to continuously calibrate the on-chip timing generator. The DS2480B uses a unique protocol that merges data and control information without requiring control pins. This approach maintains compatibility to off-the-shelf serial to wireless converters, allowing easy realization of 1-Wire media jumpers. The various control functions of the DS2480B are optimized for MicroLAN 1-Wire networks and support the special needs of all current 1-Wire devices including the crypto iButton, EPROM-based Add-Only Memories, EEPROM devices and 1-Wire Thermometers.
This class is thread-safe.
Complete documentation of exceptions thrown.
Parts of the documentation by Dallas Semiconductors / Maxim Integrated Products
Definition at line 75 of file LOW_linkDS2480B.h.
|
Vector type of link class pointers.
Definition at line 64 of file LOW_linkFlexibleSpeed.h. |
|
Type for individual link ID number.
Definition at line 126 of file LOW_link.h. |
|
Vector type of link class pointers.
Definition at line 124 of file LOW_link.h. |
|
Reset command reply.
|
|
Bus status in reset command reply.
Definition at line 225 of file LOW_linkDS2480B.h. |
|
Type for internal mode flag.
Definition at line 239 of file LOW_linkDS2480B.h. |
|
Load Sensor Threshold values.
Definition at line 219 of file LOW_linkDS2480B.h. Referenced by getLoadSensorThreshold_cmd(). |
|
Type for wirespeed.
Definition at line 207 of file LOW_linkDS2480B.h. Referenced by wireSpeed_2_OWSPEED_val(). |
|
Type for flexible speed pulldown slew rate in V/microsec.
Definition at line 76 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), LOW_linkDS2490::getPullDownSlewRate(), getPullDownSlewRate(), LOW_linkDS2490::PDSR_val_2_pdSlewRate(), and PDSR_val_2_pdSlewRate(). |
|
Type for flexible speed pulldown slew rate in V/microsec.
Definition at line 209 of file LOW_linkDS2480B.h. Referenced by getPullDownSlewRate_cmd(), and pdSlewRate_2_PDSR_val(). |
|
Programming Pulse Duration values.
Definition at line 215 of file LOW_linkDS2480B.h. Referenced by getProgPulseDuration_cmd(), and progPulse_2_PPD_val(). |
|
Type for 12V program pulse period specification. Period may vary a little, depending on actual device.
Definition at line 141 of file LOW_link.h. |
|
RS232 Baud Rate values.
Definition at line 221 of file LOW_linkDS2480B.h. Referenced by getRS232BaudRate_cmd(), and resetLinkAdapter(). |
|
Definition at line 85 of file LOW_linkDS2480B.h. Referenced by getRS232RxPol_cmd(). |
|
Type for flexible speed DSO/ W0R time in microsec.
Definition at line 98 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), LOW_linkDS2490::getSampleOffsetWrite0Rec(), getSampleOffsetWrite0Rec(), LOW_linkDS2490::SOW0RT_val_2_soW0RecTime(), and SOW0RT_val_2_soW0RecTime(). |
|
Type for flexible speed DSO/ W0R time in microsec.
Definition at line 213 of file LOW_linkDS2480B.h. Referenced by getSampleOffsetWrite0Rec_cmd(), and soW0RecTime_2_SOW0RT_val(). |
|
Strong Pullup Duration values.
Definition at line 217 of file LOW_linkDS2480B.h. Referenced by getStrongPullupDuration_cmd(), and strongPullup_2_SPUD_val(). |
|
Type for strong pullup period specification. Period may vary a little, depending on actual device.
Definition at line 130 of file LOW_link.h. |
|
Type for flexible speed write-1 low time in microsec.
Definition at line 87 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getWrite1LowTime(), LOW_linkDS2490::getWrite1LowTime(), getWrite1LowTime(), LOW_linkDS2490::W1LT_val_2_w1LowTime(), and W1LT_val_2_w1LowTime(). |
|
Type for flexible speed write-1 low time in microsec.
Definition at line 211 of file LOW_linkDS2480B.h. Referenced by getWrite1LowTime_cmd(), and w1LowTime_2_W1LT_val(). |
|
1-Wire communication speeds.
Definition at line 67 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkDS2490::getWireSpeed(), getWireSpeed(), LOW_linkDS2490::OWSPEED_val_2_wireSpeed(), and OWSPEED_val_2_wireSpeed(). |
|
Constructor. Timings for flexible speed is configured to the recommeded optimal parameters as of app note #148.
Definition at line 22 of file LOW_linkDS2480B.cpp. References LOW_portSerialFactory::new_portSerial(), resetLinkAdapter(), and serialPort. |
|
Destructor.
Definition at line 34 of file LOW_linkDS2480B.cpp. References serialPort, and LOW_portSerial::tty_flush(). |
|
Exception base class for all exceptions thrown by LOW_link.
|
|
|
|
Exception class to be thrown on access violation errors.
|
|
Exception class to be thrown on errors related to requested voltage level.
|
|
Exception class to be thrown on errors related to currently selected wire speed.
|
|
Exception class to be thrown on pure internal errors.
|
|
Exception class to be thrown on communication errors.
|
|
Exception base class for all exceptions thrown by LOW_link.
|
|
Execute a single search sequence on the bus. A default implementation relying on bit i/o methods is provided.
Reimplemented from LOW_link. Definition at line 311 of file LOW_linkDS2480B.cpp. References byteVec_t, LOW_deviceIDRaw::getBit(), searchAccelCtrl_cmd(), LOW_deviceIDRaw::setBit(), and touchBlock(). |
|
Get wether the program pulse should be allowed.
Definition at line 80 of file LOW_link.cpp. References LOW_link::allowProgPulse. |
|
Get 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(). |
|
Get wether the adapter is capable of 12V Program pulse.
Definition at line 68 of file LOW_link.cpp. References LOW_link::hasProgramPulse. |
|
Get ID of the link.
Definition at line 62 of file LOW_link.cpp. References LOW_link::linkID. |
|
Get the link's family type. Note: Subclasses must implement this method to return a clear text name of their kind.
Implements LOW_link. Definition at line 116 of file LOW_linkDS2480B.h. |
|
Set the Load Sensor Threshold. See setLoadSensorThreshold_cmd() Definition at line 649 of file LOW_linkDS2480B.cpp. References LoadSensorThreshold_cfgCmd, LST_val_t, and readConfigValue(). |
|
Get the Programming Pulse Duration. See setProgPulseDuration_cmd() Definition at line 589 of file LOW_linkDS2480B.cpp. References PPD_val_t, ProgPulseDuration_cfgCmd, and readConfigValue(). |
|
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.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 389 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::getPullDownSlewRate(), getPullDownSlewRate_cmd(), LOW_linkFlexibleSpeed::pdSlewRate_t, and PDSR_val_2_pdSlewRate(). |
|
Get the Pulldown Slew Rate Control. Definition at line 574 of file LOW_linkDS2480B.cpp. References PDSR_val_t, PullDownSlewRate_cfgCmd, and readConfigValue(). Referenced by getPullDownSlewRate(). |
|
Get the RS232 Baud Rate. Definition at line 664 of file LOW_linkDS2480B.cpp. References RBR_val_t, readConfigValue(), and RS232BaudRate_cfgCmd. |
|
Get the RS232 RXD polarity. Definition at line 671 of file LOW_linkDS2480B.cpp. References readConfigValue(), RS232BaudRate_cfgCmd, and RXPOL_val_t. |
|
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.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 429 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), getSampleOffsetWrite0Rec_cmd(), LOW_linkFlexibleSpeed::soW0RecTime_t, and SOW0RT_val_2_soW0RecTime(). |
|
Get the Sample Offset / Write 0 Recovery time. See setSampleOffsetWrite0Rec_cmd() Definition at line 634 of file LOW_linkDS2480B.cpp. References readConfigValue(), SampleOffsetWrite0Rec_cfgCmd, and SOW0RT_val_t. Referenced by getSampleOffsetWrite0Rec(). |
|
Get the Strong Pullup Duration. See setProgPulseDuration_cmd() Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 604 of file LOW_linkDS2480B.cpp. References readConfigValue(), SPUD_val_t, and StrongPullupDuration_cfgCmd. |
|
Get the 1-Wire speed mode.
Implements LOW_linkFlexibleSpeed. Definition at line 371 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::wireSpeed, and LOW_linkFlexibleSpeed::wireSpeed_t. |
|
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.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 409 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::getWrite1LowTime(), getWrite1LowTime_cmd(), LOW_linkFlexibleSpeed::w1LowTime_t, and W1LT_val_2_w1LowTime(). |
|
Get the Write 1 Low Time. Definition at line 619 of file LOW_linkDS2480B.cpp. References readConfigValue(), W1LT_val_t, and Write1LowTime_cfgCmd. Referenced by getWrite1LowTime(). |
|
Comparison based on linkID.
Definition at line 50 of file LOW_link.cpp. References LOW_link::linkID. |
|
Convert value of type OWSPEED_val_t to wireSpeed_t.
Definition at line 884 of file LOW_linkDS2480B.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. |
|
Convert value of type pdSlewRate_t to PDSR_val_t.
Definition at line 796 of file LOW_linkDS2480B.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(). |
|
Convert value of type PDSR_val_t to pdSlewRate_t.
Definition at line 779 of file LOW_linkDS2480B.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(). |
|
Convert value of type progPulse_t to PPD_val_t.
Definition at line 762 of file LOW_linkDS2480B.cpp. References PPD_1024, PPD_128, PPD_2048, PPD_256, PPD_32, PPD_512, PPD_64, PPD_val_t, 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(). |
|
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!).
Implements LOW_link. Definition at line 296 of file LOW_linkDS2480B.cpp. References LOW_link::allowProgPulse, LOW_link::hasProgramPulse, progPulse_2_PPD_val(), pulse_cmd(), and setProgPulseDuration_cmd(). |
|
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!).
Implements LOW_link. Definition at line 271 of file LOW_linkDS2480B.cpp. References LOW_link::allowProgPulse, LOW_link::hasProgramPulse, LOW_link::progPulse_1024, LOW_link::progPulse_128, LOW_link::progPulse_2048, LOW_link::progPulse_256, LOW_link::progPulse_32, LOW_link::progPulse_512, LOW_link::progPulse_64, and pulse_cmd_manual(). |
|
Send Pulse command. The Pulse command serves several functions that are selected by the contents of bit 1 and bit 4 of the command code. The main functions are generating a strong pullup to 5V and generating 12V programming pulses for EPROM devices (if the 12V are available at the VPP pin). The secondary function of the pulse command is arming and disarming a strong pullup after every subsequent byte in Data Mode. The arm/disarm function is controlled by bit 1 of the command code. Bit 4 determines whether the device will generate a strong pullup to 5V or a 12V programming pulse. The table below summarizes these options.
|
|
Generate a pulse by manually sleeping.
Definition at line 519 of file LOW_linkDS2480B.cpp. References command_mode, LOW_platformMisc::microSleep(), LOW_platformMisc::milliSleep(), PPD_inf, Pulse_Cmd, PulseTermination_Cmd, serialPort, setMode(), setProgPulseDuration_cmd(), setStrongPullupDuration_cmd(), SPUD_inf, LOW_portSerial::tty_readByte(), and LOW_portSerial::tty_write(). Referenced by programPulse(), and strongPullup(). |
|
Read a config value from DS2480B and do sanity checking.
Definition at line 700 of file LOW_linkDS2480B.cpp. References command_mode, serialPort, setMode(), LOW_portSerial::tty_readByte(), and LOW_portSerial::tty_write(). Referenced by getLoadSensorThreshold_cmd(), getProgPulseDuration_cmd(), getPullDownSlewRate_cmd(), getRS232BaudRate_cmd(), getRS232RxPol_cmd(), getSampleOffsetWrite0Rec_cmd(), getStrongPullupDuration_cmd(), and getWrite1LowTime_cmd(). |
|
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.
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(). |
|
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.
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(). |
|
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.
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(). |
|
Send Reset command. The Reset command must be used to begin all 1-Wire communication. The speed selection included in the command code immediately takes effect. The response byte includes a code for the reaction on the 1 Wire bus (bits 0 and 1) and a code for the chip revision (bits 2 to 4). If bit 5 of the response byte reads 1, a programming voltage is present on the VPP pin, indicating that one may try programming EPROM devices.
|
|
Implements LOW_link. Definition at line 212 of file LOW_linkDS2480B.cpp. References alarmingPresencePulse_busStat, LOW_linkDS2480B::resetAnswer_t::busStatus, LOW_link::hasProgramPulse, LOW_linkDS2480B::resetAnswer_t::isVppPresent, noPresencePulse_busStat, oneWireShorted_busStat, presencePulse_busStat, and reset_cmd(). Referenced by setWireSpeed(). |
|
|
The Search Accelerator Control command is used to set or reset the Search Accelerator control flag. Bit 4 of the command code contains the state to which the accelerator control flag is to be set. If the flag is set to a 1 (on) the device translates every byte received in Data Mode into a 12 bit sequence on the 1-Wire bus. Before activating the Search Accelerator, one must make sure that the strong pullup after every byte is disarmed (see Pulse Command). The Search Accelerator command does not generate a command response byte. Although the Search Accelerator Control command itself does not generate any 1-Wire activity, it can be used to select the communication speed on the 1-Wire bus. The speed selection (if different from the previous setting, e.g., from a Reset command) will take effect immediately. Command code description:
|
|
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.
Reimplemented in LOW_linkDS2490. Definition at line 185 of file LOW_link.cpp. References LOW_device::anyDev_famCode, LOW_deviceID::deviceIDVec_t, LOW_link::doSearchSequence(), LOW_deviceIDRaw::getBit(), LOW_deviceIDRaw::getFamilyCode(), LOW_link::resetBus(), LOW_device::SearchAlarmROM_COMMAND, LOW_device::SearchROM_COMMAND, LOW_deviceIDRaw::setBit(), LOW_deviceIDRaw::setFamilyCode(), and LOW_link::writeData(). Referenced by LOW_netSegment::cmd_SearchROM(), and LOW_netSegment::cmd_SearchROMVerify(). |
|
Set the Load Sensor Threshold. Parameter Load Sensor Threshold has been implemented in order to more efficiently support the high current demand of the crypto iButton. The load sensor is only active if "dynamic" for the Strong Pullup Duration has been selected. The nominal and default value for the load sensor threshold is 3.0 mA with a tolerance band of -25% to +80%. The sensor threshold should be left at its default value; changes should only be made to compensate for tolerances. Dynamic duration should only be used when operating crypto iButtons and not for gang-programming 1-Wire EEPROMs or measuring temperature with multiple temperature sensors converting simultaneously. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 642 of file LOW_linkDS2480B.cpp. References LoadSensorThreshold_cfgCmd, and writeConfigValue(). |
|
Switch between DS2480B data/command mode and vice versa. It is safe to call the method regardless of current state.
Definition at line 718 of file LOW_linkDS2480B.cpp. References command_mode, data_mode, internalMode, serialPort, SwitchToCommandMode_Cmd, SwitchToDataMode_Cmd, and LOW_portSerial::tty_write(). Referenced by pulse_cmd(), pulse_cmd_manual(), readConfigValue(), reset_cmd(), searchAccelCtrl_cmd(), singleBit_cmd(), touchBlock(), touchByte(), and writeConfigValue(). |
|
Set the Programming Pulse Duration. For parameter Programming Pulse Duration one may select indefinite duration. This value, however, should only be selected if one is not going to switch the device to Data Mode. As long as the device stays in Command Mode, any pulse function (programming or strong pullup) that uses one of these parameters can be terminated by sending the command code F1h. Termination is not possible if the device is in Data Mode. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 582 of file LOW_linkDS2480B.cpp. References ProgPulseDuration_cfgCmd, and writeConfigValue(). Referenced by programPulse(), and pulse_cmd_manual(). |
|
Set the Pulldown Slew Rate Control. Current speed checking and remembering the value is done by provided implementation.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 379 of file LOW_linkDS2480B.cpp. References pdSlewRate_2_PDSR_val(), LOW_linkFlexibleSpeed::setPullDownSlewRate(), and setPullDownSlewRate_cmd(). Referenced by resetLinkAdapter(). |
|
Set the Pulldown Slew Rate Control. The numbers given Pulldown Slew Rate Control are nominal values. They may vary to some extent and are almost independent of the load on the 1-Wire bus. Whenever the DS2480B begins pulling the 1-Wire bus low to initiate a time slot, for example, it first turns off the weak pullup current IWEAKPU. Then, at regular and Overdrive speeds it will generate a falling edge at a slew rate of typically 15V/ms. This value is acceptable for short 1-Wire busses and adequate for communication at Overdrive speed. For MicroLAN networks of more than roughly 30 meters length one should always use flexible speed. One of the parameters that is adjustable at flexible speed is the slew rate of DS2480B initiated falling edges. As extensive tests have shown, MicroLAN networks at a length of up to 300 meters will perform best if the fall time tF is in the range of 4 ± 0.5 ms. This translates into a slew rate of approximately 1V/ms. If the actual measured fall time is longer than the target value, one should use a value of 1.37 V/µs or higher. If the fall time is shorter, one should use a value of 0.83 V/µs or lower. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 567 of file LOW_linkDS2480B.cpp. References PullDownSlewRate_cfgCmd, and writeConfigValue(). Referenced by setPullDownSlewRate(). |
|
Set the RS232 Baud Rate and RXD polarity. Parameter RS232 Baud Rate has two functions. It selects the baud rate and allows inversion of the signal at the RXD pin. Note that when changing the baud rate, the DS2480B will send the command response byte at the new data rate. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 657 of file LOW_linkDS2480B.cpp. References RS232BaudRate_cfgCmd, and writeConfigValue(). Referenced by resetLinkAdapter(). |
|
Set the Sample Offset / Write 0 Recovery time. Current speed checking and remembering the value is done by provided implementation.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 419 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), setSampleOffsetWrite0Rec_cmd(), and soW0RecTime_2_SOW0RT_val(). Referenced by resetLinkAdapter(). |
|
Set the Sample Offset / Write 0 Recovery time. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 627 of file LOW_linkDS2480B.cpp. References SampleOffsetWrite0Rec_cfgCmd, and writeConfigValue(). Referenced by setSampleOffsetWrite0Rec(). |
|
Set the Strong Pullup Duration. For parameter Strong Pullup Duration one may select indefinite duration. This value, however, should only be selected if one is not going to switch the device to Data Mode. As long as the device stays in Command Mode, any pulse function (programming or strong pullup) that uses one of these parameters can be terminated by sending the command code F1h. Termination is not possible if the device is in Data Mode. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 597 of file LOW_linkDS2480B.cpp. References StrongPullupDuration_cfgCmd, and writeConfigValue(). Referenced by pulse_cmd_manual(), strongPullup(), touchBit(), and touchByte(). |
|
Set the 1-Wire speed mode.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 360 of file LOW_linkDS2480B.cpp. References resetBus(), resetLinkAdapter(), and LOW_linkFlexibleSpeed::setWireSpeed(). |
|
Set the Write 1 Low Time. Current speed checking and remembering the value is done by provided implementation.
Reimplemented from LOW_linkFlexibleSpeed. Definition at line 399 of file LOW_linkDS2480B.cpp. References LOW_linkFlexibleSpeed::setWrite1LowTime(), setWrite1LowTime_cmd(), and w1LowTime_2_W1LT_val(). Referenced by resetLinkAdapter(). |
|
Set the Write 1 Low Time. Note: This is the raw command version. No checking if the parameter is selectable in the current 1-Wire speed mode is done. Definition at line 612 of file LOW_linkDS2480B.cpp. References Write1LowTime_cfgCmd, and writeConfigValue(). Referenced by setWrite1LowTime(). |
|
Send Single Bit command. The Single Bit command is used to generate a single time slot on the 1-Wire bus at the speed indicated by bits 2 and 3. The type of the time slot (Write-0 or Write-1) is determined by the logic value of bit 4. A Read Data time slot is identical to the Write-1 time slot. Bits 0 and 1 of the response byte transmitted by the DS2480B at the end of the time slot reveal the value found on the 1-Wire bus when reading. For a time slot without a subsequent strong pull up, bit 1 of the command must be set to 0. For a time slot immediately followed by a strong pullup bit 1 must be set to 1. As soon as the strong pullup is over, the device will send a second response byte, code EFh (read 1) or ECh (read 0), depending on the value found on the 1 Wire bus when reading. The strong pullup directly following the single bit is used in conjunction with the crypto iButton.
|
|
Convert value of type soW0RecTime_t to SOW0RT_val_t.
Definition at line 866 of file LOW_linkDS2480B.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(). |
|
Convert value of type SOW0RT_val_t to soW0RecTime_t.
Definition at line 849 of file LOW_linkDS2480B.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(). |
|
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!).
Implements LOW_link. Definition at line 251 of file LOW_linkDS2480B.cpp. References LOW_link::pullUp_1048, LOW_link::pullUp_131, LOW_link::pullUp_16_4, LOW_link::pullUp_262, LOW_link::pullUp_524, LOW_link::pullUp_65_5, pulse_cmd(), setStrongPullupDuration_cmd(), and strongPullup_2_SPUD_val(). |
|
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!).
Implements LOW_link. Definition at line 233 of file LOW_linkDS2480B.cpp. References LOW_link::pullUp_1048, LOW_link::pullUp_131, LOW_link::pullUp_16_4, LOW_link::pullUp_262, LOW_link::pullUp_524, LOW_link::pullUp_65_5, and pulse_cmd_manual(). |
|
Convert value of type strongPullup_t to SPUD_val_t.
Definition at line 746 of file LOW_linkDS2480B.cpp. References LOW_link::pullUp_1048, LOW_link::pullUp_131, LOW_link::pullUp_16_4, LOW_link::pullUp_262, LOW_link::pullUp_524, LOW_link::pullUp_65_5, SPUD_1048, SPUD_131, SPUD_16_4, SPUD_262, SPUD_524, SPUD_65_5, and SPUD_val_t. Referenced by strongPullup(), touchBit(), and touchByte(). |
|
Send 1 bit of communication to the 1-Wire net and return the result 1 bit read from the 1-Wire net.
Implements LOW_link. Definition at line 47 of file LOW_linkDS2480B.cpp. References LOW_link::pullUp_NONE, setStrongPullupDuration_cmd(), singleBit_cmd(), and strongPullup_2_SPUD_val(). |
|
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!
Reimplemented from LOW_link. Definition at line 84 of file LOW_linkDS2480B.cpp. References byteVec_t, data_mode, serialPort, setMode(), SwitchToCommandMode_Cmd, touchByte(), LOW_portSerial::tty_read(), and LOW_portSerial::tty_write(). Referenced by doSearchSequence(). |
|
Send 8 bits of communication to the 1-Wire net and return the result 8 bits read from the 1-Wire net.
Implements LOW_link. Definition at line 59 of file LOW_linkDS2480B.cpp. References data_mode, LOW_link::pullUp_NONE, pulse_cmd(), serialPort, setMode(), setStrongPullupDuration_cmd(), strongPullup_2_SPUD_val(), SwitchToCommandMode_Cmd, LOW_portSerial::tty_readByte(), and LOW_portSerial::tty_write(). Referenced by touchBlock(). |
|
Convert value of type w1LowTime_t to W1LT_val_t.
Definition at line 831 of file LOW_linkDS2480B.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(). |
|
Convert value of type W1LT_val_t to w1LowTime_t.
Definition at line 814 of file LOW_linkDS2480B.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(). |
|
Convert value of type wireSpeed_t to OWSPEED_val_t.
Definition at line 896 of file LOW_linkDS2480B.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 reset_cmd(), searchAccelCtrl_cmd(), and singleBit_cmd(). |
|
Write a config value to DS2480B and do sanity checking.
Definition at line 685 of file LOW_linkDS2480B.cpp. References command_mode, serialPort, setMode(), LOW_portSerial::tty_readByte(), and LOW_portSerial::tty_write(). Referenced by setLoadSensorThreshold_cmd(), setProgPulseDuration_cmd(), setPullDownSlewRate_cmd(), setRS232BaudRate_cmd(), setSampleOffsetWrite0Rec_cmd(), setStrongPullupDuration_cmd(), and setWrite1LowTime_cmd(). |
|
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!
Definition at line 166 of file LOW_link.cpp. References byteVec_t, and LOW_link::touchBlock(). |
|
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.
Definition at line 157 of file LOW_link.cpp. References LOW_link::touchByte(). |
|
|
Wether the program pulse should be allowed.
Definition at line 460 of file LOW_link.h. Referenced by LOW_link::getAllowProgPulse(), LOW_linkPassiveSerial::programPulse(), LOW_linkDS2490::programPulse(), programPulse(), and LOW_linkDS2490::resetLinkAdapter(). |
|
Wether the attached bus supplies external power.
Definition at line 459 of file LOW_link.h. Referenced by LOW_link::getHasExternalPower(). |
|
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(), LOW_linkDS2490::programPulse(), programPulse(), resetBus(), and LOW_linkDS2490::resetLinkAdapter(). |
|
Mode (cmd/data) of DS2480B.
Definition at line 250 of file LOW_linkDS2480B.h. Referenced by resetLinkAdapter(), and setMode(). |
|
Individual ID of the link adapter.
Definition at line 457 of file LOW_link.h. Referenced by LOW_link::getID(), and LOW_link::operator==(). |
|
Configuration command byte.
Definition at line 195 of file LOW_linkDS2480B.h. Referenced by getLoadSensorThreshold_cmd(), and setLoadSensorThreshold_cmd(). |
|
Saved value of pulldown slew rate.
Definition at line 187 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), LOW_linkDS2490::resetLinkAdapter(), resetLinkAdapter(), LOW_linkFlexibleSpeed::setPullDownSlewRate(), and LOW_linkDS2490::setWireSpeed(). |
|
Configuration command byte.
Definition at line 191 of file LOW_linkDS2480B.h. Referenced by getProgPulseDuration_cmd(), and setProgPulseDuration_cmd(). |
|
Configuration command byte.
Definition at line 190 of file LOW_linkDS2480B.h. Referenced by getPullDownSlewRate_cmd(), and setPullDownSlewRate_cmd(). |
|
Communication command byte.
Definition at line 184 of file LOW_linkDS2480B.h. Referenced by pulse_cmd(), and pulse_cmd_manual(). |
|
Communication command byte.
Definition at line 181 of file LOW_linkDS2480B.h. Referenced by pulse_cmd(), and pulse_cmd_manual(). |
|
Polarity of RXD pin.
Definition at line 249 of file LOW_linkDS2480B.h. Referenced by resetLinkAdapter(). |
|
Communication command byte.
Definition at line 182 of file LOW_linkDS2480B.h. Referenced by reset_cmd(). |
|
Configuration command byte.
Definition at line 196 of file LOW_linkDS2480B.h. Referenced by getRS232BaudRate_cmd(), getRS232RxPol_cmd(), and setRS232BaudRate_cmd(). |
|
Configuration command byte.
Definition at line 194 of file LOW_linkDS2480B.h. Referenced by getSampleOffsetWrite0Rec_cmd(), and setSampleOffsetWrite0Rec_cmd(). |
|
Communication command byte.
Definition at line 183 of file LOW_linkDS2480B.h. Referenced by searchAccelCtrl_cmd(). |
|
The serial port the adapter is attached to.
Definition at line 248 of file LOW_linkDS2480B.h. Referenced by LOW_linkDS2480B(), pulse_cmd(), pulse_cmd_manual(), readConfigValue(), reset_cmd(), resetLinkAdapter(), searchAccelCtrl_cmd(), setMode(), singleBit_cmd(), touchBlock(), touchByte(), writeConfigValue(), and ~LOW_linkDS2480B(). |
|
Communication command byte.
Definition at line 178 of file LOW_linkDS2480B.h. Referenced by resetLinkAdapter(). |
|
Communication command byte.
Definition at line 185 of file LOW_linkDS2480B.h. Referenced by singleBit_cmd(). |
|
Saved value of DSO/W0R time.
Definition at line 189 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), LOW_linkDS2490::resetLinkAdapter(), resetLinkAdapter(), LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), and LOW_linkDS2490::setWireSpeed(). |
|
Configuration command byte.
Definition at line 192 of file LOW_linkDS2480B.h. Referenced by getStrongPullupDuration_cmd(), and setStrongPullupDuration_cmd(). |
|
Communication command byte.
Definition at line 180 of file LOW_linkDS2480B.h. Referenced by setMode(), touchBlock(), and touchByte(). |
|
Communication command byte.
Definition at line 179 of file LOW_linkDS2480B.h. Referenced by setMode(). |
|
Saved value of write-1 low time.
Definition at line 188 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getWrite1LowTime(), LOW_linkDS2490::resetLinkAdapter(), resetLinkAdapter(), LOW_linkDS2490::setWireSpeed(), and LOW_linkFlexibleSpeed::setWrite1LowTime(). |
|
Saved value of wire speed.
Definition at line 186 of file LOW_linkFlexibleSpeed.h. Referenced by LOW_linkFlexibleSpeed::getPullDownSlewRate(), LOW_linkFlexibleSpeed::getSampleOffsetWrite0Rec(), getWireSpeed(), LOW_linkFlexibleSpeed::getWrite1LowTime(), reset_cmd(), LOW_linkDS2490::resetLinkAdapter(), resetLinkAdapter(), searchAccelCtrl_cmd(), LOW_linkFlexibleSpeed::setPullDownSlewRate(), LOW_linkFlexibleSpeed::setSampleOffsetWrite0Rec(), LOW_linkFlexibleSpeed::setWireSpeed(), LOW_linkDS2490::setWireSpeed(), LOW_linkFlexibleSpeed::setWrite1LowTime(), and singleBit_cmd(). |
|
Configuration command byte.
Definition at line 193 of file LOW_linkDS2480B.h. Referenced by getWrite1LowTime_cmd(), and setWrite1LowTime_cmd(). |