29 #include "generated/airframe.h"
38 #ifndef INS_YAW_NEUTRAL_DEFAULT
39 #define INS_YAW_NEUTRAL_DEFAULT 0.
44 #define VN100_SPI_DEV spi1
48 #ifndef VN100_SLAVE_IDX
49 #define VN100_SLAVE_IDX 0
164 #ifndef INS_VN100_READ_ONLY
193 switch (last_received_packet.
RegID) {
308 #include "messages.h"
static void parse_ins_msg(void)
enum SPIClockPolarity cpol
clock polarity control
struct FloatRates ins_rates
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
#define VN100_REG_YMR_SIZE
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define VN100_REG_SBAUD_SIZE
uint16_t output_length
number of data words to write
VN100_Param Data[VN100_SPI_BUFFER_SIZE]
#define VN100_REG_ADOF_SIZE
SPI transaction structure.
struct spi_transaction vn100_trans
VN100_Req_Packet last_send_packet
struct FloatVect3 ins_mag
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
enum SPISlaveSelect select
slave selection behavior
volatile uint8_t ins_msg_received
Architecture independent SPI (Serial Peripheral Interface) API.
void vn100_report_task(void)
enum SPIClockPhase cpha
clock phase control
#define INS_VN100_SET_ADOF
void vn100_event_task(void)
struct FloatRMat ins_rmat
bool_t spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit a spi transaction.
void vn100_periodic_task(void)
#define VN100_REG_ADOR_SIZE
#define INS_YAW_NEUTRAL_DEFAULT
driver for the VectorNav VN100
#define INS_VN100_SET_ADOR
uint16_t input_length
number of data words to read
#define DefaultChannel
SITL.
#define INS_VN100_SET_BAUD
API to get/set the generic vehicle states.
slave is selected before transaction and unselected after
#define VN100_CmdID_WriteRegister
Common code for AP and FBW telemetry.
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
struct FloatEulers ins_eulers
Interface for the VectorNav VN100 AHRS use the binary protocal on the SPI link.
VN100_Res_Packet last_received_packet
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
void float_eulers_of_quat(struct FloatEulers *e, struct FloatQuat *q)
#define VN100_CmdID_ReadRegister
struct FloatQuat ins_quat
static bool_t ins_configure(void)
enum SPITransactionStatus status
struct FloatVect3 ins_accel