Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
mpu9250_spi.c File Reference
+ Include dependency graph for mpu9250_spi.c:

Go to the source code of this file.

Macros

#define Int16FromBuf(_buf, _idx)   ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
 

Functions

void mpu9250_spi_init (struct Mpu9250_Spi *mpu, struct spi_periph *spi_p, uint8_t slave_idx)
 
static void mpu9250_spi_write_to_reg (void *mpu, uint8_t _reg, uint8_t _val)
 
void mpu9250_spi_start_configure (struct Mpu9250_Spi *mpu)
 
void mpu9250_spi_read (struct Mpu9250_Spi *mpu)
 
void mpu9250_spi_event (struct Mpu9250_Spi *mpu)
 
bool mpu9250_configure_i2c_slaves (Mpu9250ConfigSet mpu_set, void *mpu)
 configure the registered I2C slaves More...
 

Detailed Description

Driver for the MPU-9250 using SPI.

Definition in file mpu9250_spi.c.

Macro Definition Documentation

◆ Int16FromBuf

#define Int16FromBuf (   _buf,
  _idx 
)    ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))

Definition at line 107 of file mpu9250_spi.c.

Function Documentation

◆ mpu9250_configure_i2c_slaves()

◆ mpu9250_spi_event()

◆ mpu9250_spi_init()

◆ mpu9250_spi_read()

void mpu9250_spi_read ( struct Mpu9250_Spi mpu)

◆ mpu9250_spi_start_configure()

◆ mpu9250_spi_write_to_reg()

static void mpu9250_spi_write_to_reg ( void *  mpu,
uint8_t  _reg,
uint8_t  _val 
)
static

Definition at line 66 of file mpu9250_spi.c.

References spi_transaction::input_length, spi_transaction::output_length, Mpu9250_Spi::spi_p, spi_submit(), Mpu9250_Spi::spi_trans, and Mpu9250_Spi::tx_buf.

Referenced by mpu9250_spi_event(), and mpu9250_spi_start_configure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: