|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "mcu_periph/spi.h"#include "modules/core/threads.h"#include <stdbool.h>#include <math.h>
Include dependency graph for pmw3901.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | pmw3901_t |
Macros | |
| #define | SPI_BUFFER_SIZE 8 |
Enumerations | |
| enum | pmw3901_state { PMW3901_IDLE , PMW3901_READ_MOTION , PMW3901_READ_DELTAXHIGH , PMW3901_READ_DELTAXLOW , PMW3901_READ_DELTAYHIGH , PMW3901_READ_DELTAYLOW } |
Functions | |
| void | pmw3901_init (struct pmw3901_t *pmw, struct spi_periph *periph, uint8_t slave_idx) |
| bool | pmw3901_get_data (struct pmw3901_t *pmw, int16_t *delta_x, int16_t *delta_y) |
| struct pmw3901_t |
Collaboration diagram for pmw3901_t:| Data Fields | ||
|---|---|---|
| pprz_bsem_t | bsem | |
| bool | data_available | |
| int16_t | delta_x | |
| int16_t | delta_y | |
| struct spi_periph * | periph | |
| float | rad_per_px | |
| uint8_t | readwrite_state | |
| uint32_t | readwrite_timeout | |
| volatile uint8_t | spi_input_buf[SPI_BUFFER_SIZE] | |
| volatile uint8_t | spi_output_buf[SPI_BUFFER_SIZE] | |
| enum pmw3901_state | state | |
| pprz_thread_t | thd_handle | |
| struct spi_transaction | trans | |
Definition at line 260 of file pmw3901.c.
References pmw3901_t::data_available, pmw3901_t::delta_x, and pmw3901_t::delta_y.
Referenced by opticflow_pmw3901_event().
Here is the caller graph for this function:| void pmw3901_init | ( | struct pmw3901_t * | pmw, |
| struct spi_periph * | periph, | ||
| uint8_t | slave_idx | ||
| ) |
Definition at line 232 of file pmw3901.c.
References spi_transaction::after_cb, spi_transaction::before_cb, spi_transaction::bitorder, pmw3901_t::bsem, spi_transaction::cdiv, spi_transaction::cpha, spi_transaction::cpol, pmw3901_t::data_available, pmw3901_t::delta_x, pmw3901_t::delta_y, spi_transaction::dss, foo, initializeSensor(), spi_transaction::input_buf, spi_transaction::output_buf, pmw3901_t::periph, PMW3901_IDLE, PMW3901_RAD_PER_PX, PMW3901_SPI_CDIV, pmw3901_thd(), pprz_bsem_init(), PPRZ_NORMAL_PRIO, pprz_thread_create(), pmw3901_t::rad_per_px, spi_transaction::select, spi_transaction::slave_idx, pmw3901_t::spi_input_buf, pmw3901_t::spi_output_buf, SPICphaEdge2, SPICpolIdleHigh, SPIDss8bit, SPIMSBFirst, SPINoSelect, SPITransDone, pmw3901_t::state, spi_transaction::status, pmw3901_t::thd_handle, and pmw3901_t::trans.
Referenced by opticflow_pmw3901_init().
Here is the call graph for this function:
Here is the caller graph for this function: