1 /*
2  * Copyright (C) 2020-2021 Alibaba Group Holding Limited
3  */
4 
5 #ifndef AOS_GPIOC_CSI_H
6 #define AOS_GPIOC_CSI_H
7 
8 #include <aos/gpioc_core.h>
9 #include <drv/gpio.h>
10 
11 #define AOS_GPIOC_CSI_MAX_NUM_PINS      (sizeof(uint32_t) * 8)
12 
13 typedef struct {
14     aos_gpioc_t gpioc;
15     aos_gpioc_pin_t pins[AOS_GPIOC_CSI_MAX_NUM_PINS];
16     uint32_t modes[AOS_GPIOC_CSI_MAX_NUM_PINS];
17     csi_gpio_t csi_gpio;
18     /* must be initialized before registration */
19     uint32_t default_input_cfg;
20     uint32_t default_output_cfg;
21 } aos_gpioc_csi_t;
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 aos_status_t aos_gpioc_csi_register(aos_gpioc_csi_t *gpioc_csi);
28 aos_status_t aos_gpioc_csi_unregister(uint32_t id);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* AOS_GPIOC_CSI_H */
35