3-axis MEMS ultra low power magnetometer

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Embed: (wiki syntax)

« Back to documentation index

LIS2MDL_common

LIS2MDL_common
[LIS2MDL]

This section group common usefull functions. More...

Functions

int32_t lis2mdl_device_id_get (lis2mdl_ctx_t *ctx, uint8_t *buff)
 DeviceWhoamI.
int32_t lis2mdl_reset_set (lis2mdl_ctx_t *ctx, uint8_t val)
 Software reset.
int32_t lis2mdl_reset_get (lis2mdl_ctx_t *ctx, uint8_t *val)
 Software reset.
int32_t lis2mdl_boot_set (lis2mdl_ctx_t *ctx, uint8_t val)
 Reboot memory content.
int32_t lis2mdl_boot_get (lis2mdl_ctx_t *ctx, uint8_t *val)
 Reboot memory content.
int32_t lis2mdl_self_test_set (lis2mdl_ctx_t *ctx, uint8_t val)
 Selftest.
int32_t lis2mdl_self_test_get (lis2mdl_ctx_t *ctx, uint8_t *val)
 Selftest.
int32_t lis2mdl_data_format_set (lis2mdl_ctx_t *ctx, lis2mdl_ble_t val)
 Big/Little Endian data selection.
int32_t lis2mdl_data_format_get (lis2mdl_ctx_t *ctx, lis2mdl_ble_t *val)
 Big/Little Endian data selection.
int32_t lis2mdl_status_get (lis2mdl_ctx_t *ctx, lis2mdl_status_reg_t *val)
 Info about device status.

Detailed Description

This section group common usefull functions.


Function Documentation

int32_t lis2mdl_boot_get ( lis2mdl_ctx_t *  ctx,
uint8_t *  val 
)

Reboot memory content.

Reload the calibration parameters.[get]

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

Definition at line 735 of file lis2mdl_reg.c.

int32_t lis2mdl_boot_set ( lis2mdl_ctx_t *  ctx,
uint8_t  val 
)

Reboot memory content.

Reload the calibration parameters.[set]

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

Definition at line 712 of file lis2mdl_reg.c.

int32_t lis2mdl_data_format_get ( lis2mdl_ctx_t *  ctx,
lis2mdl_ble_t *  val 
)

Big/Little Endian data selection.

[get]

Parameters:
ctxread / write interface definitions.(ptr)
valGet the values of ble in reg CFG_REG_C.(ptr)
Return values:
interfacestatus.(MANDATORY: return 0 -> no Error)

Definition at line 819 of file lis2mdl_reg.c.

int32_t lis2mdl_data_format_set ( lis2mdl_ctx_t *  ctx,
lis2mdl_ble_t  val 
)

Big/Little Endian data selection.

[set]

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

Definition at line 796 of file lis2mdl_reg.c.

int32_t lis2mdl_device_id_get ( lis2mdl_ctx_t *  ctx,
uint8_t *  buff 
)

DeviceWhoamI.

[get]

Parameters:
ctxread / write interface definitions.(ptr)
buffthat stores data read
Return values:
interfacestatus.(MANDATORY: return 0 -> no Error)

Definition at line 655 of file lis2mdl_reg.c.

int32_t lis2mdl_reset_get ( lis2mdl_ctx_t *  ctx,
uint8_t *  val 
)

Software reset.

Restore the default values in user registers.[get]

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

Definition at line 693 of file lis2mdl_reg.c.

int32_t lis2mdl_reset_set ( lis2mdl_ctx_t *  ctx,
uint8_t  val 
)

Software reset.

Restore the default values in user registers.[set]

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

Definition at line 670 of file lis2mdl_reg.c.

int32_t lis2mdl_self_test_get ( lis2mdl_ctx_t *  ctx,
uint8_t *  val 
)

Selftest.

[get]

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

Definition at line 777 of file lis2mdl_reg.c.

int32_t lis2mdl_self_test_set ( lis2mdl_ctx_t *  ctx,
uint8_t  val 
)

Selftest.

[set]

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

Definition at line 754 of file lis2mdl_reg.c.

int32_t lis2mdl_status_get ( lis2mdl_ctx_t *  ctx,
lis2mdl_status_reg_t *  val 
)

Info about device status.

[get]

Parameters:
ctxread / write interface definitions.(ptr)
valregisters STATUS_REG.(ptr)
Return values:
interfacestatus.(MANDATORY: return 0 -> no Error)

Definition at line 847 of file lis2mdl_reg.c.