ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_spi_lis2dh12.h
Go to the documentation of this file.
1 
8 #ifndef RUUVI_INTERFACE_SPI_LIS2DH12_H
9 #define RUUVI_INTERFACE_SPI_LIS2DH12_H
10 #include "ruuvi_driver_error.h"
11 #include <stdbool.h>
12 #include <stddef.h>
13 #include <stdint.h>
14 
15 // Wrappers for LIS2DH12
16 int32_t ri_spi_lis2dh12_write (void * dev_ptr, uint8_t reg_addr,
17  uint8_t * reg_data, uint16_t len);
18 int32_t ri_spi_lis2dh12_read (void * dev_ptr, uint8_t reg_addr,
19  uint8_t * reg_data, uint16_t len);
20 
21 #endif
Ruuvi error codes and error check function.
int32_t ri_spi_lis2dh12_write(void *dev_ptr, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)
int32_t ri_spi_lis2dh12_read(void *dev_ptr, uint8_t reg_addr, uint8_t *reg_data, uint16_t len)