include/counter.h
/**
 * @brief Set an alarm.
 * @param dev Pointer to the device structure for the driver instance.
 * @param callback Pointer to the callback function. if this is NULL,
 *                 this function unsets the alarm.
 * @param count Number of counter ticks.
 * @param user_data Pointer to user data.
 *
 * @retval 0 If successful.
 * @retval -ENOTSUP if the counter was not started yet.
 * @retval -ENODEV if the device doesn't support interrupt (e.g. free
 *                        running counters).
 * @retval Negative errno code if failure.
 */
@brief Set an alarm.
@param dev Pointer to the device structure for the driver instance.
@param callback Pointer to the callback function. if this is NULL,
this function unsets the alarm.
@param count Number of counter ticks.
@param user_data Pointer to user data.

@retval 0 If successful.
@retval -ENOTSUP if the counter was not started yet.
@retval -ENODEV if the device doesn't support interrupt .
@retval Negative errno code if failure.
@brief Set an alarm . @param dev Pointer to the device structure for the driver instance . @param callback Pointer to the callback function . if this is NULL this function unsets the alarm . @param count Number of counter ticks . @param user_data Pointer to user data . @retval 0 If successful . @retval - ENOTSUP if the counter was not started yet . @retval - ENODEV if the device doesn ' t support interrupt . @retval Negative errno code if failure .
static inline int counter_set_alarm(struct device *dev,
				    counter_callback_t callback,
				    u32_t count, void *user_data)
{
	const struct counter_driver_api *api = dev->driver_api;
	return api->set_alarm(dev, callback, count, user_data);
}
static inline int counter_set_alarm ( struct device * dev , counter_callback_t callback , u32_t count , void * user_data ) { const struct counter_driver_api * api = dev -> driver_api ; return api -> set_alarm ( dev , callback , count , user_data ) ; }
@brief Set an alarm.
@brief Set an alarm .