STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
ISM330DHCX_Pedometer

This section groups all the functions that manage pedometer. More...

Collaboration diagram for ISM330DHCX_Pedometer:

Functions

int32_t ism330dhcx_pedo_sens_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable pedometer algorithm.
int32_t ism330dhcx_pedo_sens_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable pedometer algorithm.
int32_t ism330dhcx_pedo_step_detect_get (stmdev_ctx_t *ctx, uint8_t *val)
 Interrupt status bit for step detection.
int32_t ism330dhcx_pedo_debounce_steps_set (stmdev_ctx_t *ctx, uint8_t *buff)
 Pedometer debounce configuration register (r/w).
int32_t ism330dhcx_pedo_debounce_steps_get (stmdev_ctx_t *ctx, uint8_t *buff)
 Pedometer debounce configuration register (r/w).
int32_t ism330dhcx_pedo_steps_period_set (stmdev_ctx_t *ctx, uint16_t val)
 Time period register for step detection on delta time (r/w).
int32_t ism330dhcx_pedo_steps_period_get (stmdev_ctx_t *ctx, uint16_t *val)
 Time period register for step detection on delta time (r/w).
int32_t ism330dhcx_pedo_int_mode_set (stmdev_ctx_t *ctx, ism330dhcx_carry_count_en_t val)
 Set when user wants to generate interrupt on count overflow event/every step.
int32_t ism330dhcx_pedo_int_mode_get (stmdev_ctx_t *ctx, ism330dhcx_carry_count_en_t *val)
 Set when user wants to generate interrupt on count overflow event/every step.

Detailed Description

This section groups all the functions that manage pedometer.

Function Documentation

◆ ism330dhcx_pedo_debounce_steps_get()

int32_t ism330dhcx_pedo_debounce_steps_get ( stmdev_ctx_t * ctx,
uint8_t * buff )

Pedometer debounce configuration register (r/w).

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8547 of file ism330dhcx_reg.c.

References ism330dhcx_ln_pg_read_byte(), and ISM330DHCX_PEDO_DEB_STEPS_CONF.

◆ ism330dhcx_pedo_debounce_steps_set()

int32_t ism330dhcx_pedo_debounce_steps_set ( stmdev_ctx_t * ctx,
uint8_t * buff )

Pedometer debounce configuration register (r/w).

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that contains data to write
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8529 of file ism330dhcx_reg.c.

References ism330dhcx_ln_pg_write_byte(), and ISM330DHCX_PEDO_DEB_STEPS_CONF.

◆ ism330dhcx_pedo_int_mode_get()

int32_t ism330dhcx_pedo_int_mode_get ( stmdev_ctx_t * ctx,
ism330dhcx_carry_count_en_t * val )

Set when user wants to generate interrupt on count overflow event/every step.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of carry_count_en in reg PEDO_CMD_REG
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8647 of file ism330dhcx_reg.c.

References ism330dhcx_pedo_cmd_reg_t::carry_count_en, ISM330DHCX_COUNT_OVERFLOW, ISM330DHCX_EVERY_STEP, ism330dhcx_ln_pg_read_byte(), and ISM330DHCX_PEDO_CMD_REG.

◆ ism330dhcx_pedo_int_mode_set()

int32_t ism330dhcx_pedo_int_mode_set ( stmdev_ctx_t * ctx,
ism330dhcx_carry_count_en_t val )

Set when user wants to generate interrupt on count overflow event/every step.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of carry_count_en in reg PEDO_CMD_REG
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8620 of file ism330dhcx_reg.c.

References ism330dhcx_pedo_cmd_reg_t::carry_count_en, ism330dhcx_ln_pg_read_byte(), ism330dhcx_ln_pg_write_byte(), and ISM330DHCX_PEDO_CMD_REG.

◆ ism330dhcx_pedo_sens_get()

int32_t ism330dhcx_pedo_sens_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Enable pedometer algorithm.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of pedo_en in reg EMB_FUNC_EN_A
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8470 of file ism330dhcx_reg.c.

References ISM330DHCX_EMB_FUNC_EN_A, ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), and ISM330DHCX_USER_BANK.

◆ ism330dhcx_pedo_sens_set()

int32_t ism330dhcx_pedo_sens_set ( stmdev_ctx_t * ctx,
uint8_t val )

Enable pedometer algorithm.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of pedo_en in reg EMB_FUNC_EN_A
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8435 of file ism330dhcx_reg.c.

References ISM330DHCX_EMB_FUNC_EN_A, ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_emb_func_en_a_t::pedo_en.

◆ ism330dhcx_pedo_step_detect_get()

int32_t ism330dhcx_pedo_step_detect_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Interrupt status bit for step detection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of is_step_det in reg EMB_FUNC_STATUS
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8499 of file ism330dhcx_reg.c.

References ISM330DHCX_EMB_FUNC_STATUS, ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), and ISM330DHCX_USER_BANK.

◆ ism330dhcx_pedo_steps_period_get()

int32_t ism330dhcx_pedo_steps_period_get ( stmdev_ctx_t * ctx,
uint16_t * val )

Time period register for step detection on delta time (r/w).

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8592 of file ism330dhcx_reg.c.

References ism330dhcx_ln_pg_read_byte(), ISM330DHCX_PEDO_SC_DELTAT_H, and ISM330DHCX_PEDO_SC_DELTAT_L.

◆ ism330dhcx_pedo_steps_period_set()

int32_t ism330dhcx_pedo_steps_period_set ( stmdev_ctx_t * ctx,
uint16_t val )

Time period register for step detection on delta time (r/w).

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that contains data to write
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 8565 of file ism330dhcx_reg.c.

References ism330dhcx_ln_pg_write_byte(), ISM330DHCX_PEDO_SC_DELTAT_H, and ISM330DHCX_PEDO_SC_DELTAT_L.