Max31865.Registers.FaultThresholdRegister (max31865 v0.1.0)

Allows the reading and writing of the Max31865 Fault Threshold Register.

register-layout

Register Layout

Each fault threshold register consists of 16-bits of data which represent an integer. That integer is used to determine if a reading is higher or lower than is allowed.any()

The default state for the low registers is 0, the default state for the high registers is 65,535.

Link to this section Summary

Functions

Read a fault threshold register.

Write to a fault threshold register.

Link to this section Functions

Link to this function

read(atom, max_ref)

Read a fault threshold register.

Parameters:

  • :high/:low which signify whether the register contains the high threshold or low threshold
  • :max_ref which is a reference to a Max31865 SPI Connection

Returns a tuple of {:ok, threshold} where threshold integer representing the current value the requested register.

Link to this function

write(atom, threshold, max_ref)

Write to a fault threshold register.

Paramaters:

  • :high/:low which signify whether the register contains the high threshold or low threshold
  • An integer representing the new threshold
  • :max_ref which is a reference to a Max31865 SPI Connection

Returns a tuple of {:ok, value} where value is the new threshold written to the requested register.