Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
mpu60x0_spi.c File Reference

Driver for the MPU-60X0 using SPI. More...

Include dependency graph for mpu60x0_spi.c:

Go to the source code of this file.

Macros

#define Int16FromBuf(_buf, _idx)

Functions

void mpu60x0_spi_init (struct Mpu60x0_Spi *mpu, struct spi_periph *spi_p, uint8_t slave_idx)
static void mpu60x0_spi_write_to_reg (void *mpu, uint8_t _reg, uint8_t _val)
void mpu60x0_spi_start_configure (struct Mpu60x0_Spi *mpu)
void mpu60x0_spi_read (struct Mpu60x0_Spi *mpu)
void mpu60x0_spi_event (struct Mpu60x0_Spi *mpu)
bool mpu60x0_configure_i2c_slaves (Mpu60x0ConfigSet mpu_set, void *mpu)
 configure the registered I2C slaves

Detailed Description

Driver for the MPU-60X0 using SPI.

Definition in file mpu60x0_spi.c.

Macro Definition Documentation

◆ Int16FromBuf

#define Int16FromBuf ( _buf,
_idx )
Value:
((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
short int16_t
Typedef defining 16 bit short type.

Definition at line 127 of file mpu60x0_spi.c.

Referenced by mpu60x0_spi_event().

Function Documentation

◆ mpu60x0_configure_i2c_slaves()

◆ mpu60x0_spi_event()

◆ mpu60x0_spi_init()

◆ mpu60x0_spi_read()

◆ mpu60x0_spi_start_configure()

◆ mpu60x0_spi_write_to_reg()

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

Definition at line 66 of file mpu60x0_spi.c.

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

Referenced by mpu60x0_spi_event(), and mpu60x0_spi_start_configure().

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