|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Include dependency graph for pmw3901.c:Go to the source code of this file.
Macros | |
| #define | PMW3901_RAD_PER_PX 0.002443389 |
| #define | PMW3901_SPI_CDIV SPIDiv32 |
| #define | PMW3901_REG_MOTION 0x02 |
| #define | PMW3901_REG_DELTA_X_L 0x03 |
| #define | PMW3901_REG_DELTA_X_H 0x04 |
| #define | PMW3901_REG_DELTA_Y_L 0x05 |
| #define | PMW3901_REG_DELTA_Y_H 0x06 |
| #define | writeRegister(_addr, _data) writeRegister_blocking(pmw, (_addr), (_data)) |
| #define | readRegister(_addr) readRegister_blocking(pmw, (_addr)) |
| #define | wait_ms(_ms) sys_time_usleep((_ms) * 1000) |
Functions | |
| static uint8_t | readRegister_blocking (struct pmw3901_t *pmw, uint8_t addr) |
| static void | writeRegister_blocking (struct pmw3901_t *pmw, uint8_t addr, uint8_t data) |
| static void | initializeSensor (struct pmw3901_t *pmw) |
| static void | pmw3901_thd (void *arg) |
| 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) |
| #define readRegister | ( | _addr | ) | readRegister_blocking(pmw, (_addr)) |
Definition at line 104 of file pmw3901.c.
References foo, readRegister, spi_slave_select(), spi_slave_unselect(), sys_time_usleep(), wait_ms, and writeRegister.
Referenced by pmw3901_init().
Here is the call graph for this function:
Here is the caller graph for this function: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:Definition at line 211 of file pmw3901.c.
References pmw3901_t::bsem, pmw3901_t::data_available, pmw3901_t::delta_x, pmw3901_t::delta_y, foo, PMW3901_REG_DELTA_X_H, PMW3901_REG_DELTA_X_L, PMW3901_REG_DELTA_Y_H, PMW3901_REG_DELTA_Y_L, PMW3901_REG_MOTION, pprz_bsem_wait(), and readRegister_blocking().
Referenced by pmw3901_init().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 55 of file pmw3901.c.
References foo, spi_transaction::input_buf, spi_transaction::input_length, spi_transaction::output_buf, spi_transaction::output_length, pmw3901_t::periph, spi_transaction::select, spi_blocking_transceive(), spi_slave_select(), spi_slave_unselect(), SPINoSelect, sys_time_usleep(), and pmw3901_t::trans.
Referenced by pmw3901_thd().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 77 of file pmw3901.c.
References foo, spi_transaction::input_length, spi_transaction::output_buf, spi_transaction::output_length, pmw3901_t::periph, spi_transaction::select, spi_blocking_transceive(), spi_slave_select(), spi_slave_unselect(), SPINoSelect, sys_time_usleep(), and pmw3901_t::trans.
Here is the call graph for this function: