1
0
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:
Juan Carrano 2018-09-10 15:21:09 +02:00 committed by danpetry
parent b99bd67efd
commit 5604abcedc
2 changed files with 32 additions and 1 deletions

View 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 */

View File

@ -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