08-08-2022 10:01 PM - edited 11-06-2022 06:06 PM
deleted
08-09-2022 04:18 AM
Hi sad_cyrano,
FEATURE_IN registers need to be accessed only the complete config file, not only individually. How to access FEATURE_IN has been implemented in the sensor API function, if you do not understand how to access FEATURE_IN, you can directly call the function in sensor API.
In addition, the sensor API code also contains example code how to configure sensor for your reference.
08-09-2022 12:46 PM - edited 11-06-2022 06:08 PM
deleted
08-15-2022 09:20 AM
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 */