sensor: eeprom: Add TMP116 EEPROM access
eeprom access is supported by using either custom or eeprom API Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
This commit is contained in:
parent
918f0aac19
commit
972e5d0274
9 changed files with 209 additions and 1 deletions
21
include/drivers/sensor/tmp116.h
Normal file
21
include/drivers/sensor/tmp116.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Innoseis B.V
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP116_H_
|
||||
#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP116_H_
|
||||
|
||||
#include <device.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define EEPROM_TMP116_SIZE (4 * sizeof(uint16_t))
|
||||
|
||||
int tmp116_eeprom_read(const struct device *dev, off_t offset, void *data,
|
||||
size_t len);
|
||||
|
||||
int tmp116_eeprom_write(const struct device *dev, off_t offset,
|
||||
const void *data, size_t len);
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_TMP116_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue