Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::VN100SpiDefs Namespace Reference

Enumerations

enum  Registers : uint8_t { REG_MODEL_NUMBER = 1 , REG_QUAT_IMU_DATA = 15 , REG_SYNC = 32 , REG_TEMP_PRESS_DATA = 54 }
 Internal registers definitions. More...
 
enum  Commands : uint8_t { READ_REG = 1 , WRITE_REG = 2 }
 Commands available for the sensor. More...
 
enum class  VNErrors : uint8_t {
  NO_ERROR = 0 , HARD_FAULT = 1 , SERIAL_BUFFER_OVERFLOW = 2 , INVALID_CHECKSUM = 3 ,
  INVALID_COMMAND = 4 , NOT_ENOUGH_PARAMETERS = 5 , TOO_MANY_PARAMETERS = 6 , INVALID_PARAMETER = 7 ,
  INVALID_REGISTER = 8 , UNAUTHORIZED_ACCESS = 9 , WATCHDOG_RESET = 10 , OUTPUT_BUFFER_OVERFLOW = 11 ,
  INSUFFICIENT_BAUDRATE = 12 , ERROR_BUFFER_OVERFLOW = 255
}
 Error codes of the sensor. More...
 

Functions

struct __attribute__ ((packed)) SynchronizationData
 Data format of the synchronization control register, used for read and write operations.
 

Variables

const char *const MODEL_NUMBER = "VN-100"
 The expected model number to be red from the sensor.
 
const int MODEL_NUMBER_SIZE = 24
 Size of the buffer used to retrieve the model number from the sensor. It corresponds to the size of the register, see the datasheet for details.
 
const uint32_t SYNC_OUT_PULSE_WIDTH = 1000000
 Width of the SyncOut pulse in nanoseconds. Now is set to 1 millisecond.
 

Enumeration Type Documentation

◆ Commands

Commands available for the sensor.

Enumerator
READ_REG 
WRITE_REG 

Definition at line 46 of file VN100SpiDefs.h.

◆ Registers

Internal registers definitions.

Enumerator
REG_MODEL_NUMBER 

WhoAmI register.

REG_QUAT_IMU_DATA 

Quaternion, accelerometer, gyroscope and magnetometer data register

REG_SYNC 

Used to set data ready interrupt.

REG_TEMP_PRESS_DATA 

Temperature and pressure data register.

Definition at line 34 of file VN100SpiDefs.h.

◆ VNErrors

enum class Boardcore::VN100SpiDefs::VNErrors : uint8_t
strong

Error codes of the sensor.

Enumerator
NO_ERROR 
HARD_FAULT 
SERIAL_BUFFER_OVERFLOW 
INVALID_CHECKSUM 
INVALID_COMMAND 
NOT_ENOUGH_PARAMETERS 
TOO_MANY_PARAMETERS 
INVALID_PARAMETER 
INVALID_REGISTER 
UNAUTHORIZED_ACCESS 
WATCHDOG_RESET 
OUTPUT_BUFFER_OVERFLOW 
INSUFFICIENT_BAUDRATE 
ERROR_BUFFER_OVERFLOW 

Definition at line 55 of file VN100SpiDefs.h.

Function Documentation

◆ __attribute__()

struct Boardcore::VN100SpiDefs::__attribute__ ( (packed)  )

Data format of the synchronization control register, used for read and write operations.

Data format of the data register (temperature and pressure), used for sampling operations.

Data format of the data register (imu and quaternion), used for sampling operations.

< Behaviour of the syncIn event

< Trigger syncIn on rising or falling edge

< How many times trigger edges defined by SyncInEdge should occur prior to triggering a SyncIn event

< Reserved, do not use

< Behavior of the SyncOut event

< The polarity of the output pulse on the SyncOut pin (positive or negative)

< how many times the sync out event should be skipped before actually triggering the SyncOut pin

< Controls the desired width of the SyncOut pulse

< Reserved, do not use

Definition at line 1 of file VN100SpiDefs.h.

Variable Documentation

◆ MODEL_NUMBER

const char* const Boardcore::VN100SpiDefs::MODEL_NUMBER = "VN-100"

The expected model number to be red from the sensor.

Definition at line 139 of file VN100SpiDefs.h.

◆ MODEL_NUMBER_SIZE

const int Boardcore::VN100SpiDefs::MODEL_NUMBER_SIZE = 24

Size of the buffer used to retrieve the model number from the sensor. It corresponds to the size of the register, see the datasheet for details.

Definition at line 145 of file VN100SpiDefs.h.

◆ SYNC_OUT_PULSE_WIDTH

const uint32_t Boardcore::VN100SpiDefs::SYNC_OUT_PULSE_WIDTH = 1000000

Width of the SyncOut pulse in nanoseconds. Now is set to 1 millisecond.

Definition at line 151 of file VN100SpiDefs.h.