8 #if RI_LIS2DH12_ENABLED
19 uint8_t * reg_data, uint16_t len)
22 uint8_t dev_id = * ( (uint8_t *) dev_ptr);
28 if (len > 1) { reg_addr |= 0x40; }
40 uint8_t * reg_data, uint16_t len)
43 uint8_t dev_id = * ( (uint8_t *) dev_ptr);
49 if (len > 1) { reg_addr |= 0x40; }
uint32_t rd_status_t
bitfield for representing errors
#define RD_SUCCESS
Internal Error.
rd_status_t ri_gpio_write(const ri_gpio_id_t pin, const ri_gpio_state_t state)
Write a pin of a port into given state If there are several ports the platform driver must implement ...
#define RD_HANDLE_TO_GPIO(handle)
convert uint8_t into Ruuvi GPIO
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
Ruuvi sensor interface Lifecycle: Beta
uint16_t ri_gpio_id_t
port<<8 + pin
@ RI_GPIO_LOW
GPIO electrically low.
@ RI_GPIO_HIGH
GPIO electrically high.
Interface for SPI operations.
rd_status_t ri_spi_xfer_blocking(const uint8_t *const p_tx, const size_t tx_len, uint8_t *const p_rx, const size_t rx_len)
SPI transfer 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)