Loading...
Searching...
No Matches

Device driver for the AMS TSL4531 sensor. More...

Detailed Description

Device driver for the AMS TSL4531 sensor.

Author
Juan I Carrano j.car.nosp@m.rano.nosp@m.@fu-b.nosp@m.erli.nosp@m.n.de
Daniel Petry danie.nosp@m.l.pe.nosp@m.try@f.nosp@m.u-be.nosp@m.rlin..nosp@m.de

Definition in file tsl4531x.h.

#include <stdint.h>
#include "periph/i2c.h"
+ Include dependency graph for tsl4531x.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tsl4531x_params_t
 Device initialization parameters. More...
 
struct  tsl4531x_t
 Device descriptor. More...
 

Enumerations

enum  tsl4531x_intgn_time_t { TSL4531X_INTEGRATE_400MS = 0 , TSL4531X_INTEGRATE_200MS = 1 , TSL4531X_INTEGRATE_100MS = 2 }
 Integration times. More...
 

Functions

int tsl4531x_init (tsl4531x_t *dev, const tsl4531x_params_t *params)
 Initialize the TSL4531x device.
 
int tsl4531x_set_low_power_mode (tsl4531x_t *dev, uint8_t low_power_on)
 Set the low power mode of the driver on or off.
 
int tsl4531x_start_sample (tsl4531x_t *dev)
 Start collecting sample in low power mode.
 
uint32_t tsl4531x_time_until_sample_ready (tsl4531x_t *dev)
 Deliver time in microseconds until sample is ready, or zero if it is ready.
 
int tsl4531x_get_sample (const tsl4531x_t *dev)
 Reads the sample from the device immediately.
 
int tsl4531x_simple_read (tsl4531x_t *dev)
 Reads the sample from the device.
 

Fixed values for different members of the TSL4531x series

Part numbers

#define TSL45311_PARTNO   (0x8)
 
#define TSL45313_PARTNO   (0x9)
 
#define TSL45315_PARTNO   (0xA)
 
#define TSL45317_PARTNO   (0xB)
 
#define TSL45311_ADDR   (0x39)
 TSL4531x I2C addresses.
 
#define TSL45313_ADDR   (0x39)
 
#define TSL45315_ADDR   (0x29)
 
#define TSL45317_ADDR   (0x29)