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