18 TEMPLATABLE_VALUE(int8_t, hw_frontend_reset)
20 TEMPLATABLE_VALUE(
int, sensing_distance)
21 TEMPLATABLE_VALUE(
int, poweron_selfcheck_time)
22 TEMPLATABLE_VALUE(
int, power_consumption)
23 TEMPLATABLE_VALUE(
int, protect_time)
24 TEMPLATABLE_VALUE(
int, trigger_base)
25 TEMPLATABLE_VALUE(
int, trigger_keep)
26 TEMPLATABLE_VALUE(
int, stage_gain)
29 if (this->frequency_.has_value()) {
30 int v = this->frequency_.value(x...);
31 this->
parent_->set_frequency(v);
33 if (this->sensing_distance_.has_value()) {
34 int v = this->sensing_distance_.value(x...);
35 this->
parent_->set_sensing_distance(v);
37 if (this->poweron_selfcheck_time_.has_value()) {
38 int v = this->poweron_selfcheck_time_.value(x...);
39 this->
parent_->set_poweron_selfcheck_time(v);
41 if (this->power_consumption_.has_value()) {
42 int v = this->power_consumption_.value(x...);
43 this->
parent_->set_power_consumption(v);
45 if (this->protect_time_.has_value()) {
46 int v = this->protect_time_.value(x...);
47 this->
parent_->set_protect_time(v);
49 if (this->trigger_base_.has_value()) {
50 int v = this->trigger_base_.value(x...);
51 this->
parent_->set_trigger_base(v);
53 if (this->trigger_keep_.has_value()) {
54 int v = this->trigger_keep_.value(x...);
55 this->
parent_->set_trigger_keep(v);
57 if (this->stage_gain_.has_value()) {
58 int v = this->stage_gain_.value(x...);
59 this->
parent_->set_stage_gain(v);
63 this->
parent_->i2c_write_config();
65 if (this->hw_frontend_reset_.has_value() && this->hw_frontend_reset_.value(x...) ==
true) {
66 this->
parent_->reset_hardware_frontend();
AT581XComponent * parent_
Implementation of SPI Controller mode.
Helper class to easily give an object a parent of type T.