Hi sad_cyrano,
For different sensor API versions, the register offset in the configuration file may be inconsistent with the description in the document. However, for a version of the sensor API that has been released, its configuration file and the register address in the API interface match well, and you can use it directly without caring about the details.
This is the step to enable any motion for your reference.
/* Get any-motion configuration to get the default values */ /* Set the new configuration */ /* Map interrupt for any-motion */ /* Set interrupt like */ rslt = bma4_get_int_pin_config(&int_pin_config, int_line, dev); int_pin_config.edge_ctrl |= BMA4_LEVEL_TRIGGER; int_pin_config.lvl = BMA4_ACTIVE_HIGH; int_pin_config.od = BMA4_PUSH_PULL; int_pin_config.output_en = BMA4_OUTPUT_ENABLE; rslt = bma4_set_int_pin_config(&int_pin_config, int_line, dev);
/* Enable MCU interrupt pin */
... View more