You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved.
* Description: header of pwm sample
* Author: Hisilicon
* Created: 2021-12-10
*/
#ifndef SAMPLE_PWM_H
#define SAMPLE_PWM_H
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */
#define sample_pwm_check_param(ret, errno, param, cmd) do { \
if ((param)) { \
printf("%s failed!\n", #param); \
ret = (errno); \
cmd; \
} \
} while (0)
#define sample_pwm_func_call(ret, func, cmd) do { \
(ret) = (func); \
if ((ret) != TD_SUCCESS) { \
printf("%s failed!\n", #func); \
cmd; \
} \
} while (0)
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */
#endif /* SAMPLE_PWM_H */