Sensorian
1.0
C API Reference Guide Library
|
Functions | |
unsigned char | AL_Initialize (void) |
Powers on the sensor , sets sensor gain to 1x and clears any existing interrupts. More... | |
void | AL_PowerState (powerState state) |
Set the sensor power state to either POWER_ON or POWER_OFF. More... | |
unsigned char | AL_ChipID (void) |
Returns the CHIP id. More... | |
unsigned int | AL_ReadChannel (channel chan) |
Reads the value from one of the two photodiode channels. More... | |
float | AL_Lux (unsigned int ch0, unsigned int ch1) |
Computes LUX ambient light value from sensor data. More... | |
unsigned char | AL_SetGain (gain val) |
Set sensor gain. Default gain value is GAIN_1 or 1x. More... | |
void | AL_SetSamplingTime (sampTime_t sampling_time) |
Sets the sampling time for the sensor,can be one of three predetermined values. More... | |
void | AL_SetIntLowThreshold (unsigned int lowthreshvalue) |
Sets the low threshold value for the interrupt. More... | |
void | AL_SetIntHighThreshold (unsigned int highthreshvalue) |
Sets the high threshold value for the interrupt. More... | |
void | AL_Clear_Interrupt (void) |
Clear any existing interrupts. More... | |
void | AL_ConfigureInterrupt (unsigned char enable, unsigned char persistence) |
Enables or disables the interrupt and sets the persistence of interrupt occurences The interrupt will fire after x occurences outside the threshold values Default values are interrupts enabled and interrupts enabled. More... | |
These functions expose the capabilities of the APDS9300 ambient light sensor
unsigned char AL_ChipID | ( | void | ) |
void AL_Clear_Interrupt | ( | void | ) |
void AL_ConfigureInterrupt | ( | unsigned char | enable, |
unsigned char | persistence | ||
) |
Enables or disables the interrupt and sets the persistence of interrupt occurences The interrupt will fire after x occurences outside the threshold values Default values are interrupts enabled and interrupts enabled.
enable | Enables or disable interrupts 1/0 to enable/disable |
persistence | Value from 0 to 16 for value 0 interrupts occur after every sample |
Definition at line 196 of file APDS9300.c.
unsigned char AL_Initialize | ( | void | ) |
Powers on the sensor , sets sensor gain to 1x and clears any existing interrupts.
Definition at line 42 of file APDS9300.c.
float AL_Lux | ( | unsigned int | ch0, |
unsigned int | ch1 | ||
) |
Computes LUX ambient light value from sensor data.
ch0 | Channel 1 value |
ch1 | Channel 2 value |
Definition at line 103 of file APDS9300.c.
void AL_PowerState | ( | powerState | state | ) |
Set the sensor power state to either POWER_ON or POWER_OFF.
state | Power state of the sensor. |
Definition at line 54 of file APDS9300.c.
unsigned int AL_ReadChannel | ( | channel | chan | ) |
Reads the value from one of the two photodiode channels.
chan | Channel id |
Definition at line 77 of file APDS9300.c.
unsigned char AL_SetGain | ( | gain | val | ) |
Set sensor gain. Default gain value is GAIN_1 or 1x.
val | Gain type can be GAIN_1 or GAIN_16 for gain of 1x or 16x. |
Definition at line 126 of file APDS9300.c.
void AL_SetIntHighThreshold | ( | unsigned int | highthreshvalue | ) |
Sets the high threshold value for the interrupt.
highthreshvalue | Interrupt high threshold value |
Definition at line 174 of file APDS9300.c.
void AL_SetIntLowThreshold | ( | unsigned int | lowthreshvalue | ) |
Sets the low threshold value for the interrupt.
lowthreshvalue | Interrupt low threshold value |
Definition at line 164 of file APDS9300.c.
void AL_SetSamplingTime | ( | sampTime_t | sampling_time | ) |
Sets the sampling time for the sensor,can be one of three predetermined values.
sampling_time | can be 0x00,0x01,0x02 |
Definition at line 153 of file APDS9300.c.