Skip to content

Commit 3e2f6b7

Browse files
committed
Fix [deprecated] clause
In compiler such as the one used in IAR this clause is not recognized. We use instead the following in the prtotype: __attribute__((deprecated("msg"))); Signed-off-by: Gioele Fiorenza <gioele.fiorenza2000@gmail.com>
1 parent 6694daa commit 3e2f6b7

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

lis2mdl_reg.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -775,12 +775,13 @@ int32_t lis2mdl_device_id_get(const stmdev_ctx_t *ctx, uint8_t *buff)
775775
/**
776776
* @brief Software reset. Restore the default values in user registers.[set]
777777
*
778+
* Deprecated: Please use sw_reset to align with the AN
779+
*
778780
* @param ctx read / write interface definitions.(ptr)
779781
* @param val change the values of soft_rst in reg CFG_REG_A
780782
* @retval interface status.(MANDATORY: return 0 -> no Error)
781783
*
782784
*/
783-
[[deprecated("Please use sw_reset to align with the AN")]]
784785
int32_t lis2mdl_reset_set(const stmdev_ctx_t *ctx, uint8_t val)
785786
{
786787
lis2mdl_cfg_reg_a_t reg;
@@ -800,12 +801,13 @@ int32_t lis2mdl_reset_set(const stmdev_ctx_t *ctx, uint8_t val)
800801
/**
801802
* @brief Software reset. Restore the default values in user registers.[get]
802803
*
804+
* Deprecated: Please use sw_reset to align with the AN
805+
*
803806
* @param ctx read / write interface definitions.(ptr)
804807
* @param val change the values of soft_rst in reg CFG_REG_A.(ptr)
805808
* @retval interface status.(MANDATORY: return 0 -> no Error)
806809
*
807810
*/
808-
[[deprecated("Please use sw_reset to align with the AN")]]
809811
int32_t lis2mdl_reset_get(const stmdev_ctx_t *ctx, uint8_t *val)
810812
{
811813
lis2mdl_cfg_reg_a_t reg;
@@ -823,12 +825,13 @@ int32_t lis2mdl_reset_get(const stmdev_ctx_t *ctx, uint8_t *val)
823825
/**
824826
* @brief Reboot memory content. Reload the calibration parameters.[set]
825827
*
828+
* Deprecated: please use reboot to align with the AN
829+
*
826830
* @param ctx read / write interface definitions.(ptr)
827831
* @param val change the values of reboot in reg CFG_REG_A
828832
* @retval interface status.(MANDATORY: return 0 -> no Error)
829833
*
830834
*/
831-
[[deprecated("Please use reboot to align with the AN")]]
832835
int32_t lis2mdl_boot_set(const stmdev_ctx_t *ctx, uint8_t val)
833836
{
834837
lis2mdl_cfg_reg_a_t reg;
@@ -848,12 +851,13 @@ int32_t lis2mdl_boot_set(const stmdev_ctx_t *ctx, uint8_t val)
848851
/**
849852
* @brief Reboot memory content. Reload the calibration parameters.[get]
850853
*
854+
* Deprecated: please use reboot to align with the AN
855+
*
851856
* @param ctx read / write interface definitions.(ptr)
852857
* @param val change the values of reboot in reg CFG_REG_A.(ptr)
853858
* @retval interface status.(MANDATORY: return 0 -> no Error)
854859
*
855860
*/
856-
[[deprecated("Please use reboot to align with the AN")]]
857861
int32_t lis2mdl_boot_get(const stmdev_ctx_t *ctx, uint8_t *val)
858862
{
859863
lis2mdl_cfg_reg_a_t reg;

lis2mdl_reg.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ int32_t lis2mdl_temperature_raw_get(const stmdev_ctx_t *ctx, int16_t *val);
459459

460460
int32_t lis2mdl_device_id_get(const stmdev_ctx_t *ctx, uint8_t *buff);
461461

462-
// deprecated: Please use sw_reset to align with the AN
463-
int32_t lis2mdl_reset_set(const stmdev_ctx_t *ctx, uint8_t val);
464-
// deprecated: Please use sw_reset to align with the AN
465-
int32_t lis2mdl_reset_get(const stmdev_ctx_t *ctx, uint8_t *val);
466-
467-
// deprecated: Please use reboot to align with the AN
468-
int32_t lis2mdl_boot_set(const stmdev_ctx_t *ctx, uint8_t val);
469-
// deprecated: Please use reboot to align with the AN
470-
int32_t lis2mdl_boot_get(const stmdev_ctx_t *ctx, uint8_t *val);
462+
int32_t lis2mdl_reset_set(const stmdev_ctx_t *ctx, uint8_t val)
463+
__attribute__((deprecated("Please use sw_reset to align with the AN")));
464+
int32_t lis2mdl_reset_get(const stmdev_ctx_t *ctx, uint8_t *val)
465+
__attribute__((deprecated("Please use sw_reset to align with the AN")));
466+
467+
int32_t lis2mdl_boot_set(const stmdev_ctx_t *ctx, uint8_t val)
468+
__attribute__((deprecated("Please use reboot to align with the AN")));
469+
int32_t lis2mdl_boot_get(const stmdev_ctx_t *ctx, uint8_t *val)
470+
__attribute__((deprecated("Please use reboot to align with the AN")));
471471

472472
int32_t lis2mdl_sw_reset(const stmdev_ctx_t *ctx);
473473

0 commit comments

Comments
 (0)