mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/tsl4531x: Add SAUL driver.
This commit is contained in:
parent
b99bd67efd
commit
5604abcedc
31
drivers/include/tsl4531x_saul.h
Normal file
31
drivers/include/tsl4531x_saul.h
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Freie Universität Berlin
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup drivers_tsl4531x
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief SAUL interface for TSL4531 Luminosity sensor.
|
||||
*
|
||||
* @author Juan I Carrano <j.carrano@fu-berlin.de>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifndef TSL4531x_SAUL_H
|
||||
#define TSL4531x_SAUL_H
|
||||
|
||||
#include "saul.h"
|
||||
|
||||
/** SAUL-compatible structure for illuminance sensor
|
||||
*/
|
||||
const saul_driver_t tsl4531x_saul_driver;
|
||||
|
||||
#endif /* TSL4531x_SAUL_H */
|
||||
|
@ -34,7 +34,7 @@ static int _read(const void *dev, phydat_t *res)
|
||||
return nvals;
|
||||
}
|
||||
|
||||
const saul_driver_t tsl2561_illuminance_saul_driver = {
|
||||
const saul_driver_t tsl4531x_saul_driver = {
|
||||
.read = _read,
|
||||
.write = saul_notsup,
|
||||
.type = SAUL_SENSE_LIGHT
|
||||
|
Loading…
Reference in New Issue
Block a user