Skip to content
Snippets Groups Projects
Commit 738a0383 authored by Nicolò's avatar Nicolò
Browse files

LIS3DSHDef.h implemented

Implemented LISH3DSHDef.h header with sensor specifics
parent d0d59f52
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,20 @@ namespace Boardcore ...@@ -73,6 +73,20 @@ namespace Boardcore
STATUS_REG_YOR = 0b0010 << 4, STATUS_REG_YOR = 0b0010 << 4,
STATUS_REG_ZOR = 0b0100 << 4, STATUS_REG_ZOR = 0b0100 << 4,
STATUS_REG_XYZOR = 0b1000 << 4, STATUS_REG_XYZOR = 0b1000 << 4,
} };
} // Given by the CTRL_REG1 refernce register
} constexpr uint8_t CTRL_REG1_XEN = 0b1; // X axis Enabled
\ No newline at end of file constexpr uint8_t CTRL_REG1_YEN = 0b1 << 1; // Y axis Enabled
constexpr uint8_t CTRL_REG1_ZEN = 0b1 << 2; // Z axis Enabled
// Given by the datasheet register
constexpr uint8_t WHO_AM_I_ID = 0x33; // Here it is 00110011 -> 0x33
// Sensitivity values from the mechanical characteristics (Table 4 pag.10)
// Here there are 3 different values for the 3 power modes Low power, Normal, High Rate
constexpr float SENSITIVITY_VALUES_L[] = {0.016, 0.032, 0.064, 0.192}
constexpr float SENSITIVITY_VALUES_N[] = {0.004, 0.008, 0.016, 0.048}
constexpr float SENSITIVITY_VALUES_HR[] = {0.001, 0.002, 0.004, 0.012}
} // namespace LIS3DSHDefs
} // namespace Boardcore
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment