Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for LIS302DL 3-axis accelerometer from ST using SPI. More...
#include "peripherals/lis302dl_spi.h"
Go to the source code of this file.
Functions | |
void | lis302dl_spi_init (struct Lis302dl_Spi *lis, struct spi_periph *spi_p, uint8_t slave_idx) |
static void | lis302dl_spi_write_to_reg (struct Lis302dl_Spi *lis, uint8_t _reg, uint8_t _val) |
static void | lis302dl_spi_send_config (struct Lis302dl_Spi *lis) |
void | lis302dl_spi_start_configure (struct Lis302dl_Spi *lis) |
void | lis302dl_spi_read (struct Lis302dl_Spi *lis) |
void | lis302dl_spi_event (struct Lis302dl_Spi *lis) |
Driver for LIS302DL 3-axis accelerometer from ST using SPI.
Definition in file lis302dl_spi.c.
void lis302dl_spi_event | ( | struct Lis302dl_Spi * | lis | ) |
Definition at line 139 of file lis302dl_spi.c.
References Lis302dl_Spi::data, Lis302dl_Spi::data_available, Lis302dl_Spi::init_status, Lis302dl_Spi::initialized, lis302dl_spi_send_config(), LIS302DL_WHO_AM_I, LIS_CONF_UNINIT, LIS_CONF_WHO_AM_I, LIS_CONF_WHO_AM_I_OK, Lis302dl_Spi::rx_buf, Lis302dl_Spi::spi_trans, SPITransDone, SPITransFailed, SPITransSuccess, and spi_transaction::status.
void lis302dl_spi_init | ( | struct Lis302dl_Spi * | lis, |
struct spi_periph * | spi_p, | ||
uint8_t | slave_idx | ||
) |
Definition at line 30 of file lis302dl_spi.c.
References spi_transaction::after_cb, spi_transaction::before_cb, spi_transaction::bitorder, spi_transaction::cdiv, Lis302dl_Spi::config, spi_transaction::cpha, spi_transaction::cpol, Lis302dl_Spi::data_available, spi_transaction::dss, Lis302dl_Spi::init_status, Lis302dl_Spi::initialized, spi_transaction::input_buf, spi_transaction::input_length, lis302dl_set_default_config(), LIS_CONF_UNINIT, spi_transaction::output_buf, spi_transaction::output_length, Lis302dl_Spi::rx_buf, spi_transaction::select, spi_transaction::slave_idx, Lis302dl_Spi::spi_p, Lis302dl_Spi::spi_trans, SPICphaEdge2, SPICpolIdleHigh, SPIDiv64, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, SPITransDone, spi_transaction::status, and Lis302dl_Spi::tx_buf.
void lis302dl_spi_read | ( | struct Lis302dl_Spi * | lis | ) |
Definition at line 128 of file lis302dl_spi.c.
References Lis302dl_Spi::initialized, spi_transaction::input_length, LIS302DL_REG_STATUS, spi_transaction::output_length, Lis302dl_Spi::spi_p, spi_submit(), Lis302dl_Spi::spi_trans, SPITransDone, spi_transaction::status, and Lis302dl_Spi::tx_buf.
Referenced by lis302dl_spi_periodic().
|
static |
Definition at line 74 of file lis302dl_spi.c.
References Lis302dl_Spi::config, Lis302dlConfig::filt_data, Lis302dl_Spi::init_status, Lis302dl_Spi::initialized, spi_transaction::input_length, Lis302dlConfig::int_invert, LIS302DL_REG_CTRL_REG1, LIS302DL_REG_CTRL_REG2, LIS302DL_REG_CTRL_REG3, LIS302DL_REG_WHO_AM_I, lis302dl_spi_write_to_reg(), LIS_CONF_DONE, LIS_CONF_ENABLE, LIS_CONF_REG2, LIS_CONF_REG3, LIS_CONF_WHO_AM_I, spi_transaction::output_length, Lis302dlConfig::range, Lis302dlConfig::rate, Lis302dlConfig::spi_3_wire, Lis302dl_Spi::spi_p, spi_submit(), Lis302dl_Spi::spi_trans, SPITransDone, spi_transaction::status, and Lis302dl_Spi::tx_buf.
Referenced by lis302dl_spi_event(), and lis302dl_spi_start_configure().
void lis302dl_spi_start_configure | ( | struct Lis302dl_Spi * | lis | ) |
Definition at line 118 of file lis302dl_spi.c.
References Lis302dl_Spi::init_status, lis302dl_spi_send_config(), LIS_CONF_UNINIT, Lis302dl_Spi::spi_trans, SPITransDone, SPITransSuccess, and spi_transaction::status.
Referenced by lis302dl_spi_periodic().
|
static |
Definition at line 64 of file lis302dl_spi.c.
References spi_transaction::input_length, spi_transaction::output_length, Lis302dl_Spi::spi_p, spi_submit(), Lis302dl_Spi::spi_trans, and Lis302dl_Spi::tx_buf.
Referenced by lis302dl_spi_send_config().