1 /* 2 * Copyright (C) 2021 Alibaba Group Holding Limited 3 */ 4 5 #ifndef _AOS_PWM_CSI_H 6 #define _AOS_PWM_CSI_H 7 8 #include <aos/pwm_core.h> 9 #include <drv/pwm.h> 10 11 typedef struct { 12 aos_pwm_t aos_pwm; /* aos pwm device */ 13 csi_pwm_t csi_pwm; /* csi pwm device */ 14 } aos_pwm_csi_t; 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 /** 21 * Register an CSI PWM device 22 * 23 * @param[in] pwm PWM ref to operate. The caller should allocate memory, 24 * init it and set id for the CSI PWM device. 25 * 26 * @return 0: on success; < 0: on failure 27 */ 28 aos_status_t aos_pwm_csi_register(aos_pwm_csi_t *pwm_csi); 29 30 /** 31 * Unregister an CSI PWM device by id 32 * 33 * @param[in] id CSI PWM device id 34 * 35 * @return 0: on success; < 0: on failure 36 */ 37 aos_status_t aos_pwm_csi_unregister(uint32_t id); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* _AOS_PWM_CSI_H */ 44