#include <modm/driver/temperature/ltc2984.hpp>
|
enum | Register : uint16_t {
CommandStatus = 0x000,
Results = 0x010,
GlobalConfiguration = 0x0f0,
MuxChannels = 0x0f4,
MuxConfigDelay = 0x0f4,
ChannelConfig = 0x200,
CustomDataTable = 0x250
} |
|
enum | CommandStatus : uint8_t { Done = Bit6,
Start = Bit7,
DoneAndStart = Bit6 | Bit7,
Sleep = 0x97
} |
|
enum | Channel : uint8_t {
Ch1 = 0,
Ch2 = 1,
Ch3 = 2,
Ch4 = 3,
Ch5 = 4,
Ch6 = 5,
Ch7 = 6,
Ch8 = 7,
Ch9 = 8,
Ch10 = 9,
Ch11 = 10,
Ch12 = 11,
Ch13 = 12,
Ch14 = 13,
Ch15 = 14,
Ch16 = 15,
Ch17 = 16,
Ch18 = 17,
Ch19 = 18,
Ch20 = 19
} |
| List of available channels.
|
|
template<class SpiMaster, class Cs>
class modm::ltc2984< SpiMaster, Cs >
- Author
- Raphael Lehmann
template<class SpiMaster , class Cs >
Configure.
- Parameters
-
rejection | LTC2983/LTC2984 hat built-in simultaneous 50Hz/60Hz Rejection, default both are activated |
temperatureUnit | Temperature unit to use, °C or °F |
muxDelay | Mux configuration delay in 100 microseconds (maximum: 255 x 100us = 25.5ms) |
template<class SpiMaster , class Cs >
Configure channel.
- Parameters
-
channel | The channel to configure. |
config | The configuration for the channel. |
template<class SpiMaster , class Cs >
void modm::ltc2984< SpiMaster, Cs >::disableChannel |
( |
ltc2984< SpiMaster, Cs >::Configuration::MuxChannel |
channel | ) |
|
Deactivate channel for multiplexed conversation.
This has no effect until setChannels() is called
- Parameters
-
channel | The channel to disable. |
template<class SpiMaster , class Cs >
void modm::ltc2984< SpiMaster, Cs >::enableChannel |
( |
ltc2984< SpiMaster, Cs >::Configuration::MuxChannel |
channel | ) |
|
Enable channel for multiplexed conversation.
This has no effect until setChannels() is called
- Parameters
-
channel | The channel to activate. |
Run the resumable function.
You need to implement this method in you subclass yourself.
- Returns
- >
NestingError
if still running, <=NestingError
if it has finished.
- Returns
- the nesting depth in the current resumable function, or -1 if called outside any resumable function
template<class SpiMaster , class Cs >
Initiate single conversion.
- Parameters
-
channel | The channel to measure. |
template<class SpiMaster , class Cs >
Check if device is busy.
- Returns
- True if device is busy.
- Returns
true
if a resumable function is running at the current nesting level, else false
template<class SpiMaster , class Cs >
Initialize.
Sets used pins as output. SPI must be initialized by the user!
template<class SpiMaster , class Cs >
Ping the LTC298x device.
- Warning
- Do not use ping() while any measurement is running. The ping() function writes data to the Custom Sensor Table Data memory region but restores the data before finishing the device available check.
- Returns
- config True if the device is reachable.
template<class SpiMaster , class Cs >
Read temperature value.
- Parameters
-
channel | The channel to read the temperature value from. |
value | The temperature value as configured before. |
- Returns
- True if result is valid.
The documentation for this class was generated from the following file: