Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
LSM6DSO32_significant_motion

This section groups all the functions that manage the significant motion detection. More...

Collaboration diagram for LSM6DSO32_significant_motion:

Functions

int32_t lsm6dso32_motion_sens_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable significant motion detection function.[set].
 
int32_t lsm6dso32_motion_sens_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable significant motion detection function.[get].
 
int32_t lsm6dso32_motion_flag_data_ready_get (stmdev_ctx_t *ctx, uint8_t *val)
 Interrupt status bit for significant motion detection.[get].
 

Detailed Description

This section groups all the functions that manage the significant motion detection.

Function Documentation

◆ lsm6dso32_motion_flag_data_ready_get()

int32_t lsm6dso32_motion_flag_data_ready_get ( stmdev_ctx_t ctx,
uint8_t *  val 
)

Interrupt status bit for significant motion detection.[get].

Parameters
ctxread / write interface definitions
valchange the values of is_sigmot in reg EMB_FUNC_STATUS
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 7350 of file lsm6dso32_reg.c.

7352{
7354 int32_t ret;
7355
7357
7358 if (ret == 0)
7359 {
7361 (uint8_t *)&reg, 1);
7362 }
7363
7364 if (ret == 0)
7365 {
7366 *val = reg.is_sigmot;
7368 }
7369
7370 return ret;
7371}
int32_t __weak lsm6dso32_read_reg(stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
Read generic device register.
int32_t lsm6dso32_mem_bank_set(stmdev_ctx_t *ctx, lsm6dso32_reg_access_t val)
Enable access to the embedded functions/sensor hub configuration registers.[set].
@ LSM6DSO32_USER_BANK
@ LSM6DSO32_EMBEDDED_FUNC_BANK
#define LSM6DSO32_EMB_FUNC_STATUS

References lsm6dso32_emb_func_status_t::is_sigmot, LSM6DSO32_EMB_FUNC_STATUS, LSM6DSO32_EMBEDDED_FUNC_BANK, lsm6dso32_mem_bank_set(), lsm6dso32_read_reg(), and LSM6DSO32_USER_BANK.

Here is the call graph for this function:

◆ lsm6dso32_motion_sens_get()

int32_t lsm6dso32_motion_sens_get ( stmdev_ctx_t ctx,
uint8_t *  val 
)

Enable significant motion detection function.[get].

Parameters
ctxread / write interface definitions
valchange the values of sign_motion_en in reg EMB_FUNC_EN_A
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 7320 of file lsm6dso32_reg.c.

7321{
7323 int32_t ret;
7324
7326
7327 if (ret == 0)
7328 {
7330 (uint8_t *)&reg, 1);
7331 }
7332
7333 if (ret == 0)
7334 {
7335 *val = reg.sign_motion_en;
7337 }
7338
7339 return ret;
7340}
#define LSM6DSO32_EMB_FUNC_EN_A

References LSM6DSO32_EMB_FUNC_EN_A, LSM6DSO32_EMBEDDED_FUNC_BANK, lsm6dso32_mem_bank_set(), lsm6dso32_read_reg(), LSM6DSO32_USER_BANK, and lsm6dso32_emb_func_en_a_t::sign_motion_en.

Here is the call graph for this function:

◆ lsm6dso32_motion_sens_set()

int32_t lsm6dso32_motion_sens_set ( stmdev_ctx_t ctx,
uint8_t  val 
)

Enable significant motion detection function.[set].

Parameters
ctxread / write interface definitions
valchange the values of sign_motion_en in reg EMB_FUNC_EN_A
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 7284 of file lsm6dso32_reg.c.

7285{
7287 int32_t ret;
7288
7290
7291 if (ret == 0)
7292 {
7294 (uint8_t *)&reg, 1);
7295 }
7296
7297 if (ret == 0)
7298 {
7299 reg.sign_motion_en = val;
7301 (uint8_t *)&reg, 1);
7302 }
7303
7304 if (ret == 0)
7305 {
7307 }
7308
7309 return ret;
7310}
int32_t __weak lsm6dso32_write_reg(stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
Write generic device register.

References LSM6DSO32_EMB_FUNC_EN_A, LSM6DSO32_EMBEDDED_FUNC_BANK, lsm6dso32_mem_bank_set(), lsm6dso32_read_reg(), LSM6DSO32_USER_BANK, lsm6dso32_write_reg(), and lsm6dso32_emb_func_en_a_t::sign_motion_en.

Here is the call graph for this function: