Пример #1
0
 /// <summary> Checks if the device's oscillator is enabled.  The clock
 /// will not increment if the clock oscillator is not enabled.
 ///
 /// </summary>
 /// <param name="state">current state of the device returned from <code>readDevice()</code>
 ///
 /// </param>
 /// <returns> true if the clock is running
 ///
 /// </returns>
 /// <seealso cref="com.dalsemi.onewire.container.OneWireSensor.readDevice()">
 /// </seealso>
 /// <seealso cref="canDisableClock()">
 /// </seealso>
 /// <seealso cref="setClockRunEnable(boolean,byte[])">
 /// </seealso>
 public virtual bool isClockRunning(byte[] state)
 {
     return(Bit.arrayReadBit(3, CONTROL_OFFSET, state) == 1);
 }
Пример #2
0
 /// <summary>
 /// Checks to see if interrupt mode is turned on. If so, pulses will be generated
 /// at an interval selected by setInterruptInterval.
 /// </summary>
 /// <param name="state">current state of the device returned from <code>readDevice()</code>
 ///
 /// </param>
 /// <returns> true if interrupts are enabled
 ///
 /// </returns>
 /// <seealso cref="com.dalsemi.onewire.container.OneWireSensor.readDevice()">
 /// </seealso>
 /// <seealso cref="canDisableClock()">
 /// </seealso>
 /// <seealso cref="setClockRunEnable(boolean,byte[])">
 /// </seealso>
 public virtual bool isInterruptEnabled(byte[] state)
 {
     return(Bit.arrayReadBit(7, CONTROL_OFFSET, state) == 1);
 }