Appiko
|
Light sensing based on sensing the charge accumulated due to the incident light on a reverse biased LED. More...
Functions | |
void | led_sense_init (uint32_t led_out_pin, uint32_t led_sense_analog_pin, uint32_t led_off_val) |
Initialize the LED light sensing module. More... | |
uint32_t | led_sense_get (void) |
Get the light value by measuring the voltage a LED's anode. More... | |
void | led_sense_cfg_input (bool is_input_on) |
Configure the LED as either an light sensing input device or as an light emitting actuation device. More... | |
void led_sense_cfg_input | ( | bool | is_input_on | ) |
is_input_on | Is input if true and output if false |
Definition at line 38 of file led_sense.c.
uint32_t led_sense_get | ( | void | ) |
Definition at line 55 of file led_sense.c.
References SIMPLE_ADC_GAIN1_6, and simple_adc_get_value().
void led_sense_init | ( | uint32_t | led_out_pin, |
uint32_t | led_sense_analog_pin, | ||
uint32_t | led_off_val | ||
) |
led_out_pin | The pin driving the LED |
led_sense_analog_pin | The pin at LED's anode to sense light |
led_off_val | The digital value at led_out_pin to switch off the LED. |
Definition at line 27 of file led_sense.c.
References ASSERT.