63 BH1749(
int bus = 0,
int addr = 0x39);
323 void InstallISR(mraa_gpio_edge_t edge,
int pin,
void (*isr)(
void *),
void *isr_args);
uint16_t GetBlue()
Gets value of Blue color channel.
Definition: bh1749.cxx:244
void DisableInterrupt()
Disables interrupt mode.
Definition: bh1749.cxx:163
void InstallISR(mraa_gpio_edge_t edge, int pin, void(*isr)(void *), void *isr_args)
Installs the ISR to a given GPIO pin.
Definition: bh1749.cxx:282
void RemoveISR()
Removes the ISR if it is installed.
Definition: bh1749.cxx:289
int GetThresholdLow()
Gets threshold low value.
Definition: bh1749.cxx:217
bool IsInterruptEnabled()
Gets interrupt mode status.
Definition: bh1749.cxx:182
The full sensor context.
Definition: bh1749.h:93
char GetInterruptSourceChar()
Gets interrupt source value.
Definition: bh1749.cxx:147
void SetIrGain(IR_GAINS irGain)
Sets IR gain value.
Definition: bh1749.cxx:124
void ResetInterrupt()
Resets interrupt status (clear) to allow new interrupt reads.
Definition: bh1749.cxx:170
void SetMeasurementTime(MEAS_TIMES measTime)
Sets measurement time (ODR)
Definition: bh1749.cxx:92
int GetMeasurementTime()
Gets measurement time (ODR) value.
Definition: bh1749.cxx:99
C API for the bh1749 driver.
RGB_GAINS
RGB gain choices.
Definition: bh1749.h:68
bool IsInterrupted()
Gets interrupt status, whether interrupt is raised or not.
Definition: bh1749.cxx:177
BH1749(int bus=0, int addr=0x39)
Initialize a sensor instance with bus and address.
Definition: bh1749.cxx:39
uint16_t GetGeen2()
Gets value of Green2 color channel.
Definition: bh1749.cxx:262
int GetRgbGain()
Gets RGB gain value.
Definition: bh1749.cxx:115
void SoftReset()
Initiates a software reset to the sensor. All register values will be written to their defaults...
Definition: bh1749.cxx:187
void SetThresholdLow(uint16_t threshold)
Sets threshold low value.
Definition: bh1749.cxx:210
Definition: bh1749.hpp:50
void EnableInterrupt()
Enables interrupt mode.
Definition: bh1749.cxx:156
uint16_t GetGreen()
Gets value of Green color channel.
Definition: bh1749.cxx:235
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
OPERATING_MODES
Operation modes enum for interrupt modes (persistance)
Definition: bh1749.h:49
void SensorInit(OPERATING_MODES opMode, MEAS_TIMES measTime, RGB_GAINS rgbGain, IR_GAINS irGain, INT_SOURCES intSource)
Initializes (writes) configuration values to sensor.
Definition: bh1749.cxx:65
uint16_t GetIr()
Gets value of IR color channel.
Definition: bh1749.cxx:253
std::vector< uint16_t > GetMeasurements()
Gets all channels measurements values.
Definition: bh1749.cxx:271
void SetThresholdHigh(uint16_t threshold)
Sets threshold high value.
Definition: bh1749.cxx:194
IR_GAINS
IR gain choices.
Definition: bh1749.h:76
int GetThresholdHigh()
Gets threshold high value.
Definition: bh1749.cxx:201
void SetRgbGain(RGB_GAINS rgbGain)
Sets RGB gain value.
Definition: bh1749.cxx:108
void SetOperatingMode(OPERATING_MODES opMode)
Sets operating mode (interrupt persistance)
Definition: bh1749.cxx:76
uint16_t GetRed()
Gets value of Red color channel.
Definition: bh1749.cxx:226
MEAS_TIMES
Measuremnt time choices.
Definition: bh1749.h:59
INT_SOURCES
Interrupt source choices.
Definition: bh1749.h:84
void Enable()
Enables RGB color measurement on the sensor.
Definition: bh1749.cxx:51
void CheckWhoAmI()
Check "who am I" register value to identify the sensor.
Definition: bh1749.cxx:32
int GetOperatingMode()
Gets operating mode (interrupt persistance) value.
Definition: bh1749.cxx:83
void SetIntSource(INT_SOURCES intSource)
Sets interrupt source value.
Definition: bh1749.cxx:140
std::string RegistersDump()
Gets a dump of configuration registers as a string.
Definition: bh1749.cxx:294
int GetIrGain()
Gets IR gain value.
Definition: bh1749.cxx:131
virtual ~BH1749()
Close and free sensor.
Definition: bh1749.cxx:46
void Disable()
Disables RGB color measurement on the sensor.
Definition: bh1749.cxx:58