11#include "sygsp-delay.hpp"
12#include "sygsp-icm20948_registers.hpp"
14namespace sygaldry {
namespace sygsp {
30template<
typename Serif, u
int8_t i2c_address>
36 [[nodiscard]]
static uint8_t
read(uint8_t register_address)
38 Registers::I2C_SLV4_ADDR::write(1<<8 | i2c_address);
39 Registers::I2C_SLV4_REG::write(register_address);
40 Registers::I2C_SLV4_CTRL::I2C_SLV4_EN::trigger();
42 return Registers::I2C_SLV4_DI::read();
46 static void write(uint8_t register_address, uint8_t value)
48 Registers::I2C_SLV4_ADDR::write(1<<8 | i2c_address);
49 Registers::I2C_SLV4_REG::write(register_address);
50 Registers::I2C_SLV4_DO::write(value);
51 Registers::I2C_SLV4_CTRL::I2C_SLV4_EN::trigger();
void delay(unsigned long ms)
Definition sygsa-delay.cpp:14
Definition sygsp-icm20948_aux_serif.hpp:32
static void write(uint8_t register_address, uint8_t value)
Write one byte.
Definition sygsp-icm20948_aux_serif.hpp:46
static uint8_t read(uint8_t register_address)
Read one byte and return it.
Definition sygsp-icm20948_aux_serif.hpp:36
Definition sygsp-icm20948_registers.hpp:27