@@ -772,6 +772,102 @@ int32_t lis2mdl_device_id_get(const stmdev_ctx_t *ctx, uint8_t *buff)
772772 return ret ;
773773}
774774
775+ /**
776+ * @brief Software reset. Restore the default values in user registers.[set]
777+ *
778+ * @param ctx read / write interface definitions.(ptr)
779+ * @param val change the values of soft_rst in reg CFG_REG_A
780+ * @retval interface status.(MANDATORY: return 0 -> no Error)
781+ *
782+ */
783+ [[deprecated ("Please use sw_reset to align with the AN" )]]
784+ int32_t lis2mdl_reset_set (const stmdev_ctx_t * ctx , uint8_t val )
785+ {
786+ lis2mdl_cfg_reg_a_t reg ;
787+ int32_t ret ;
788+
789+ ret = lis2mdl_read_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
790+
791+ if (ret == 0 )
792+ {
793+ reg .soft_rst = val ;
794+ ret = lis2mdl_write_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
795+ }
796+
797+ return ret ;
798+ }
799+
800+ /**
801+ * @brief Software reset. Restore the default values in user registers.[get]
802+ *
803+ * @param ctx read / write interface definitions.(ptr)
804+ * @param val change the values of soft_rst in reg CFG_REG_A.(ptr)
805+ * @retval interface status.(MANDATORY: return 0 -> no Error)
806+ *
807+ */
808+ [[deprecated ("Please use sw_reset to align with the AN" )]]
809+ int32_t lis2mdl_reset_get (const stmdev_ctx_t * ctx , uint8_t * val )
810+ {
811+ lis2mdl_cfg_reg_a_t reg ;
812+ int32_t ret ;
813+
814+ ret = lis2mdl_read_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
815+
816+ if (ret != 0 ) { return ret ; }
817+
818+ * val = reg .soft_rst ;
819+
820+ return ret ;
821+ }
822+
823+ /**
824+ * @brief Reboot memory content. Reload the calibration parameters.[set]
825+ *
826+ * @param ctx read / write interface definitions.(ptr)
827+ * @param val change the values of reboot in reg CFG_REG_A
828+ * @retval interface status.(MANDATORY: return 0 -> no Error)
829+ *
830+ */
831+ [[deprecated ("Please use reboot to align with the AN" )]]
832+ int32_t lis2mdl_boot_set (const stmdev_ctx_t * ctx , uint8_t val )
833+ {
834+ lis2mdl_cfg_reg_a_t reg ;
835+ int32_t ret ;
836+
837+ ret = lis2mdl_read_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
838+
839+ if (ret == 0 )
840+ {
841+ reg .reboot = val ;
842+ ret = lis2mdl_write_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
843+ }
844+
845+ return ret ;
846+ }
847+
848+ /**
849+ * @brief Reboot memory content. Reload the calibration parameters.[get]
850+ *
851+ * @param ctx read / write interface definitions.(ptr)
852+ * @param val change the values of reboot in reg CFG_REG_A.(ptr)
853+ * @retval interface status.(MANDATORY: return 0 -> no Error)
854+ *
855+ */
856+ [[deprecated ("Please use reboot to align with the AN" )]]
857+ int32_t lis2mdl_boot_get (const stmdev_ctx_t * ctx , uint8_t * val )
858+ {
859+ lis2mdl_cfg_reg_a_t reg ;
860+ int32_t ret ;
861+
862+ ret = lis2mdl_read_reg (ctx , LIS2MDL_CFG_REG_A , (uint8_t * )& reg , 1 );
863+
864+ if (ret != 0 ) { return ret ; }
865+
866+ * val = reg .reboot ;
867+
868+ return ret ;
869+ }
870+
775871/**
776872 * @brief Software reset. Restore the default values in user registers.
777873 *
0 commit comments