ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_adc_photo.c File Reference

Go to the source code of this file.

Macros

#define ADC_PHOTO_USE_CHANNEL   1
 
#define ADC_PHOTO_USE_DIVIDER   1.00f
 
#define ADC_PHOTO_USE_VDD   3.60f
 
#define ADC_PHOTO_DATA_COUNTER   1
 
#define ADC_PHOTO_DEFAULT_BITFIELD   0
 
#define ADC_PHOTO_ENABLE_BYTE   1
 
#define ADC_PHOTO_VOLTS_TO_LUX   1333.00f
 

Functions

rd_status_t ri_adc_photo_samplerate_set (uint8_t *samplerate)
 rd_sensor_setup_fp More...
 
rd_status_t ri_adc_photo_resolution_set (uint8_t *resolution)
 rd_sensor_setup_fp More...
 
rd_status_t ri_adc_photo_scale_set (uint8_t *scale)
 rd_sensor_setup_fp More...
 
rd_status_t ri_adc_photo_dsp_set (uint8_t *dsp, uint8_t *parameter)
 rd_sensor_dsp_fp More...
 
rd_status_t ri_adc_photo_dsp_get (uint8_t *dsp, uint8_t *parameter)
 rd_sensor_dsp_fp More...
 
rd_status_t ri_adc_photo_init (rd_sensor_t *environmental_sensor, rd_bus_t bus, uint8_t handle)
 rd_sensor_init_fp More...
 
rd_status_t ri_adc_photo_uninit (rd_sensor_t *sensor, rd_bus_t bus, uint8_t handle)
 rd_sensor_init_fp More...
 
rd_status_t ri_adc_photo_mode_set (uint8_t *mode)
 rd_sensor_setup_fp More...
 
rd_status_t ri_adc_photo_mode_get (uint8_t *mode)
 rd_sensor_setup_fp More...
 
rd_status_t ri_adc_photo_data_get (rd_sensor_data_t *const p_data)
 rd_sensor_data_fp More...
 

Variables

float m_luminosity
 

Detailed Description

Author
Oleg Protasevich
Date
2020-06-05

ADC_PHOTO sensor driver.

Definition in file ruuvi_interface_adc_photo.c.

Macro Definition Documentation

◆ ADC_PHOTO_DATA_COUNTER

#define ADC_PHOTO_DATA_COUNTER   1

Definition at line 44 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_DEFAULT_BITFIELD

#define ADC_PHOTO_DEFAULT_BITFIELD   0

Definition at line 45 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_ENABLE_BYTE

#define ADC_PHOTO_ENABLE_BYTE   1

Definition at line 46 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_USE_CHANNEL

#define ADC_PHOTO_USE_CHANNEL   1

Definition at line 29 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_USE_DIVIDER

#define ADC_PHOTO_USE_DIVIDER   1.00f

Definition at line 35 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_USE_VDD

#define ADC_PHOTO_USE_VDD   3.60f

Definition at line 41 of file ruuvi_interface_adc_photo.c.

◆ ADC_PHOTO_VOLTS_TO_LUX

#define ADC_PHOTO_VOLTS_TO_LUX   1333.00f

Definition at line 47 of file ruuvi_interface_adc_photo.c.

Function Documentation

◆ ri_adc_photo_data_get()

rd_status_t ri_adc_photo_data_get ( rd_sensor_data_t *const  p_data)

rd_sensor_data_fp

Definition at line 304 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_dsp_get()

rd_status_t ri_adc_photo_dsp_get ( uint8_t *  dsp,
uint8_t *  parameter 
)

rd_sensor_dsp_fp

Definition at line 152 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_dsp_set()

rd_status_t ri_adc_photo_dsp_set ( uint8_t *  dsp,
uint8_t *  parameter 
)

rd_sensor_dsp_fp

Definition at line 128 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_init()

rd_status_t ri_adc_photo_init ( rd_sensor_t environmental_sensor,
rd_bus_t  bus,
uint8_t  handle 
)

rd_sensor_init_fp

Definition at line 161 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_mode_get()

rd_status_t ri_adc_photo_mode_get ( uint8_t *  mode)

rd_sensor_setup_fp

Definition at line 280 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_mode_set()

rd_status_t ri_adc_photo_mode_set ( uint8_t *  mode)

rd_sensor_setup_fp

Definition at line 234 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_resolution_set()

rd_status_t ri_adc_photo_resolution_set ( uint8_t *  resolution)

rd_sensor_setup_fp

Definition at line 114 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_samplerate_set()

rd_status_t ri_adc_photo_samplerate_set ( uint8_t *  samplerate)

rd_sensor_setup_fp

Definition at line 107 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_scale_set()

rd_status_t ri_adc_photo_scale_set ( uint8_t *  scale)

rd_sensor_setup_fp

Definition at line 121 of file ruuvi_interface_adc_photo.c.

◆ ri_adc_photo_uninit()

rd_status_t ri_adc_photo_uninit ( rd_sensor_t sensor,
rd_bus_t  bus,
uint8_t  handle 
)

rd_sensor_init_fp

Definition at line 213 of file ruuvi_interface_adc_photo.c.

Variable Documentation

◆ m_luminosity

float m_luminosity

Definition at line 75 of file ruuvi_interface_adc_photo.c.