|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
enum SPIClockPolarity cpol
clock polarity control
void ms5611_spi_periodic_check(struct Ms5611_Spi *ms)
Periodic function to ensure proper delay after triggering reset or conversion.
bool ms5611_prom_crc_ok(uint16_t *prom)
Check if CRC of PROM data is OK.
bool is_ms5607
TRUE if MS5607, FALSE if MS5611.
uint16_t output_length
number of data words to write
volatile uint8_t rx_buf[4]
@ SPISelectUnselect
slave is selected before transaction and unselected after
enum SPIBitOrder bitorder
MSB/LSB order.
volatile bool data_available
data ready flag
bool ms5611_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5611.
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
SPI peripheral structure.
enum SPISlaveSelect select
slave selection behavior
#define MS5611_START_CONV_D2
enum SPIClockPhase cpha
clock phase control
SPICallback after_cb
NULL or function called after the transaction.
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit SPI transaction.
@ MS5611_STATUS_CONV_D1_OK
int32_t prom_cnt
number of bytes read from PROM
bool initialized
config done flag
#define MS5611_SOFT_RESET
@ SPICpolIdleHigh
CPOL = 1.
struct spi_periph * spi_p
@ MS5611_STATUS_CONV_D2_OK
bool ms5607_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5607.
if(GpsFixValid() &&e_identification_started)
struct spi_transaction spi_trans
uint16_t input_length
number of data words to read
void ms5611_spi_start_configure(struct Ms5611_Spi *ms)
enum SPIDataSizeSelect dss
data transfer word size
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
volatile uint8_t * input_buf
pointer to receive buffer for DMA
void ms5611_spi_start_conversion(struct Ms5611_Spi *ms)
SPICallback before_cb
NULL or function called before the transaction.
void ms5611_spi_event(struct Ms5611_Spi *ms)
#define MS5611_START_CONV_D1
enum SPITransactionStatus status
volatile uint8_t tx_buf[1]
void ms5611_spi_init(struct Ms5611_Spi *ms, struct spi_periph *spi_p, uint8_t slave_idx, bool is_ms5607)