Adafruit LSM9DS1 Library
Public Member Functions | List of all members
Adafruit_LSM9DS1::Sensor Class Reference

#include <Adafruit_LSM9DS1.h>

Inheritance diagram for Adafruit_LSM9DS1::Sensor:

Public Member Functions

 Sensor ()
 Basic instatiator.
 
 Sensor (const Sensor &copy)
 Instantiate based on existing sensor. More...
 
 Sensor (Adafruit_LSM9DS1 *parent, lsm9ds1_read_func readFunc, lsm9ds1_get_event_func eventFunc, lsm9ds1_get_sensor_func sensorFunc)
 Instantiate based on existing sensor. More...
 
virtual bool getEvent (sensors_event_t *event)
 Get sensor event data. More...
 
virtual void getSensor (sensor_t *sensor)
 Get sensor metadata - type and range information. More...
 

Detailed Description

! Subclass to expose each sensor on the LSM9DS1 as an Adafruit_Sensor instance.

Constructor & Destructor Documentation

◆ Sensor() [1/2]

Adafruit_LSM9DS1::Sensor::Sensor ( const Sensor copy)
inline

Instantiate based on existing sensor.

Parameters
copyThe Sensor object to 'copy' from

◆ Sensor() [2/2]

Adafruit_LSM9DS1::Sensor::Sensor ( Adafruit_LSM9DS1 parent,
lsm9ds1_read_func  readFunc,
lsm9ds1_get_event_func  eventFunc,
lsm9ds1_get_sensor_func  sensorFunc 
)
inline

Instantiate based on existing sensor.

Parameters
parentThe LSM9DS1 parent object
readFuncThe no-argument function to call to read data
eventFuncThe sensor_event_t function to call to get event data
sensorFuncThe sensor_t function to call to get sensor metadata

Member Function Documentation

◆ getEvent()

virtual bool Adafruit_LSM9DS1::Sensor::getEvent ( sensors_event_t *  event)
inlinevirtual

Get sensor event data.

Parameters
eventPointer to sensor_event_t to fill in
Returns
True on successful read

◆ getSensor()

virtual void Adafruit_LSM9DS1::Sensor::getSensor ( sensor_t *  sensor)
inlinevirtual

Get sensor metadata - type and range information.

Parameters
sensorPointer to sensor_t to fill in

The documentation for this class was generated from the following file: