Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions
imu.h File Reference

Interface for the physical components of the InertialMotionUnit. More...

Go to the source code of this file.

Namespaces

namespace  lampda
 Program scope.
 
namespace  lampda::physical
 Handle the physical modules drivers.
 
namespace  lampda::physical::imu
 Contains the handling of the gyroscope and accelerometer. IMU is auto activated when used.
 

Enumerations

enum class  lampda::physical::imu::EventType { lampda::physical::imu::FreeFall , lampda::physical::imu::BigMotion , lampda::physical::imu::Step , lampda::physical::imu::Tilt }
 Describe an IMU detection event. More...
 

Functions

void lampda::physical::imu::init ()
 Called once on program start, initialize the driver.
 
void lampda::physical::imu::shutdown ()
 Called once on program shutdown, to gracefully close the driver.
 
bool lampda::physical::imu::enable_event_detection (const EventType eventType)
 Enable a specific event.
 
bool lampda::physical::imu::disable_event_detection (const EventType eventType)
 Disable a specific event.
 
bool lampda::physical::imu::is_event_detected (const EventType eventType)
 Read the event bit.
 
bool lampda::physical::imu::link_event_to_interrupt1 (const EventType eventType)
 Enable the interrupt 1 with an event type, wired to the interrupt pin 1 of IMU.
 
void lampda::physical::imu::unlink_interrupt_1 ()
 Disable the interrupts 1.
 
bool lampda::physical::imu::link_event_to_interrupt2 (const EventType eventType)
 Enable the interrupt 2 with an event type, wired to the interrupt pin 2 of IMU EVENT BigMotion & Step NOT SUPPORTED ON INTERRUPT 2.
 
void lampda::physical::imu::unlink_interrupt_2 ()
 Disable the interrupts 2.
 
bool lampda::physical::imu::is_interrupt1_enabled ()
 Read and reset the interrupt1 bit.
 
bool lampda::physical::imu::is_interrupt2_enabled ()
 Read and reset the interrupt2 bit.
 
Reading lampda::physical::imu::get_filtered_reading (const bool resetFilter)
 get the filtered IMU readings
 

Detailed Description

Interface for the physical components of the InertialMotionUnit.