| 
    luat_soc_sdk_2024 V1.0
    
   | 
 
结构体 | |
| struct | luat_camera_conf | 
| struct | luat_spi_camera_t | 
类型定义 | |
| typedef struct luat_camera_conf | luat_camera_conf_t | 
枚举 | |
| enum | {  LUAT_CAMERA_FRAME_START = 0 , LUAT_CAMERA_FRAME_END , LUAT_CAMERA_FRAME_RX_DONE , LUAT_CAMERA_FRAME_ERROR , LUAT_CAMERA_MODE_AUTO = 0 , LUAT_CAMERA_MODE_SCAN }  | 
函数 | |
| int | luat_camera_setup (int id, luat_spi_camera_t *conf, void *callback, void *param) | 
| 配置spi camera并且初始化camera   | |
| int | luat_camera_set_image_w_h (int id, uint16_t w, uint16_t h) | 
| 配置图像大小   | |
| int | luat_camera_init (luat_camera_conf_t *conf) | 
| 配置camera并且初始化camera,spi camera不要使用这个   | |
| int | luat_camera_close (int id) | 
| 关闭camera并且释放资源   | |
| int | luat_camera_start_with_buffer (int id, void *buf) | 
| 摄像头启动开始接收数据,csdk专用   | |
| void | luat_camera_continue_with_buffer (int id, void *buf) | 
| 摄像头切换接收数据缓冲区,csdk专用   | |
| int | luat_camera_pause (int id, uint8_t is_pause) | 
| 暂停接收camera数据   | |
| int | luat_camera_image_decode_init (uint8_t type, void *stack, uint32_t stack_length, uint32_t priority) | 
| int | luat_camera_image_decode_once (uint8_t *data, uint16_t image_w, uint16_t image_h, uint32_t timeout, void *callback, void *param) | 
| void | luat_camera_image_decode_deinit (void) | 
| int | luat_camera_image_decode_get_result (uint8_t *buf) | 
| int | luat_camera_start (int id) | 
| 开始接收camera数据   | |
| int | luat_camera_stop (int id) | 
| 停止接收camera数据   | |
| int | luat_camera_preview (int id, uint8_t on_off) | 
| int | luat_camera_work_mode (int id, int mode) | 
| int | luat_camera_capture (int id, uint8_t quality, const char *path) | 
| int | luat_camera_capture_in_ram (int id, uint8_t quality, void *buffer) | 
| typedef struct luat_camera_conf luat_camera_conf_t | 
| anonymous enum | 
| 枚举值 | |
|---|---|
| LUAT_CAMERA_FRAME_START | |
| LUAT_CAMERA_FRAME_END | |
| LUAT_CAMERA_FRAME_RX_DONE | |
| LUAT_CAMERA_FRAME_ERROR | |
| LUAT_CAMERA_MODE_AUTO | |
| LUAT_CAMERA_MODE_SCAN | |
在文件 luat_camera.h 第 17 行定义.
| int luat_camera_capture | ( | int | id, | 
| uint8_t | quality, | ||
| const char * | path ) | 
| int luat_camera_capture_in_ram | ( | int | id, | 
| uint8_t | quality, | ||
| void * | buffer ) | 
| int luat_camera_close | ( | int | id | ) | 
关闭camera并且释放资源
| id | camera接收数据总线ID | 
| void luat_camera_continue_with_buffer | ( | int | id, | 
| void * | buf ) | 
摄像头切换接收数据缓冲区,csdk专用
| id | camera接收数据总线ID | 
| buf | 用户区地址,如果为NULL,则表示不存放到用户区 | 
| void luat_camera_image_decode_deinit | ( | void | ) | 
| int luat_camera_image_decode_get_result | ( | uint8_t * | buf | ) | 
| int luat_camera_image_decode_init | ( | uint8_t | type, | 
| void * | stack, | ||
| uint32_t | stack_length, | ||
| uint32_t | priority ) | 
| int luat_camera_image_decode_once | ( | uint8_t * | data, | 
| uint16_t | image_w, | ||
| uint16_t | image_h, | ||
| uint32_t | timeout, | ||
| void * | callback, | ||
| void * | param ) | 
| int luat_camera_init | ( | luat_camera_conf_t * | conf | ) | 
配置camera并且初始化camera,spi camera不要使用这个
| conf | camera相关配置 | 
| int luat_camera_pause | ( | int | id, | 
| uint8_t | is_pause ) | 
暂停接收camera数据
| id | camera接收数据总线ID | 
| is_pause | 非0暂停,0恢复 | 
| int luat_camera_preview | ( | int | id, | 
| uint8_t | on_off ) | 
| int luat_camera_set_image_w_h | ( | int | id, | 
| uint16_t | w, | ||
| uint16_t | h ) | 
配置图像大小
| id | camera接收数据总线ID | 
| w | 图像宽 | 
| h | 图像高 | 
| int luat_camera_setup | ( | int | id, | 
| luat_spi_camera_t * | conf, | ||
| void * | callback, | ||
| void * | param ) | 
配置spi camera并且初始化camera
| id | camera接收数据总线ID,ec618上有2条,0和1 | 
| conf | camera相关配置 | 
| callback | camera接收中断回调,注意这是在中断里的回调 | 
| param | 中断回调时用户的参数 | 
| int luat_camera_start | ( | int | id | ) | 
开始接收camera数据
| id | camera接收数据总线ID | 
| int luat_camera_start_with_buffer | ( | int | id, | 
| void * | buf ) | 
摄像头启动开始接收数据,csdk专用
| id | camera接收数据总线ID | 
| buf | 用户区地址,如果为NULL,则表示不存放到用户区 | 
| int luat_camera_stop | ( | int | id | ) | 
停止接收camera数据
| id | camera接收数据总线ID | 
| int luat_camera_work_mode | ( | int | id, | 
| int | mode ) |