ESPHome 2025.5.2
|
Data Structures | |
class | MSA3xxComponent |
union | Orientation |
union | RegMotionInterrupt |
union | RegOrientationStatus |
union | RegOutputDataRate |
union | RegPowerModeBandwidth |
union | RegRangeResolution |
union | RegSwapPolarity |
union | RegTapDuration |
Enumerations | |
enum class | Model : uint8_t { MSA301 = 0x26 , MSA311 = 0x62 } |
enum class | RegisterMap : uint8_t { SOFT_RESET = 0x00 , PART_ID = 0x01 , ACC_X_LSB = 0x02 , ACC_X_MSB = 0x03 , ACC_Y_LSB = 0x04 , ACC_Y_MSB = 0x05 , ACC_Z_LSB = 0x06 , ACC_Z_MSB = 0x07 , MOTION_INTERRUPT = 0x09 , DATA_INTERRUPT = 0x0A , TAP_ACTIVE_STATUS = 0x0B , ORIENTATION_STATUS = 0x0C , RESOLUTION_RANGE_CONFIG = 0x0D , RANGE_RESOLUTION = 0x0F , ODR = 0x10 , POWER_MODE_BANDWIDTH = 0x11 , SWAP_POLARITY = 0x12 , INT_SET_0 = 0x16 , INT_SET_1 = 0x17 , INT_MAP_0 = 0x19 , INT_MAP_1 = 0x1A , INT_CONFIG = 0x20 , INT_LATCH = 0x21 , FREEFALL_DURATION = 0x22 , FREEFALL_THRESHOLD = 0x23 , FREEFALL_HYSTERESIS = 0x24 , ACTIVE_DURATION = 0x27 , ACTIVE_THRESHOLD = 0x28 , TAP_DURATION = 0x2A , TAP_THRESHOLD = 0x2B , ORIENTATION_CONFIG = 0x2C , Z_BLOCK = 0x2D , OFFSET_COMP_X = 0x38 , OFFSET_COMP_Y = 0x39 , OFFSET_COMP_Z = 0x3A } |
enum class | Range : uint8_t { RANGE_2G = 0b00 , RANGE_4G = 0b01 , RANGE_8G = 0b10 , RANGE_16G = 0b11 } |
enum class | Resolution : uint8_t { RES_14BIT = 0b00 , RES_12BIT = 0b01 , RES_10BIT = 0b10 , RES_8BIT = 0b11 } |
enum class | PowerMode : uint8_t { NORMAL = 0b00 , LOW_POWER = 0b01 , SUSPEND = 0b11 } |
enum class | Bandwidth : uint8_t { BW_1_95HZ = 0b0000 , BW_3_9HZ = 0b0011 , BW_7_81HZ = 0b0100 , BW_15_63HZ = 0b0101 , BW_31_25HZ = 0b0110 , BW_62_5HZ = 0b0111 , BW_125HZ = 0b1000 , BW_250HZ = 0b1001 , BW_500HZ = 0b1010 } |
enum class | DataRate : uint8_t { ODR_1HZ = 0b0000 , ODR_1_95HZ = 0b0001 , ODR_3_9HZ = 0b0010 , ODR_7_81HZ = 0b0011 , ODR_15_63HZ = 0b0100 , ODR_31_25HZ = 0b0101 , ODR_62_5HZ = 0b0110 , ODR_125HZ = 0b0111 , ODR_250HZ = 0b1000 , ODR_500HZ = 0b1001 , ODR_1000HZ = 0b1010 } |
enum class | OrientationXY : uint8_t { PORTRAIT_UPRIGHT = 0b00 , PORTRAIT_UPSIDE_DOWN = 0b01 , LANDSCAPE_LEFT = 0b10 , LANDSCAPE_RIGHT = 0b11 } |
Functions | |
const char * | model_to_string (Model model) |
const char * | power_mode_to_string (PowerMode power_mode) |
const char * | res_to_string (Resolution resolution) |
const char * | range_to_string (Range range) |
const char * | bandwidth_to_string (Bandwidth bandwidth) |
const char * | orientation_xy_to_string (OrientationXY orientation) |
const char * | orientation_z_to_string (bool orientation) |
void | binary_event_debounce (bool state, bool old_state, uint32_t now, uint32_t &last_ms, Trigger<> &trigger, uint32_t cooldown_ms, void *bs, const char *desc) |
Variables | |
const uint8_t | MSA_3XX_PART_ID = 0x13 |
const float | GRAVITY_EARTH = 9.80665f |
const float | LSB_COEFF = 1000.0f / (GRAVITY_EARTH * 3.9) |
const float | G_OFFSET_MIN = -4.5f |
const float | G_OFFSET_MAX = 4.5f |
const uint8_t | RESOLUTION [] = {14, 12, 10, 8} |
const uint32_t | TAP_COOLDOWN_MS = 500 |
const uint32_t | DOUBLE_TAP_COOLDOWN_MS = 500 |
const uint32_t | ACTIVITY_COOLDOWN_MS = 500 |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
const char * esphome::msa3xx::bandwidth_to_string | ( | Bandwidth | bandwidth | ) |
Definition at line 78 of file msa3xx.cpp.
void esphome::msa3xx::binary_event_debounce | ( | bool | state, |
bool | old_state, | ||
uint32_t | now, | ||
uint32_t & | last_ms, | ||
Trigger<> & | trigger, | ||
uint32_t | cooldown_ms, | ||
void * | bs, | ||
const char * | desc ) |
Definition at line 373 of file msa3xx.cpp.
const char * esphome::msa3xx::model_to_string | ( | Model | model | ) |
Definition at line 24 of file msa3xx.cpp.
const char * esphome::msa3xx::orientation_xy_to_string | ( | OrientationXY | orientation | ) |
Definition at line 103 of file msa3xx.cpp.
const char * esphome::msa3xx::orientation_z_to_string | ( | bool | orientation | ) |
Definition at line 118 of file msa3xx.cpp.
const char * esphome::msa3xx::power_mode_to_string | ( | PowerMode | power_mode | ) |
Definition at line 35 of file msa3xx.cpp.
const char * esphome::msa3xx::range_to_string | ( | Range | range | ) |
Definition at line 63 of file msa3xx.cpp.
const char * esphome::msa3xx::res_to_string | ( | Resolution | resolution | ) |
Definition at line 48 of file msa3xx.cpp.
const uint32_t esphome::msa3xx::ACTIVITY_COOLDOWN_MS = 500 |
Definition at line 22 of file msa3xx.cpp.
const uint32_t esphome::msa3xx::DOUBLE_TAP_COOLDOWN_MS = 500 |
Definition at line 21 of file msa3xx.cpp.
const float esphome::msa3xx::G_OFFSET_MAX = 4.5f |
Definition at line 16 of file msa3xx.cpp.
const float esphome::msa3xx::G_OFFSET_MIN = -4.5f |
Definition at line 15 of file msa3xx.cpp.
const float esphome::msa3xx::GRAVITY_EARTH = 9.80665f |
Definition at line 13 of file msa3xx.cpp.
const float esphome::msa3xx::LSB_COEFF = 1000.0f / (GRAVITY_EARTH * 3.9) |
Definition at line 14 of file msa3xx.cpp.
const uint8_t esphome::msa3xx::MSA_3XX_PART_ID = 0x13 |
Definition at line 11 of file msa3xx.cpp.
const uint8_t esphome::msa3xx::RESOLUTION[] = {14, 12, 10, 8} |
Definition at line 18 of file msa3xx.cpp.
const uint32_t esphome::msa3xx::TAP_COOLDOWN_MS = 500 |
Definition at line 20 of file msa3xx.cpp.