|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for ST LSM303D 3D accelerometer and magnetometer. More...
#include "std.h"#include "mcu_periph/spi.h"#include "math/pprz_algebra_int.h"#include "peripherals/lsm303d.h"
Include dependency graph for lsm303d_spi.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | Lsm303d_Spi |
| union | Lsm303d_Spi.data_accel |
| union | Lsm303d_Spi.data_mag |
Functions | |
| void | lsm303d_spi_init (struct Lsm303d_Spi *lsm, struct spi_periph *spi_p, uint8_t slave_idx, enum Lsm303dTarget target) |
| void | lsm303d_spi_start_configure (struct Lsm303d_Spi *lsm) |
| void | lsm303d_spi_read (struct Lsm303d_Spi *lsm) |
| void | lsm303d_spi_event (struct Lsm303d_Spi *lsm) |
| static void | lsm303d_spi_periodic (struct Lsm303d_Spi *lsm) |
| convenience function: read or start configuration if not already initialized | |
Driver for ST LSM303D 3D accelerometer and magnetometer.
Definition in file lsm303d_spi.h.
| struct Lsm303d_Spi |
Definition at line 37 of file lsm303d_spi.h.
Collaboration diagram for Lsm303d_Spi:| Data Fields | ||
|---|---|---|
| struct Lsm303dConfig | conf | |
| union Lsm303d_Spi.data_accel | data_accel | |
| volatile bool | data_available_acc | data ready flag accelero |
| volatile bool | data_available_mag | data ready flag magneto |
| union Lsm303d_Spi.data_mag | data_mag | |
| enum Lsm303dConfStatus | init_status | |
| bool | initialized | config done flag |
| volatile uint8_t | rx_buf[8] | |
| struct spi_periph * | spi_p | |
| struct spi_transaction | spi_trans | |
| enum Lsm303dTarget | target | |
| volatile uint8_t | tx_buf[2] | |
| union Lsm303d_Spi.data_accel |
Definition at line 47 of file lsm303d_spi.h.
| Data Fields | ||
|---|---|---|
| int16_t | value[3] | data values accessible by channel index |
| struct Int16Vect3 | vect | data vector in acc coordinate system |
| union Lsm303d_Spi.data_mag |
Definition at line 51 of file lsm303d_spi.h.
| Data Fields | ||
|---|---|---|
| int16_t | value[3] | data values accessible by channel index |
| struct Int16Vect3 | vect | data vector in mag coordinate system |
|
extern |
Definition at line 176 of file lsm303d_spi.c.
References foo, Int16FromBuf, LSM303D_CONF_UNINIT, lsm303d_spi_send_config(), LSM303D_TARGET_ACC, LSM303D_ZYXADA, LSM303D_ZYXMDA, SPITransDone, SPITransFailed, SPITransSuccess, and TRUE.
Referenced by imu_px4_event().
Here is the call graph for this function:
Here is the caller graph for this function:
|
extern |
Definition at line 32 of file lsm303d_spi.c.
References FALSE, foo, LSM303D_CONF_UNINIT, lsm303d_set_default_config(), SPICphaEdge2, SPICpolIdleHigh, SPIDiv64, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, SPITransDone, and target.
Referenced by imu_px4_init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
convenience function: read or start configuration if not already initialized
Definition at line 68 of file lsm303d_spi.h.
References foo, lsm303d_spi_read(), and lsm303d_spi_start_configure().
Referenced by imu_px4_periodic().
Here is the call graph for this function:
Here is the caller graph for this function:
|
extern |
Definition at line 151 of file lsm303d_spi.c.
References foo, LSM303D_REG_STATUS_A, LSM303D_REG_STATUS_M, LSM303D_TARGET_ACC, spi_submit(), and SPITransDone.
Referenced by lsm303d_spi_periodic().
Here is the call graph for this function:
Here is the caller graph for this function:
|
extern |
Definition at line 140 of file lsm303d_spi.c.
References foo, LSM303D_CONF_UNINIT, lsm303d_spi_send_config(), SPITransDone, and SPITransSuccess.
Referenced by lsm303d_spi_periodic().
Here is the call graph for this function:
Here is the caller graph for this function: