/* * 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 */