Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Diff: LSM6DSOXSensor.cpp
- Revision:
- 3:d89217a05f63
- Parent:
- 2:6f62c931be0b
--- a/LSM6DSOXSensor.cpp Thu Oct 29 12:49:31 2020 +0000 +++ b/LSM6DSOXSensor.cpp Fri Oct 30 07:36:01 2020 +0000 @@ -2970,6 +2970,36 @@ return 0; } +/** + * @brief Get the LSM6DSOX MLC status + * @param status the status to be set + * @retval 0 in case of success, an error code otherwise + */ +int LSM6DSOXSensor::get_mlc_status(LSM6DSOX_MLC_Status_t *status) +{ + if (lsm6dsox_mlc_status_get(&_reg_ctx, (lsm6dsox_mlc_status_mainpage_t *)status) != 0) + { + return 1; + } + + return 0; +} + +/** + * @brief Get the LSM6DSOX MLC output + * @param output the result of the MLC computation + * @retval 0 in case of success, an error code otherwise + */ +int LSM6DSOXSensor::get_mlc_output(uint8_t *output) +{ + if (lsm6dsox_mlc_out_get(&_reg_ctx, output) != 0) + { + return 1; + } + + return 0; +} + int32_t LSM6DSOX_io_write(void *handle, uint8_t WriteAddr, uint8_t *pBuffer, uint16_t nBytesToWrite)