14 namespace duds {
namespace hardware {
namespace devices {
namespace instruments {
36 (std::int8_t)(0x5 | (wide ? 0x8 : 0));
void init(bool wide=true)
Configures for continuous 16-bit sampling of all colors.
void clear()
Makes the conversation empty.
std::unique_ptr< duds::hardware::interface::I2c > com
The I2C communication interface.
ConversationVector & addInputVector(std::size_t len)
Creates a new ConversationVector for fixed length input and initializes it with the given length...
ISL29125(std::unique_ptr< duds::hardware::interface::I2c > &c)
Prepares to communicate with the device, but does not initalize the device.
~ISL29125()
Calls suspend().
duds::hardware::interface::Conversation initialize
Output used to initialize the device.
void suspend()
Suspends operation by putting the device into a low-power mode.
move_impl move(unsigned int c, unsigned int r)
Display stream manipulator that moves the display cursor to the given location.
std::uint16_t b
Blue brightness.
An attempt was made to use a device prior to running a required initialization step.
std::uint16_t g
Green brightness.
static std::wstring_convert< std::codecvt_utf8< char32_t >, char32_t > conv
String converter; UTF-8 to/from UTF-32.
void sample()
The device takes about 101ms to produce a 16-bit sample per color.
std::uint16_t r
Red brightness.
ConversationVector & addOutputVector()
Creates a new ConversationVector for output and returns it for modification.
void resume()
Resumes operation after a call to suspend().
duds::hardware::interface::Conversation input
Used to read in the sampled data.
bool empty() const
Returns true if the conversation has no parts.
#define DUDS_THROW_EXCEPTION(x)
Works like BOOST_THROW_EXCEPTION, but includes a stack trace if DUDS_ERRORS_VERBOSE is defined...
Represents a two-way conversation with a device.