TMF882X.Config (tmf882x v0.1.1)
Handles translation to and from configuration registers.
Link to this section Summary
Functions
Creates a command to set the measurement period
Creates a command to set the spad_map_id
Creates a new Config from the config register page. The expected registers start at the <<0x16>>
expected in register 0x20
.
Link to this section Types
Link to this type
alg_setting()
Link to this type
gpio_config()
@type gpio_config() :: %{ driver_strength: non_neg_integer(), pre_delay: non_neg_integer(), gpio: non_neg_integer() }
Link to this type
power_cfg()
@type t() :: %{ period: non_neg_integer(), kilo_iterations: non_neg_integer(), int_threshold_low: non_neg_integer(), int_threshold_high: non_neg_integer(), int_zone_mask_0: non_neg_integer(), int_zone_mask_1: non_neg_integer(), int_zone_mask_2: non_neg_integer(), int_persistence: non_neg_integer(), confidence_threshold: non_neg_integer(), gpio_1: gpio_config(), gpio_2: gpio_config(), power_cfg: power_cfg(), spad_map_id: non_neg_integer(), alg_setting_0: alg_setting(), hist_dump: boolean(), i2c_slave_address: non_neg_integer(), osc_trim_value: non_neg_integer(), i2c_addr_change: non_neg_integer() }
Link to this section Functions
Link to this function
cmd_period(period)
@spec cmd_period(non_neg_integer()) :: binary()
Creates a command to set the measurement period
Link to this function
cmd_spad_map_id(map_id)
@spec cmd_spad_map_id(non_neg_integer()) :: binary()
Creates a command to set the spad_map_id
Link to this function
new(data)
Creates a new Config from the config register page. The expected registers start at the <<0x16>>
expected in register 0x20
.