#![allow(nonstandard_style)]
pub const GAIN_REGISTER: u8 = 0x00;
pub const RES_XYZ_REGISTER: u8 = 0x02;
pub const DIGITAL_FILTER_REGISTER: u8 = 0x02; pub const REGISTER_01: u8 = 0x01;
pub const REGISTER_00: u8 = 0x00;
pub const REGISTER_03: u8 = 0x03;
pub const REGISTER_04: u8 = 0x04;
pub const REGISTER_05: u8 = 0x05;
pub const REGISTER_06: u8 = 0x06;
pub const REGISTER_07: u8 = 0x07;
pub const REGISTER_08: u8 = 0x08;
pub const REGISTER_09: u8 = 0x09;
pub const Start_Burst_Mode: u8 = 0b00010000; pub const Start_Wake_On_Change: u8 = 0b00100000; pub const Start_Single_Measurement: u8 = 0b00110000; pub const Read_Measurement: u8 = 0b01000000; pub const Read_Register: u8 = 0b01010000; pub const Write_Register: u8 = 0b01100000; pub const Exit_mode: u8 = 0b1000_0000;
pub const Memory_Recall: u8 = 0b11010000;
pub const Memory_Store: u8 = 0b11100000;
pub const Reset: u8 = 0b11110000;
#[repr(u8)]
#[derive(Debug, Clone, Copy, Default)]
pub enum DeviceAddress {
#[default]
A1_0_A0_0 = 0x0c,
A1_0_A0_1 = 0x0c|0x01,
A1_1_A0_0 = 0x0c|0x02,
A1_1_A0_1 = 0x0c|0x03,
}
impl From<DeviceAddress> for u8 {
fn from(value: DeviceAddress) -> Self {
match value {
DeviceAddress::A1_0_A0_0 => 0x0c,
DeviceAddress::A1_0_A0_1 => 0x0c | 0x01,
DeviceAddress::A1_1_A0_0 => 0x0c | 0x02,
DeviceAddress::A1_1_A0_1 => 0x0c | 0x03,
}
}
}
pub const SENS_XY: [f32; 8] = [0.751, 0.601, 0.451, 0.376, 0.300, 0.250, 0.200, 0.150];
pub const SENS_Z: [f32; 8] = [1.210, 0.968, 0.726, 0.605, 0.484, 0.403, 0.323, 0.242];