2021-03-20 00:38:21 +08:00
|
|
|
/* ST Microelectronics STMEMS hal i/f
|
|
|
|
*
|
|
|
|
* Copyright (c) 2021 STMicroelectronics
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* zephyrproject-rtos/modules/hal/st/sensor/stmemsc/
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stmemsc.h"
|
|
|
|
|
2021-09-07 16:27:49 +08:00
|
|
|
int stmemsc_i2c_read(const struct i2c_dt_spec *stmemsc,
|
2021-03-20 00:38:21 +08:00
|
|
|
uint8_t reg_addr, uint8_t *value, uint8_t len)
|
|
|
|
{
|
2021-12-11 00:49:30 +08:00
|
|
|
return i2c_burst_read_dt(stmemsc, reg_addr, value, len);
|
2021-03-20 00:38:21 +08:00
|
|
|
}
|
|
|
|
|
2021-09-07 16:27:49 +08:00
|
|
|
int stmemsc_i2c_write(const struct i2c_dt_spec *stmemsc,
|
2021-03-20 00:38:21 +08:00
|
|
|
uint8_t reg_addr, uint8_t *value, uint8_t len)
|
|
|
|
{
|
2021-12-11 00:49:30 +08:00
|
|
|
return i2c_burst_write_dt(stmemsc, reg_addr, value, len);
|
2021-03-20 00:38:21 +08:00
|
|
|
}
|