counter: Fix warning due to deprecation of legacy API
counter_callback_t has been previously prefixed with __deprecated but it is used in prototype of deprecated function (counter_set_alarm). It seems that compiler generates the warning even though function is not used. Removed __deprecated prefix from the typedef, keeping it for the function only. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
b969f40e9d
commit
f81b225f6a
1 changed files with 7 additions and 6 deletions
|
@ -77,9 +77,6 @@ struct counter_alarm_cfg {
|
|||
*/
|
||||
typedef void (*counter_wrap_callback_t)(struct device *dev, void *user_data);
|
||||
|
||||
__deprecated typedef void (*counter_callback_t)(struct device *dev,
|
||||
void *user_data);
|
||||
|
||||
/** @brief Structure with generic counter features. */
|
||||
struct counter_config_info {
|
||||
u32_t max_wrap; /*!< Maximal (default) wrap value on which counter is
|
||||
|
@ -405,9 +402,8 @@ static inline u32_t _impl_counter_get_max_relative_alarm(struct device *dev)
|
|||
return api->get_max_relative_alarm(dev);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* Deprecated */
|
||||
typedef void (*counter_callback_t)(struct device *dev, void *user_data);
|
||||
|
||||
__deprecated static inline int counter_set_alarm(struct device *dev,
|
||||
counter_callback_t callback,
|
||||
|
@ -436,6 +432,11 @@ __deprecated static inline void *counter_get_user_data(struct device *dev)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue