modm API documentation for STM32F107VCT7
|
Settings to configure the ams digital color sensor family tcs34721, -13, -15, 17. More...
#include <modm/driver/color/tcs3472.hpp>
Public Typedefs | |
typedef uint16_t | UnderlyingType |
datatype of color values | |
typedef color::RgbT< UnderlyingType > | Rgb |
Public Member Functions | |
Tcs3472 (uint8_t address=0x29) | |
bool | initializeBlocking () |
Power up sensor and start conversions. | |
modm::ResumableResult< bool > | setGain (const Gain gain=Gain::DEFAULT) |
The gain can be used to adjust the sensitivity of all ADC output channels. | |
modm::ResumableResult< bool > | refreshAllColors () |
Read current samples of ADC conversions for all channels. | |
modm::ResumableResult< bool > | initialize () |
modm::ResumableResult< bool > | configure (const Gain gain=Gain::DEFAULT, const uint8_t int_time=IntegrationTime::DEFAULT) |
![]() | |
I2cDevice (uint8_t address) | |
void | attachConfigurationHandler (I2c::ConfigurationHandler handler) |
modm::ResumableResult< bool > | ping () |
void | setAddress (uint8_t address) |
Static Public Member Functions | |
Return already sampled color | |
static Tcs3472::Rgb | getOldColors () |
Sample and return fresh color values | |
static Tcs3472::Rgb | getNewColors () |
Additional Inherited Members | |
![]() | |
bool | isTransactionRunning () |
modm::ResumableResult< bool > | runTransaction () |
Starts our own transaction and waits until finished. | |
bool | startRead (uint8_t *buffer, std::size_t size) |
Configures the transaction with a read operation and starts it. | |
bool | startTransaction () |
Starts the transaction with our own transaction object. | |
bool | startTransaction (modm::I2cTransaction *transaction) |
Starts the transaction with a seperate transaction object. | |
bool | startWrite (const uint8_t *buffer, std::size_t size) |
Configures the transaction with a write operation and starts it. | |
bool | startWriteRead (const uint8_t *writeBuffer, std::size_t writeSize, uint8_t *readBuffer, std::size_t readSize) |
Configures the transaction with a write/read operation and starts it. | |
bool | wasTransactionSuccessful () |
![]() | |
NestedResumable () | |
Construct a new class with nested resumable functions. | |
modm::ResumableResult< ReturnType > resumable | function (...) |
int8_t | getResumableDepth () const |
bool | isResumableRunning () const |
void | stopResumable () |
Force all resumable functions to stop running at the current nesting level. | |
![]() | |
I2cWriteReadTransaction | transaction |
Settings to configure the ams digital color sensor family tcs34721, -13, -15, 17.
Tcs3472X Digital Color Sensors.
Device Address tcs34721 0x39 (with IR filter) 3 0x39 (without IR filter) 5 0x29 (with IR filter) 7 0x29 (without IR filter)
|
strong |
|
strong |
|
strong |
Register addresses.
Enum Values | Documentation |
---|---|
ENABLE | Primarily to power up the device. |
TIMING | Integration time control.
|
ID | Part number. |
GAIN | Sensitivity settings.
|
LOW_THRESH_LOW_BYTE | Low byte of low interrupt threshold. |
LOW_THRESH_HIGH_BYTE | High byte of low interrupt threshold. |
HIGH_THRESH_LOW_BYTE | Low byte of high interrupt threshold. |
HIGH_THRESH_HIGH_BYTE | High byte of high interrupt threshold. |
CDATALOW | Low byte of ADC clear channel. |
CDATAHIGH | High byte of ADC clear channel. |
RDATALOW | Low byte of ADC red channel. |
RDATAHIGH | High byte of ADC red channel. |
GDATALOW | Low byte of ADC green channel. |
GDATAHIGH | High byte of ADC green channel. |
BDATALOW | Low byte of ADC blue channel. |
BDATAHIGH | High byte of ADC blue channel. |